Commit graph

80315 commits

Author SHA1 Message Date
Treehugger Robot
97f5b24c94 Merge "init: Fix and re-enable the init#StartConsole test" am: 7bc5a7ef5f
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2313501

Change-Id: I011da24acae1e06f2435c2778f0dcbd189ad169b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-01 05:20:40 +00:00
Treehugger Robot
7bc5a7ef5f Merge "init: Fix and re-enable the init#StartConsole test" 2022-12-01 04:56:09 +00:00
Kiyoung Kim
62a307ab61 Remove LLNDK libraries from system required
Remove LLNDK libraries from system required libs as those libraries will
be appended to the configuration from the build.

Bug: 251782700
Test: Cuttlefish build and boot succeeded
Change-Id: I81d508a5e15a9dd1919935f07569271609738710
2022-12-01 11:36:45 +09:00
Jiyong Park
f477319692 Clarify the behavior about event and property triggers
See the comment threads at [1] for the rationale behind the behavior.

[1] https://android-review.git.corp.google.com/c/platform/system/core/+/161601/16/init/action.cpp#232

Bug: N/A
Test: N/A

Change-Id: I8b271073ec14ad9fa9add5df60577b34d1df3241
2022-12-01 10:38:48 +09:00
David Anderson
0f1a36d9f8 Merge "libsnapshot: Disable 32-bit VTS tests on 64-bit systems." am: 85b7bbf41f
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2280311

Change-Id: Id80191c6ade03b3d0f28c95a195bc027ce64bd96
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-01 00:55:27 +00:00
David Anderson
85b7bbf41f Merge "libsnapshot: Disable 32-bit VTS tests on 64-bit systems." 2022-12-01 00:25:24 +00:00
Treehugger Robot
c8d405ebd8 Merge "trusty/storage: Add property indicating when fs is ready" am: a3e605486d
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2310114

Change-Id: I096c47014cc8911c26cc06a7a02627ccb7c99966
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-30 21:35:14 +00:00
Bart Van Assche
3b21d95a0e init: Fix and re-enable the init#StartConsole test
Skip the test if /dev/console does not exist. Fix the console service
security label. Fix the getsid() test.

