Commit graph

81884 commits

Author SHA1 Message Date
Treehugger Robot
ee8eb76e84 Merge "Add bug component to cutils" into main am: bb3976c149
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2679836

Change-Id: Id8cf8de7403004b41a3f6d2eb87c199b9fc77596
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-27 18:34:19 +00:00
Lee George Thomas
9837a1e03f Merge "Create /data/misc/bootanim folder in init.rc." into main am: 9d398af95c
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2676056

Change-Id: I14d2a4fc510a3001e68472ccf5e9b84b2ed7d1f6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-27 18:32:28 +00:00
Treehugger Robot
bb3976c149 Merge "Add bug component to cutils" into main 2023-07-27 18:29:10 +00:00
Lee George Thomas
9d398af95c Merge "Create /data/misc/bootanim folder in init.rc." into main 2023-07-27 17:34:08 +00:00
Tomasz Wasilczyk
8fe4f073c2 Add bug component to cutils
Bug: 289414897
Test: N/A
Change-Id: Ic7122e52c3847beba3891b121b723d19bf2076de
2023-07-27 10:16:05 -07:00
Treehugger Robot
01d4fdfad3 Merge "libprocessgroup: UIDs in linux are unsigned" into main am: f8d02eeee1
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2677642

Change-Id: I9bcc66576d12fa017d424ff9a4b505980d9d5f68
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-27 02:28:58 +00:00
Treehugger Robot
f8d02eeee1 Merge "libprocessgroup: UIDs in linux are unsigned" into main 2023-07-27 01:27:48 +00:00
T.J. Mercier
aa6158b410 libprocessgroup: UIDs in linux are unsigned
We missed two incorrect specifiers in the previous commit with this same
title.

We use the %d format specificier for uid_t, which maps to
__kernel_uid32_t, which is unsigned. [1] This is undefined behavior
which can lead to paths with negative UIDs when erroneously large
values are passed for uid:

E libprocessgroup: No such cgroup attribute: /sys/fs/cgroup/uid_-89846/cgroup.freeze

Fix it with %u.

[1] https://cs.android.com/search?q=typedef.*__kernel_uid32_t&ss=android%2Fplatform%2Fsuperproject%2Fmain

Change-Id: Ica04b03526bd2e156f026a2797fe9912b259cd9f
2023-07-26 22:12:44 +00:00
Eric Biggers
82161b0c05 Merge "Revert "init.rc: stop calling 'fsverity_init --load-verified-keys'"" into main am: 428622bb7f
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2676760

Change-Id: I3fa7aefb95ecebb0e015e37559334c9748ed2d62
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-26 19:08:06 +00:00
Eric Biggers
428622bb7f Merge "Revert "init.rc: stop calling 'fsverity_init --load-verified-keys'"" into main 2023-07-26 18:06:51 +00:00
Treehugger Robot
4bad19f3a2 Merge "Add bug component to system/core" into main am: 17df69eb5f
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2677635

Change-Id: I8d6f551024e820c43258e41e185fba83539c5d49
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-26 16:13:41 +00:00
Treehugger Robot
17df69eb5f Merge "Add bug component to system/core" into main 2023-07-26 15:26:59 +00:00
Tomasz Wasilczyk
a895aac5e0 Add bug component to system/core
Bug: 289414897
Test: N/A
Change-Id: I9709b2483988f8d7a4204d5398cc559d167f14bf
2023-07-26 07:57:58 -07:00
Yunkai Lim
9292f74fc1 Revert "init.rc: stop calling 'fsverity_init --load-verified-keys'"
Revert submission 2662658-fsverity-init-cleanup

Reason for revert: Culprit for test breakage b/293232766

Reverted changes: /q/submissionid:2662658-fsverity-init-cleanup

Change-Id: I77086f955a53eec274166b7395a88b7dc0e1ad53
2023-07-26 06:21:43 +00:00
Eric Biggers
e17aeed6b8 Merge "init.rc: stop calling 'fsverity_init --load-verified-keys'" into main am: 5aade9ca04
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2662658

Change-Id: Id296fb0ac33dd63cb6b2e1de5c6b23b3ec20c662
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-25 23:46:13 +00:00
Eric Biggers
5aade9ca04 Merge "init.rc: stop calling 'fsverity_init --load-verified-keys'" into main 2023-07-25 22:49:09 +00:00
Lee George Thomas
2493d50328 Create /data/misc/bootanim folder in init.rc.
This folder is used to host bootanim data files.

Bug: 210757252
Test: /data/misc/bootanim is correctly created.
Change-Id: I9c9949316d073ad7ebac503f097c5fee6c0b2a22
2023-07-25 15:07:17 -07:00
Ryan Prichard
488f4b5a39 Merge "Explicitly ignore the result of std::async" into main am: 60dbdaa3fa
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2673359

