Commit graph

89732 commits

Author SHA1 Message Date
Armelle Laine
81b28aa00a Merge "trusty: libtrusty-rs: Add vsock support" into main 2024-08-13 13:44:09 +00:00
Chaitanya Cheemala (xWF)
8cd0f23d1c Merge "Revert^3 "Set block device as RO/RW before mount"" into main 2024-08-13 12:01:15 +00:00
Chaitanya Cheemala (xWF)
1df3536b95 Revert^3 "Set block device as RO/RW before mount"
This reverts commit 61c07a09e8.

Reason for revert: Likely culprit for b/359414718  - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.

Change-Id: Ie40dcc6d3549183ba146c4ff37edc0d1e57d0cca
2024-08-13 08:28:03 +00:00
Treehugger Robot
1aaf2384f2 Merge "Revert^2 "Set block device as RO/RW before mount"" into main 2024-08-13 03:17:06 +00:00
Steven Moreland
1409586daf Merge "init_kill_services_test: smoreland@ owners" into main 2024-08-12 23:12:55 +00:00
David Anderson
780ea239f2 Merge "libsnapshot: Simplify wipe handling in recovery." into main 2024-08-12 16:10:18 +00:00
Armelle Laine
5b7dfb0daa Merge "trusty: libtrusty: Add vsock support" into main 2024-08-12 13:16:37 +00:00
Treehugger Robot
45f03ea6a7 Merge "Remove unnecessary std::move" into main 2024-08-12 12:19:17 +00:00
Yi Kong
eecb107828 Remove unnecessary std::move
Moving a temporary object prevents copy elision, and could reduce
performance.

This fixes -Wpessimizing-move compiler warning.

