Commit graph

61558 commits

Author SHA1 Message Date
Tom Cherry
5c9dbc710c Merge "ueventd: bump UEVENT_MSG_LEN to 8192" am: dfdc9b105a am: c2918185ff
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1367536

Change-Id: If45df6f5ea28431f601c0acae53314e2e866b179
2020-07-20 22:58:26 +00:00
Tom Cherry
c2918185ff Merge "ueventd: bump UEVENT_MSG_LEN to 8192" am: dfdc9b105a
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1367536

Change-Id: I0cdba3ea3c71d408762f8cdb7313fabad8b00ca0
2020-07-20 22:42:08 +00:00
Tom Cherry
dfdc9b105a Merge "ueventd: bump UEVENT_MSG_LEN to 8192" 2020-07-20 22:24:14 +00:00
Tom Cherry
939b41c79b ueventd: bump UEVENT_MSG_LEN to 8192
The previous size, 2048, is only the size of the 'environment' for the
uevent message, but doesn't include the <action>@<dev path> portion.
The <action> portion has a max length < 10, but the <dev path> portion
is unbounded.

8192 should be plenty to capture all of these parameters.

Bug: 161580785
Test: ueventd still works
Change-Id: I6de6fd3a444ac91b3b4df154097abde3696e21b3
2020-07-20 13:18:01 -07:00
Tom Cherry
7dbe475077 Merge "logd: record and replay log messages" am: 7a6191ce2e am: f5962b1bb5
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1358702

Change-Id: I24b19b30b44f4f8cbd539af67a88120389f87ccb
2020-07-20 16:15:52 +00:00
Tom Cherry
f5962b1bb5 Merge "logd: record and replay log messages" am: 7a6191ce2e
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1358702

Change-Id: Id90a98ca4c701b98c37528bee034d879e44bb732
2020-07-20 15:56:33 +00:00
Tom Cherry
7a6191ce2e Merge "logd: record and replay log messages" 2020-07-20 15:44:44 +00:00
Peter Collingbourne
8ac68188ac Merge "Fix dumping of heap memory." am: af7c3d5873 am: 8584d41613
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1365229

Change-Id: Id18cb0e2d2f3e776a42b566c4a1af2e250890896
2020-07-18 02:46:57 +00:00
Peter Collingbourne
8584d41613 Merge "Fix dumping of heap memory." am: af7c3d5873
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1365229

Change-Id: Iaff7c6f0c70d89846da5ba61f027809d03d14d52
2020-07-18 02:23:12 +00:00
Peter Collingbourne
af7c3d5873 Merge "Fix dumping of heap memory." 2020-07-18 02:06:45 +00:00
Peter Collingbourne
10e428dd77 Fix dumping of heap memory.
After r.android.com/1288984 we started failing to dump memory contents
for heap addresses because the tag started causing any addresses to
fail this bounds check. Add an untag_address() call to the bounds check
so that the tag is ignored.

Bug: 154272452
Change-Id: I3a6d1a078b21871bd93164150a123549f83289f6
2020-07-17 17:35:49 -07:00
Joshua Duong
25baf12af9 Merge "[clang-tidy] Add bugprone-inaccurate-erase check." am: 4aa073337d am: 27cb133608
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1365228

Change-Id: I8e0f3c623c695e48f61f141e63ceda6eea783fc7
2020-07-17 23:47:19 +00:00
Joshua Duong
27cb133608 Merge "[clang-tidy] Add bugprone-inaccurate-erase check." am: 4aa073337d
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1365228

Change-Id: I61dcc6936c14f73145d41f8f5d3a31100214c992
2020-07-17 23:26:30 +00:00
Joshua Duong
4aa073337d Merge "[clang-tidy] Add bugprone-inaccurate-erase check." 2020-07-17 23:13:01 +00:00
Yifan Hong
30b52007e5 Merge changes from topic "odm_dlkm" am: 3e31ec8392 am: 8c3a7ca939
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1363939

Change-Id: I8cdd4583c894d7fb5168fce1df789f2973a57357
2020-07-17 22:52:14 +00:00
Yifan Hong
8c3a7ca939 Merge changes from topic "odm_dlkm" am: 3e31ec8392
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1363939