Change-Id: I098989364b5d481d84ae8365ea52bf082bc8e7f3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-25 21:28:50 +00:00
Ryan Prichard
60dbdaa3fa Merge "Explicitly ignore the result of std::async" into main 2023-07-25 20:21:14 +00:00
Treehugger Robot
947d407b3c Merge "Add safety comments." into main am: 406d43397c
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2672075

Change-Id: Ib0b8e92f2d1d2d39b4836b56281a60d2e46ef377
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-25 07:53:54 +00:00
Treehugger Robot
406d43397c Merge "Add safety comments." into main 2023-07-25 07:00:16 +00:00
Treehugger Robot
6094c610ad Merge "libprocessgroup: UIDs in linux are unsigned" into main am: a414e2fd9b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2670104

Change-Id: I6e204bdaf1120e81aaae9d52736f5a86df522763
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-24 23:21:10 +00:00
Treehugger Robot
a414e2fd9b Merge "libprocessgroup: UIDs in linux are unsigned" into main 2023-07-24 22:44:22 +00:00
Treehugger Robot
8c048624e9 Merge "storageproxyd: Start only a single binder thread" into main am: e4cbd9a6a0
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2670162

Change-Id: Icea468282ec0e808c1eff5c0951e302f1c598843
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-24 22:14:12 +00:00
Treehugger Robot
e4cbd9a6a0 Merge "storageproxyd: Start only a single binder thread" into main 2023-07-24 21:35:45 +00:00
Yi-Yo Chiang
112b3505e9 Merge changes I2581fd7c,I1ed57e6d into main am: 64062f8f4a
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2671040

Change-Id: I6d8a5c24fcbafcb2fa0ec513d6bdf0b41cb0e527
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-24 10:39:19 +00:00
Yi-Yo Chiang
64062f8f4a Merge changes I2581fd7c,I1ed57e6d into main
* changes:
  fs_mgr: Refactor by inlining trivial helpers
  fs_mgr_overlayfs: Make all string constants constexpr
2023-07-24 09:53:26 +00:00
Akilesh Kailash
4a875cf948 Merge "snapuserd: use local buffers for xor processing during sync I/O" into main am: da2fc1c6af
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2670338

Change-Id: I74d7b735946334b824d88baee8ad2b3a51751e10
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-21 23:02:26 +00:00
Ryan Prichard
c5184f79ee Explicitly ignore the result of std::async
The newer libc++ marks std::async with [[nodiscard]] in C++20 mode.

Bug: b/175635923
Test: treehugger
Change-Id: Ib63259983d952b97cf1b1c6c243c831cb72f9724
2023-07-21 15:21:28 -07:00
Akilesh Kailash
da2fc1c6af Merge "snapuserd: use local buffers for xor processing during sync I/O" into main 2023-07-21 22:18:21 +00:00
Akilesh Kailash
37c18b30cb snapuserd: use local buffers for xor processing during sync I/O
Bug: 291862304
Test: Incremental OTA on Pixel - Verify first stage boot logs
Change-Id: Ifc4f1ec912ccc1d24673f7bb03b05129ce504fa1
Signed-off-by: Akilesh Kailash <akailash@google.com>
2023-07-21 20:08:37 +00:00
Stephen Crane
b05b870671 storageproxyd: Start only a single binder thread
We only need a single binder thread to receive notifications, so we
should set the thread pool max to 0 rather than 1. startThreadPool()
starts one thread + the max count.

Test: m storageproxyd
Bug: 281951047
Fixes: 292030372
Change-Id: I53a90eaa2aa69469fd3a00b6da0d7061318c8ba9
2023-07-21 19:23:45 +00:00
Andrew Walbran
f580fe5799 Add safety comments.
These will soon be required by a lint.

Bug: 290018030
Test: m rust
Change-Id: I0b25bcaa18d167fb9c2d63e637833d4935dc8ff4
2023-07-21 19:13:48 +01:00
Yi-Yo Chiang
98e3522762 fs_mgr: Refactor by inlining trivial helpers
Inline some trivial helpers and remove unused header declarations.

Remove fs_mgr_*access() as it is really just access().
Remove fs_mgr_overlayfs_super_device() as we always want the primary
slot and having this wrapper isn't particularly helpful.

Test: adb-remount-test
Change-Id: I2581fd7c7d5071cbb97778535b7811dbcb80d76e
2023-07-22 00:08:51 +08:00
Yi-Yo Chiang
b2e0edcaae fs_mgr_overlayfs: Make all string constants constexpr
According to https://abseil.io/tips/140, string constants should be
constexpr char array or string_view object. This avoids subtle bugs due
to the toolchain shuffling object initialization order between/within
compilation units.

string_view has bad interoperability between C APIs as many of those
functions require string values to be null-terminated. Thus we can only
rely on good old c-string constants.

This change groups all string constants together and change them all to
constexpr char array for consistent style.
Also remove some duplicated method definition.