Bug: 260104465
Test: atest 'CtsInitTestCases:init#StartConsole' on a P2023 development board
Change-Id: If2533a3f205f922a9b04a748cb558a09c5925986
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2022-11-30 13:25:47 -08:00
Treehugger Robot
a3e605486d Merge "trusty/storage: Add property indicating when fs is ready" 2022-11-30 21:06:13 +00:00
Bart Van Assche
29d8a42d14 Revert "init: Add more diagnostics for signalfd hangs."
Revert commit 14f9c15e05 ("init: Add more diagnostics for signalfd
hangs") because:
* That commit was intented to help with root-causing b/223076262.
* The root cause of b/223076262 has been fixed (not blocking SIGCHLD
  in all threads in the init process).

Test: Treehugger
Change-Id: I586663ec0588e74a9d58512f7f31155398cf4f52
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2022-11-30 09:17:16 -08:00
Daniel Zheng
65452d036e Updating fastboot to modern c++ standards
Test: tested fastboot on raven device
Change-Id: I0c1fa4cd09378282edf5df54ae26d747e6d4f3eb
2022-11-30 03:36:46 +00:00
Max Bires
57d837ac95 Merge "Add TEST_MAPPING files." am: f9e6c5104d
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2321462

Change-Id: I2c4240ab4a5587ccdbbd3c1bcc3a9406efa86541
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-29 18:14:22 +00:00
Max Bires
f9e6c5104d Merge "Add TEST_MAPPING files." 2022-11-29 17:53:18 +00:00
Martin Stjernholm
147a6b3aae Merge "Remove dalvik.vm.usejitprofiles system property." am: 84681d34f6
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2317956

Change-Id: I90c0e2dcd5761f3439e3f75f4c3a3152fc608044
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-29 11:51:25 +00:00
Martin Stjernholm
84681d34f6 Merge "Remove dalvik.vm.usejitprofiles system property." 2022-11-29 11:15:45 +00:00
Max Bires
065a7207a2 Add TEST_MAPPING files.
These TEST_MAPPING definitions ensure that the VTS tests for the
respective HAL services will be executed upon any changes committed to
the HAL services.

Test: hopefully this is the test
Change-Id: Icfaf3621f2c7b9608deb998ba4b5cfd6621a7310
2022-11-29 02:50:45 -08:00
Treehugger Robot
11c22fcc00 Merge "libutils: Fix missing definition of shared_ptr and unique_ptr" am: dfdcc31d03
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2318113

Change-Id: I37fdc24c266ffb2dd7506bf70c366d96f75fc4d0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-29 02:16:45 +00:00
Treehugger Robot
dfdcc31d03 Merge "libutils: Fix missing definition of shared_ptr and unique_ptr" 2022-11-29 01:51:25 +00:00
Martin Stjernholm
b46b947597 Remove dalvik.vm.usejitprofiles system property.
Disabling profiles is no longer supported. Most of the profile support
has been active even when this property was false, and it won't be
supported in the ART Service.

Test: atest -a propertyinfoserializer_tests
Bug: 254434433
Change-Id: I49272b0976f71fcd2e18d04a5b6cc3548a5f9d3f
2022-11-25 12:27:37 +00:00
Biswapriyo Nath
890f064990 libutils: Fix missing definition of shared_ptr and unique_ptr
This includes memory header for shared_ptr and unique_ptr templates.
Fixes the following errors:

RefBase.h:803:1: error: ‘shared_ptr’ does not name a type
RefBase.h:810:1: error: ‘unique_ptr’ does not name a type

Change-Id: I6a7a67333c9ef05250c5a3c6199d7fac288f946b
2022-11-25 12:15:53 +05:30
Stephen Crane
319f4618a7 trusty/storage: Add property indicating when fs is ready
Adds a system vendor property (ro.vendor.trusty.storage.fs_ready) to
indicate when backing storage on the Android filesystem (e.g. /data) is
ready for use. Before this property is set, the Trusty storage proxy may
restart causing connections in Trusty to the storage service to be
disconnected. All Trusty operations that may require storage and can
wait until the device filesystems are ready should wait on this
property.

Bug: 258018785
Test: manual
Change-Id: I9b1408b72df34a0d0cbcc1b99e9617f15bc47558
2022-11-23 17:55:12 +00:00
Yi-yo Chiang
8843506436 Merge "fastbootd: Add getvar is-force-debuggable" am: ccf13942e0
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2309232

Change-Id: I58c38e76395585d2c2d47130c27261e4fb4aaf30
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-23 08:29:11 +00:00
Yi-yo Chiang
ccf13942e0 Merge "fastbootd: Add getvar is-force-debuggable" 2022-11-23 07:52:38 +00:00
Treehugger Robot
74167124db Merge "init: Disable test init#StartConsole" am: 1af6ecda38
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2313500

Change-Id: Ic779a45f479c629378f9a2a789983dffbec62a22
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-23 05:28:50 +00:00
Treehugger Robot
1af6ecda38 Merge "init: Disable test init#StartConsole" 2022-11-23 04:51:55 +00:00
Bart Van Assche
027b275b57 init: Disable test init#StartConsole
Bug: 260104465
Change-Id: I43a19b2451bad955d101d9ebdc3c98419d83597d
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2022-11-22 16:38:43 -08:00
Yi-yo Chiang
7ab7444545 Merge "remount: Treat disable verity error as fatal only if verity is enabled" am: fb9b7de413
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2311386

Change-Id: Ic34c50d3b6ba1ad9a85fd8b8dfa6133598836f66
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-22 19:41:15 +00:00
Yi-yo Chiang
fb9b7de413 Merge "remount: Treat disable verity error as fatal only if verity is enabled" 2022-11-22 19:04:49 +00:00
Yi-Yo Chiang
38b68c6a0e fastbootd: Add getvar is-force-debuggable
Export ro.force.debuggable property so that the user can check image
compatibility prior to running fastboot flash.
For example, if is-force-debuggable is yes, then the "system" and
"vendor" build fingerprint must match.

Bug: 191649082
Test: fastboot getvar is-force-debuggable
Change-Id: I772d98253f58ba208d5803e18b589ff693deebd0
2022-11-22 17:32:21 +08:00
Yi-Yo Chiang
b4a86eeb2f remount: Treat disable verity error as fatal only if verity is enabled
If device doesn't enable AVB altogether, then it might not have a vbmeta
partition at all. In this case, we shall ignore disable-verity errors.
We still disable verity unconditionally to keep the logic simple, but we
ignore any disable-verity error if AVB is not enabled in the first
place.

Bug: 241688845
Test: adb-remount-test on emulator
Test: Test remount on yukawa
Change-Id: Ifc763b3f0ca6989550c139a8c3a2308c9c2a7c3e
2022-11-22 15:26:37 +08:00
Treehugger Robot
adcfac015b Merge "init: Fix a race condition in KillProcessGroup()" am: 3fca6e72cf
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2302562

Change-Id: I08e0a68155cfaf0abf45eff5eb2d9e54a70ece0b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-21 23:28:32 +00:00
Treehugger Robot
3fca6e72cf Merge "init: Fix a race condition in KillProcessGroup()" 2022-11-21 23:08:31 +00:00
Bart Van Assche
01e6669c66 init: Fix a race condition in KillProcessGroup()
Multiple tests in CtsInitTestCases, e.g. RebootTest#StopServicesSIGKILL,
can trigger the following race condition:
* A service is started. This involves calling fork() and also to call
  RunService() in the child process. RunService() calls setpgid().
* Service::Stop() is called and calls KillProcessGroup().
  KillProcessGroup() calls kill(-pgid, SIGKILL) before the child process
  has called setpgid(). pgid is the process ID of the child process. The
  kill() call fails because setpgid() has not yet been called.

Fix this race condition by adding a setpgid() call in the parent process
and by waiting from the parent until the child has called setsid() if a
console is attached.

Bug: 213617178
Change-Id: Ieb9e6908df725447e3695ed66bb8bd30e4e38aa9
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2022-11-21 11:42:44 -08:00
Bart Van Assche
22ac02c57c Merge "init: Introduce RequiresConsole()" am: f2934de9c1
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2303437

Change-Id: I02cc8a62019ead190348d1d796f1daa04215b6c3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-21 18:26:29 +00:00
Bart Van Assche
f4d6de8f90 Merge "init: Introduce symbolic names for certain constants" am: 27630f0d0f
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2308681

Change-Id: Ia66f90b9ab1ead168fd805f4d827d629d032682e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-21 18:25:19 +00:00
Bart Van Assche
f2934de9c1 Merge "init: Introduce RequiresConsole()" 2022-11-21 18:08:35 +00:00
Bart Van Assche
27630f0d0f Merge "init: Introduce symbolic names for certain constants" 2022-11-21 18:07:56 +00:00
Bart Van Assche
f745c45d6d Merge "init: Reduce the number of system calls" am: 254ae6c82b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2308680

Change-Id: If1047bc42621171e113b1e45c8fd873f92942073
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-21 03:52:45 +00:00
Bart Van Assche
e213d23447 Merge "Revert "init: Rename 'cgroups_activated' into 'fifo'"" am: 30bd9e9522
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2301276

Change-Id: I8f21d37499e8744c248e8d2f0583b711074bf8a3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-21 03:52:36 +00:00
Bart Van Assche
8b53ed2574 Merge "init: Document which class Service members are not modified" am: 3afd63273a
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2302561

Change-Id: I098e328dfb259ec8e3e9f11f4333ca3c75925d24
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-21 03:52:26 +00:00
Bart Van Assche
eb7c4f3e10 Merge "init: Add a unit test for the "start console" action" am: 208f93042b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2301275

Change-Id: Ie68fcc7ffaab22ccbac5b6e06b65e2b1bc4efa82
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-21 03:52:17 +00:00
Bart Van Assche
254ae6c82b Merge "init: Reduce the number of system calls" 2022-11-21 03:18:44 +00:00
Bart Van Assche
30bd9e9522 Merge "Revert "init: Rename 'cgroups_activated' into 'fifo'"" 2022-11-21 03:18:31 +00:00
Bart Van Assche
3afd63273a Merge "init: Document which class Service members are not modified" 2022-11-21 03:18:19 +00:00
Bart Van Assche
208f93042b Merge "init: Add a unit test for the "start console" action" 2022-11-21 03:18:06 +00:00
Tri Vo
1f9beb5718 Merge "trusty: IRPC supportedNumKeysInCsr support" am: e49eb79e07
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2307900

Change-Id: Ida65616fec1095844d73c4186c13c742ef9553df
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-18 19:38:38 +00:00
Tri Vo
e49eb79e07 Merge "trusty: IRPC supportedNumKeysInCsr support" 2022-11-18 19:03:28 +00:00
Bart Van Assche
987391656f init: Introduce RequiresConsole()
Prepare for adding more code in the parent process that depends on
whether or not a console is required.

Bug: 213617178
Change-Id: I066ede32fcd4ce09d06be23158f3c1970064a697
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2022-11-18 09:49:43 -08:00
Bart Van Assche
c8f34254b8 init: Introduce symbolic names for certain constants
Make the code easier to read by introducing symbolic names for the
constants used by Service::Start() for communication between the parent
and child processes.

Bug: 213617178
Change-Id: I3e735e149682fa9df2ed57f75eb5a67d7c68bd92
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2022-11-18 09:49:01 -08:00
Bart Van Assche
d394f74365 init: Reduce the number of system calls
Change setpgid(0, getpid()) into setpgid(0, 0). This patch removes one
system call but does not change the behavior of the code. From the
setpgid() man page: "If pgid is zero, then the PGID of the process
specified by pid is made the same as its process ID."

Bug: 213617178
Change-Id: I7031d9eb3711f526751da495c07a8927f9386d97
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2022-11-18 09:45:33 -08:00