Change-Id: I9dc7cf009bd88e19f30b3ba0c8913bd6e25d71cd
2020-07-17 22:27:16 +00:00
Tom Cherry
ec39a3f6df logd: record and replay log messages
To profile different log buffer types and configuration, this change
adds the ability to record log messages and adds a tool that will
replay those log messages through different log buffer implementations
and collect stats about the execution.

Test: log messages replay correctly
Change-Id: I0dc6c545b782fa7732e325dde109c496b137d0dd
2020-07-17 15:08:21 -07:00
Yifan Hong
3e31ec8392 Merge changes from topic "odm_dlkm"
* changes:
  rootdir: add odm_dlkm symlinks
  fastboot: Add odm_dlkm
  Load sysprops from odm_dlkm.
2020-07-17 22:05:26 +00:00
Joshua Duong
89169a372f [clang-tidy] Add bugprone-inaccurate-erase check.
This will hopefully identify misusage of the erase-remove idiom.

Test: "foo.erase(std::remove_if(...))" produces error.
Test: mmm system/core/adb -j (no warnings)
Change-Id: Iba0a6fc40cb6e7c65a7a3926d915874dc89a60c6
2020-07-17 14:50:45 -07:00
Treehugger Robot
b41ffef57a Merge "fs_mgr: overlayfs: check if scratch device is ext4 dedupe" am: a22e74cd4e am: d84ccd640b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1234486

Change-Id: I7612a0c549258a420a0e53df8ff3a43b8750a3e7
2020-07-17 19:41:55 +00:00
Treehugger Robot
d84ccd640b Merge "fs_mgr: overlayfs: check if scratch device is ext4 dedupe" am: a22e74cd4e
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1234486

Change-Id: I493d05c652ac85f07032f5fabe38b80a93fa89d4
2020-07-17 19:35:00 +00:00
Treehugger Robot
a22e74cd4e Merge "fs_mgr: overlayfs: check if scratch device is ext4 dedupe" 2020-07-17 19:32:19 +00:00
Treehugger Robot
1d25b825c5 Merge changes Ie2749dcc,Id1c97b9c,I68d1757d,I8e4b6a80 am: 949f453f7d am: 2702ea29e0
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1365584

Change-Id: I1823d843894805b34723bd13b3cc3d1ed8491b6f
2020-07-17 19:12:45 +00:00
Treehugger Robot
2702ea29e0 Merge changes Ie2749dcc,Id1c97b9c,I68d1757d,I8e4b6a80 am: 949f453f7d
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1365584

Change-Id: I7c08162efb6502fc49588278fbe9ab69bfceb9d2
2020-07-17 19:02:44 +00:00
Treehugger Robot
949f453f7d Merge changes Ie2749dcc,Id1c97b9c,I68d1757d,I8e4b6a80
* changes:
  fs_mgr: adb-remount-test.sh: use 24-bit forground colors
  fs_mgr: adb-remount-test.sh: Port to MAC OS/X
  fs_mgr: adb-remount-test.sh report kernel version of device
  fs_mgr: adb-remount-test.sh filter out ramdumpfs administrative mount
2020-07-17 19:00:38 +00:00
Elliott Hughes
f7909220c7 Merge "libunwindstack: support for Armv8.3-A Pointer Authentication" am: 1270608dbf am: a31c38df2d
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1215022

Change-Id: I2af17b2a19a8921a290f261b563ed289e414bf4a
2020-07-17 18:16:08 +00:00
Elliott Hughes
a31c38df2d Merge "libunwindstack: support for Armv8.3-A Pointer Authentication" am: 1270608dbf
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1215022

Change-Id: I6ca4b5c940c624c7bceb4c4da2da17dd9c344ca6
2020-07-17 18:11:53 +00:00
Elliott Hughes
1270608dbf Merge "libunwindstack: support for Armv8.3-A Pointer Authentication" 2020-07-17 18:01:19 +00:00
Tom Cherry
e781da96b5 Merge "logd: always compress SerializedLogChunk in FinishWriting()" am: aa0358b8fe am: e7e77f71c4
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1365225