Test: adb-remount-test
Change-Id: I1ed57e6dc24ce3750e72c5538c388a6872cd2b40
2023-07-21 20:44:50 +08:00
Yi-Yo Chiang
fe0b2355fc Merge "init_first_stage: Disable ThinLTO" into main am: 6b57c885d3
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2667055

Change-Id: I5958bd4a5f62527cd1578c6dea21876b18993b5d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-21 05:37:17 +00:00
Yi-Yo Chiang
6b57c885d3 Merge "init_first_stage: Disable ThinLTO" into main 2023-07-21 05:08:13 +00:00
T.J. Mercier
bf2bebd8e7 libprocessgroup: UIDs in linux are unsigned
We use the %d format specificier for uid_t, which maps to
__kernel_uid32_t, which is unsigned. [1] This is undefined behavior
which can lead to paths with negative UIDs when erroneously large
values are passed for uid:

E libprocessgroup: No such cgroup attribute: /sys/fs/cgroup/uid_-89846/cgroup.freeze

Fix it with %u.

[1] https://cs.android.com/search?q=typedef.*__kernel_uid32_t&ss=android%2Fplatform%2Fsuperproject%2Fmain

Change-Id: Ibb52ba2503e30e2f20770b7d23629167e38d076a
2023-07-21 00:39:57 +00:00
David Anderson
1eb661531e Merge "snapuserd: Fix ubsan when reading a single aligned sector." into main am: 89d22239d2
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2666388

Change-Id: I1465b5194faa9ff8f17327281c5a6a5186538405
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-20 16:55:52 +00:00
David Anderson
89d22239d2 Merge "snapuserd: Fix ubsan when reading a single aligned sector." into main 2023-07-20 16:23:08 +00:00
Yi-Yo Chiang
4d6fa8ccaf init_first_stage: Disable ThinLTO
Static executables + x86 target build + ThinLTO produces bug behavior.
Global variables are not constructor initialized, resulting in faulty
runtime behavior.

Bug: 169004486
Bug: 291033685
Test: Treehugger
Change-Id: I777016cceb4851f2b432a37bc4d29aed56c23804
2023-07-20 18:47:16 +08:00
Jakob Vukalović
fcd6f0fb11 Merge "ueventd: Fix creation of VFIO dev nodes" into main am: 998c3b4fbe
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2664635

Change-Id: I8c8cf82dcf4ec2195888faf4066ea457c2321a40
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-20 09:34:30 +00:00
Jakob Vukalović
998c3b4fbe Merge "ueventd: Fix creation of VFIO dev nodes" into main 2023-07-20 09:04:25 +00:00
David Anderson
e1132a9c2f snapuserd: Fix ubsan when reading a single aligned sector.
When a read request is for a single sector, and the sector is
block-aligned, it falls into the ReadAlignedSector path, which assumes
block-sized reads. Fix this by clamping the expected size.

Bug: 291862304
Test: manual test of ReadWorker::ReadAlignedSector
      full OTA
Change-Id: I00e460c333e8a9a4dc2433443e3633f3d794da1d
2023-07-19 23:05:58 -07:00
Treehugger Robot
3fbf1e39e7 Merge "storageproxyd: Start binder thread pool" into main am: fe1fa35823
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2660288

Change-Id: I02a7a84427e04b2e9e4b1f741230e838e3d52023
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-19 23:39:20 +00:00
Treehugger Robot
fe1fa35823 Merge "storageproxyd: Start binder thread pool" into main 2023-07-19 22:52:21 +00:00
Stephen Crane
fb92cd3c22 storageproxyd: Start binder thread pool
The Trusty storage proxy requires that the suspend service is started to
acquire a wakelock for UFS RPMB operations. Without the binder thread
pool running, starting this service results in at least a 1s polling
delay. This change ensures that we start the thread pool before handling
any RPMB operations, so acquiring the wakelock will complete as soon as
the service is ready without needing to poll once per second.

Test: m storageproxyd
Test: Artificially delay suspend_service to check if we poll
Bug: 281951047
Change-Id: I1a4cdd48d57201b0cf9c24523d22e5bdbcea376a
2023-07-19 18:37:52 +00:00
Jakob Vukalovic
e377432924 ueventd: Fix creation of VFIO dev nodes
VFIO nodes, both the container (`vfio`) node and group (numbered)
nodes, should be located in `/dev/vfio`. This change prevents
ueventd from flattening that structure.

Test: Bind a device to VFIO driver to create a VFIO group
Change-Id: I635e9febe6bb52718df263e735479f361eacad4c
2023-07-19 10:03:10 +01:00
Eric Miao
339fecf742 Merge "String8: fix infinite loop and segmentation fault in removeAll()" into main am: 4a33c22c77
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2659075

Change-Id: Ia793f3deb7ff7cfbd455749d3a61fba55320d0ad
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-19 02:52:36 +00:00
Eric Miao
4a33c22c77 Merge "String8: fix infinite loop and segmentation fault in removeAll()" into main 2023-07-19 02:03:40 +00:00