Test: presubmit
Bug: 154270751
Change-Id: I4900bcfd14d461f7ded0500eca0a6b386ed59c8f
2024-08-12 18:15:19 +08:00
Jooyung Han
b29f0dcb5b Merge changes I00deb50c,I82650277 into main
* changes:
  Clean up userspace-reboot (#2)
  Clean up userspace-reboot
2024-08-12 00:40:07 +00:00
Elliott Hughes
20f66bed7a Merge "There's only one <sys/system_properties.h> now." into main 2024-08-10 17:15:08 +00:00
T.J. Mercier
f9f144363b Merge changes I9f850003,Idb270068,I39df9814 into main
* changes:
  libprocessgroup: Remove unused CgroupMap::SetupCgroups declaration
  libprocessgroup: Rename files a_cgroup_controller.cpp, a_cgroup_file.cpp
  libprocessgroup: Rename CgroupController -> CgroupControllerWrapper
2024-08-09 23:26:11 +00:00
Treehugger Robot
fc28da24d0 Merge "Enable secondary_user_on_secondary_display for CtsFsMgrTestCases" into main 2024-08-09 22:57:31 +00:00
Treehugger Robot
576b1be2eb Merge changes I2b0fcb8d,I72510d61 into main
* changes:
  init_kill_services_test: += system_suspend
  init_kill_services_test: formatting for merges
2024-08-09 22:23:31 +00:00
David Anderson
c85af55952 libsnapshot: Simplify wipe handling in recovery.
This refactors HandleImminentDataWipe to address some shortcomings
discovered through testing. Previously, it always called
CreateSnapshotsAndLogicalPartitions, which meant trying to use snapuserd
even if completely unnecessary.

Instead we now peek at the update state and eliminate the "easy" cases
ahead of time. These are "none", "initiated", and "unverified" when
either a rollback happens or there is no forward merge indicator. In
this case we simply return early and allow the wipe to continue
(disabling the current slot if necessary).

The hard case, when a merge is needed, is still handled within
ProcessUpdateStateOnDataWipe. However it's no longer recursive, and it
can assume a merge is about to initiated or already in progress.

In all cases except a merge failure, we change the update state to None
to clear any roadblocks update_engine or the bootloader might encounter.
A merge failure, however, still blocks a data wipe. The way to recover
from this is adb sideload.

Bug: 350613336
Test: vts_libsnapshot_test
      wipe in INITIATED state, no merge
      wipe in UNVERIFIED state, no merge
      wipe in UNVERIFIED + rollback state, no merge
      wipe in MERGING state, merge
Change-Id: I387aabcfa6304118be88ddbb85842111d5c2ef6a
2024-08-09 14:04:30 -07:00
Steven Moreland
aed90550d0 init_kill_services_test: smoreland@ owners
I've always maintained this test, would also take
overall init ownership, ;p

Bugs: me
Test: N/A
Change-Id: Id0ea93226b9afd22f8bc192a5a1b61e15d01f3e2
2024-08-09 20:52:43 +00:00
Steven Moreland
164f297007 init_kill_services_test: += system_suspend
Get coverage for this.

Bugs: me
Test: atest init_kill_services_test
Change-Id: I2b0fcb8d273f89de6d0ad115a8de0c0314dbfc3f
2024-08-09 20:50:51 +00:00
Steven Moreland
d945d20408 init_kill_services_test: formatting for merges
Adding formatting here, as we will start a push for people
using this, if they run into any linkToDeath issue, or if
they want to test this.

Bugs: me
Test: N/A
Change-Id: I72510d61926ce694671d897519463f37892a8d12
2024-08-09 20:50:34 +00:00
T.J. Mercier
7c94e5b25c libprocessgroup: Remove unused CgroupMap::SetupCgroups declaration
SetupCgroups was moved from CgroupMap in libprocessgroup to SetupCgroup
in libprocessgroup_setup, but the old declaration was not removed.

Fixes: 6f9ce2e548 ("libprocessgroup: Move CgroupSetupCgroups() to libprocessgroup_setup")
Test: m
Change-Id: I9f85000392b59a105bb202fae277a5582449822a
2024-08-09 18:35:29 +00:00
T.J. Mercier
9c53c803e1 libprocessgroup: Rename files a_cgroup_controller.cpp, a_cgroup_file.cpp
These are for ACgroupController and ACgroupFile, but share a filename
with libcgrouprc_format's CgroupController which can be confusing.

Bug: 349105928
Test: m
Change-Id: Idb270068169b71b0a33101407ddbb5a38cc8d469
2024-08-09 18:35:29 +00:00
T.J. Mercier
fcb8666eed libprocessgroup: Rename CgroupController -> CgroupControllerWrapper
So that the name is not overloaded with libcgrouprc_format's
CgroupController, which can be confusing.

Bug: 349105928
Test: m
Change-Id: I39df9814c500de68fd20139e661363ba51ea3543
2024-08-09 18:35:29 +00:00
Elliott Hughes
30203af8fd There's only one <sys/system_properties.h> now.
Change-Id: I4d535484b9e25fda304fb748b7796e513c832265
2024-08-09 15:55:38 +00:00
Treehugger Robot
fe4f5a1e6d Merge "Add /mnt/vm and mount tmpfs onto it for early VM" into main 2024-08-09 09:44:10 +00:00
Treehugger Robot
a7f7f4065b Merge "Fix SnapshotTest crash" into main 2024-08-09 07:40:07 +00:00
Jooyung Han
f91503bd18 Clean up userspace-reboot (#2)
Bug: 292469129
Test: CtsInitTestCases
Test: system/core/bootstat/boot_reason_test.sh
Change-Id: I00deb50c5634ade6b69d5b6bf4d08c5101e0beb8
2024-08-09 16:17:20 +09:00
Jooyung Han
e34549af33 Clean up userspace-reboot
The feature was deprecated last year.

Bug: 292469129
Test: atest CtsInitTestCases
Change-Id: I826502770ab3fa566be57a33829f1103efa893fb
2024-08-09 15:58:53 +09:00
Inseob Kim
b6e4179dab Add /mnt/vm and mount tmpfs onto it for early VM
It will be used as a storage for early boot virtmgr.

Bug: 354059281
Test: boot and check /mnt/vm
Change-Id: I4a0c604161356b631c21913a0f8c3f2d796a3c65
2024-08-09 15:20:18 +09:00
mingwei xue
a791e91304 Fix SnapshotTest crash
For Android 12 vendor project, SnapshotTestEnvironment setup is skipped. So, test_device is not initialized, which will cause other tests to fail.

Change-Id: I6ce6a9e7ea2c210e25c2a5ffadaaa6348086ea7f
BUG:350678717
Test:run vts -m vts_libsnapshot_test
2024-08-09 05:46:07 +00:00
Christopher Ferris
6d85bb3ef5 Merge "Small clean-up of debuggerd test." into main 2024-08-08 21:03:02 +00:00
Treehugger Robot
9da55b8cf7 Merge "Revert "libsnapshot: compile tests for both 32 and 64 bit"" into main 2024-08-08 06:50:11 +00:00
Akilesh Kailash
873ae91b95 Revert "libsnapshot: compile tests for both 32 and 64 bit"
This reverts commit 2317bbad07.

Reason for revert: b/358254699

Change-Id: Icb9dc0d48f3e39a45a69f9aa36f9bfe46d27e37a
2024-08-08 05:29:52 +00:00
Akilesh Kailash
0fe7deb212 Merge "libsnapshot: compile tests for both 32 and 64 bit" into main 2024-08-08 00:12:31 +00:00
Sandeep Dhavale
2007e0cc83 Merge "snapuserd: remove implicit assumption about dm-user in BufferSink" into main 2024-08-07 22:44:44 +00:00
Christopher Ferris
df5ae06d4c Small clean-up of debuggerd test.
For the debuggerd_test.cpp tests, don't include any libdebuggerd
internal headers.

Test: Compiles and unit tests pass.
Change-Id: I6335dc9e09992f5725a24fc45a8356efab7158e6
2024-08-07 21:29:26 +00:00
Akilesh Kailash
20d170fcb4 Merge "snapuserd_test: skip test if dm-user kernel driver is absent" into main 2024-08-07 21:05:31 +00:00
Akilesh Kailash
2317bbad07 libsnapshot: compile tests for both 32 and 64 bit
Bug: 352605053
Test: th
Change-Id: I0566e237d1151c705d61623be4b496d73b9ec3ea
Signed-off-by: Akilesh Kailash <akailash@google.com>
2024-08-07 10:57:41 -07:00
Akilesh Kailash
a880e5675b snapuserd_test: skip test if dm-user kernel driver is absent
Bug: 357487459
Test: snapuserd_test
Change-Id: I8458f223fc35fcfa042588e67a30c5bb273b0277
Signed-off-by: Akilesh Kailash <akailash@google.com>
2024-08-07 10:52:03 -07:00
Kelvin Zhang
61c07a09e8 Revert^2 "Set block device as RO/RW before mount"
Original CL reverted due to missing permission on vold.
The missing permission is added in aosp/3202313 , hence re-submit.

This reverts commit 1f00f794e6.


Reason for revert: b/349507086

Change-Id: Ia1086f3c8c65c476bdc119fe59ed4fd3a21f8591
2024-08-07 17:19:24 +00:00
Sandeep Dhavale
3df2dc1aae snapuserd: remove implicit assumption about dm-user in BufferSink
This removes implicit assumption that BufferSink can only be used with
dm-user. User of BufferSink can specify size of header during
BufferSink::Initialize to reserve the space for the header.

Also get rid of now unused structure dm_user_payload and
dm_user_message.

Test: TH
Test: ota
Test: vts_snapused_test
Bug: 357711761
Change-Id: I1e550393ce1f0277fe215015fa6948ad3c3b68ba
Signed-off-by: Sandeep Dhavale <dhavale@google.com>
2024-08-07 09:47:39 -07:00
Arve Hjønnevåg
dfeaa4e32b trusty: libtrusty-rs: Add vsock support
Bug: 298705967
Test: Manual run android.hardware.security.keymint-service.rust.trusty -d VSOCK:2048:1

Change-Id: I2aa5660c3c86fed53420b874de3ef6db9dc22f96
2024-08-07 11:27:27 +00:00
Chung-Kai (Michael) Mei
3e464e6e26 Merge "libmodprobe: use ordered map for deterministic module loading" into main 2024-08-07 02:04:25 +00:00
Arve Hjønnevåg
d5359abe11 trusty: libtrusty: Add vsock support
Add support for connecting to a vsock port that multiplexes trusty
services. The first vsock packet contains the tipc port name. To enable
this mode, pass "VSOCK:<cid>:<port>" as the device name string (where
<cid> and <port> is replaced with the cid and port numbers you want to
connect to).

Test: manual - ran storageproxyd and storage test with new option
Bug: 298705967
Change-Id: I9b75244ca38b7eb69ed7fc19b27aa309d0f7ed13
2024-08-06 13:06:24 +00:00
Chungkai Mei
55c047fd44 libmodprobe: use ordered map for deterministic module loading
To ensure stable loading of parallel modules, switch to an ordered map structure. This will prevent potential dependency issues and conflicts.

Bug: 314213605
Change-Id: I8e00678e18417550b3be0c4228e4908a830e648c
Signed-off-by: Chungkai Mei <chungkai@google.com>
2024-08-06 04:05:25 +00:00
Treehugger Robot
7cf5f08147 Merge "libcutils: Split uevent_open_socket()" into main 2024-08-05 20:55:31 +00:00
Eric Biggers
48931daf85 Merge "fs_mgr: Remove deprecated mount option" into main 2024-08-05 19:11:24 +00:00
Tiffany Yang
ccb950f9ed Merge "init: Wait for /dev/hvc1 during ARCVM first-stage mount" into main 2024-08-05 18:37:56 +00:00
Bart Van Assche
8e62c8a9b4 libcutils: Split uevent_open_socket()
The best time to attach a BPF filter to a socket is before a socket
starts receiving data. Netlink sockets start receiving data after bind()
has been called. uevent_open_socket() calls socket() and bind(). Hence
split uevent_open_socket() into two functions: one function that calls
socket() and another function that calls bind().

Bug: 203462310
Change-Id: Ia41dee4683358cf9fbb6288fad863cd4f4ac9924
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2024-08-05 09:31:24 -07:00
Treehugger Robot
ac68a8b797 Merge "Refactor init.environ.rc to append than replace" into main 2024-08-02 08:27:03 +00:00
Inseob Kim
3ce6cb9b6e Refactor init.environ.rc to append than replace
Bug: 353429422
Test: boot
Change-Id: Ibd432fa39fc75f8b49ae26fbc6b74f11fb3f771d
2024-08-02 15:55:39 +09:00
Richard Chang
96265b3420 Merge "fs_mgr: check available space before creating zram backing device" into main 2024-08-02 02:53:44 +00:00