Change-Id: I8e86c68e53270f411016e0a8489e0417334c09b7
2020-07-17 17:30:01 +00:00
Tom Cherry
e7e77f71c4 Merge "logd: always compress SerializedLogChunk in FinishWriting()" am: aa0358b8fe
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1365225

Change-Id: I3b1565a75467cbc82f87ff08c4f9801229b680d7
2020-07-17 17:15:51 +00:00
Tom Cherry
aa0358b8fe Merge "logd: always compress SerializedLogChunk in FinishWriting()" 2020-07-17 17:02:20 +00:00
Mark Salyzyn
93ce58d24a fs_mgr: overlayfs: check if scratch device is ext4 dedupe
Do not attempt to mount scratch r/w if it is ext4 dedupe, this causes
too much noise and troubling but innocuous error reports.

Assumption is we normally try f2fs first on all devices, we only try
ext4 first if we do not have f2fs tools, or if the existing
filesystem is ext4.  That said, we only have to check if it is ext4
dedupe during the first mount attempt, the fallback mount attempt for
ext4 is unlikely to need this checking.

Changes the output report for a retrofit DAP device from:

$ adb remount
Disabling verity for /system
[libfs_mgr]superblock s_max_mnt_count:65535,/dev/block/by-name/system_b
[libfs_mgr]check_fs(): mount(/dev/block/by-name/system_b,/mnt/scratch,ext4)=-1: Invalid argument
[libfs_mgr]Running /system/bin/e2fsck on /dev/block/sda6
[libfs_mgr]__mount(source=/dev/block/by-name/system_b,target=/mnt/scratch,type=ext4)=-1: Invalid argument
[libfs_mgr]Running /system/bin/fsck.f2fs -a /dev/block/sda6
[libfs_mgr]__mount(source=/dev/block/by-name/system_b,target=/mnt/scratch,type=f2fs)=0: Success
Using overlayfs for /system
. . .

To the more pleasant:

$ adb $BL1 remount
Disabling verity for /system
[libfs_mgr]superblock s_max_mnt_count:65535,/dev/block/by-name/system_b
[libfs_mgr]__mount(source=/dev/block/by-name/system_b,target=/mnt/scratch,type=ext4)=0: Success
[libfs_mgr]umount(/mnt/scratch)
[libfs_mgr]Running /system/bin/fsck.f2fs -a /dev/block/sda6
[libfs_mgr]__mount(source=/dev/block/by-name/system_b,target=/mnt/scratch,type=f2fs)=0: Success
Using overlayfs for /system
. . .

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Test: adb-remount-test.sh
Change-Id: Ic8c642912b1bafe0b4210c69c99a1d89fa20f204
2020-07-17 07:47:02 -07:00
Mark Salyzyn
c9a69b1df1 fs_mgr: adb-remount-test.sh: use 24-bit forground colors
This allows colors to rendor according to user preferences
in terminal emulator settings.

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 161454607
Test: make sure colors make sense
Change-Id: Ie2749dcce66954deddbca2863dadfa270cc6633e
2020-07-17 07:46:54 -07:00
Mark Salyzyn
d88715aae6 fs_mgr: adb-remount-test.sh: Port to MAC OS/X
This script did not run on a MAC, adjust so that it is usable.

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 161454607
Test: script can be used to test and replicate reported problem
Change-Id: Id1c97b9cd85d150a96733b8d39e40f6a4bcc0721
2020-07-17 07:46:39 -07:00
Mark Salyzyn
3591c2a661 fs_mgr: adb-remount-test.sh report kernel version of device
Report kernel version as part of the report.  Also warn user that
they are waiting for the screen to come up, and if the delay is
far too long, or the device is headless, then consider using the
--no-wait-screen option

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Test: adb-remount-test.sh
Bug: ????
Change-Id: I68d1757da62d028dc3633b1175b06af19e469d9f
2020-07-17 07:46:29 -07:00
Mark Salyzyn
128155017a fs_mgr: adb-remount-test.sh filter out ramdumpfs administrative mount
Causes flakes as the ramdumpfs may temporarily be applied
to check and/or retrieve content.

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 161454607
Test: no more flakes
Change-Id: I8e4b6a808ab81ec5b4f760a810b9b651a0b329d0
2020-07-17 07:46:13 -07:00
Tom Cherry
59caa7a045 logd: always compress SerializedLogChunk in FinishWriting()
When calculating the space used for pruning, if a log chunk is
compressed, that size is used otherwise the uncompressed size is
used.  This is intended to reach a steady state where 1/4 of the log
buffer is the uncompressed log chunk that is being written to and the
other 3/4 of the log buffer is compressed logs.

If we wait until there are no readers referencing the log chunk before
compressing it, we end up with 2 uncompressed logs (the one that was
just filled, that readers are still referencing, and the new one that
was allocated to fit the most recent log), which take up 1/2 of the
log buffer's allotted size and will thus cause prune to delete more
compressed logs than it should.

Instead, we should always compress the log chunks in FinishWriting()
such that the compressed size will always be used for log chunks other
than the one that is not actively written to.

Decompressed logs due to readers are ephemeral by their nature and
thus don't add to the log buffer size for pruning.

Test: observe that log buffers can be filled in the presence of a reader.
Change-Id: Ie21ccff032e41c4a0e51710cc435c5ab316563cb
2020-07-16 20:46:14 -07:00
Treehugger Robot
ce95e55104 Merge "Revert "Temporarily disable init_kill_services_test."" am: e866ce04a7 am: d2ec029290
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1362864

Change-Id: Ia49b1cd9344e0d4ba3e1fd3c640514f74cfff842
2020-07-16 22:20:09 +00:00
Treehugger Robot
d2ec029290 Merge "Revert "Temporarily disable init_kill_services_test."" am: e866ce04a7
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1362864

Change-Id: I6d38f4f2ba5deb7537b73d5501166438d8d1c9b1
2020-07-16 21:54:54 +00:00
Treehugger Robot
e866ce04a7 Merge "Revert "Temporarily disable init_kill_services_test."" 2020-07-16 21:29:33 +00:00
Treehugger Robot
3cffdba0fe Merge "Fix quoting of paths in auth code." am: b371af9e0f am: f898aade18
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1363936

Change-Id: I28cf44911b232af339eb6f685fe5f8a3e7ef0641
2020-07-16 17:14:57 +00:00
Treehugger Robot
f898aade18 Merge "Fix quoting of paths in auth code." am: b371af9e0f
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1363936

Change-Id: Ide1441464235ad2839b752e3642a8c88aa7cd784
2020-07-16 17:01:22 +00:00
Treehugger Robot
b371af9e0f Merge "Fix quoting of paths in auth code." 2020-07-16 16:47:20 +00:00
Michael Wright
ec8ff6eed3 Merge "Soften BitSet class comment." am: 2ea91cfe76 am: 009d58d8da
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1360510

Change-Id: I3f6493c151e4b75be52cf3e2dbda1db94c9642b6
2020-07-16 13:00:28 +00:00
Michael Wright
009d58d8da Merge "Soften BitSet class comment." am: 2ea91cfe76
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1360510

Change-Id: Ie3339cabc02b476dd45bc028de09de7d4ee37a2f
2020-07-16 12:45:22 +00:00
Michael Wright
2ea91cfe76 Merge "Soften BitSet class comment." 2020-07-16 12:28:03 +00:00
Alex Buynytskyy
0f04bf05dd Merge "install-multi-package fix" am: 35f3169c5c am: 5f3ced82f4
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1362351

Change-Id: I8eaef439a60e323c94ce5797ab93970d4f48937a
2020-07-16 06:00:22 +00:00
Alex Buynytskyy
5f3ced82f4 Merge "install-multi-package fix" am: 35f3169c5c
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1362351

Change-Id: I670d3929fb307bc1ac0c76d05203a528c000ddd0
2020-07-16 05:48:42 +00:00
Alex Buynytskyy
35f3169c5c Merge "install-multi-package fix" 2020-07-16 05:34:44 +00:00
Alex Buynytskyy
71afeb9a5e install-multi-package fix
Fixes: 158851500
Test: adb install-multi-package -d -g $HOME/tmp/base-master.apk:$HOME/tmp/base-en.apk
Change-Id: I92e034c0a8c27eab6d5a82e96817af4a7555388f
Merged-In: I92e034c0a8c27eab6d5a82e96817af4a7555388f
2020-07-16 04:57:07 +00:00