Commit graph

72820 commits

Author SHA1 Message Date
Treehugger Robot
5294c3da33 Merge "init.rc: disable creation of bootreceiver tracing instance for kernels >=4.9 and <= 5.4" 2021-10-01 18:14:34 +00:00
Alexander Potapenko
1e966fa9f1 init: introduce ro.kernel.version property
This property will hold the major.minor part of the kernel version (e.g. "5.4"), allowing init scripts to act depending on that version, enabling and disabling certain features.

Bug: 194156700
Change-Id: Icec640b8a7150b344d9aa3bc0bdbcdae050c7c45
Test: manual on a Pixel device
Signed-off-by: Alexander Potapenko <glider@google.com>
2021-10-01 16:06:02 +00:00
Mohammad Islam
204d8c8787 [automerger skipped] Merge "libbinder: split out PackageManagerNative aidl" am: 570451bbfe -s ours
am skip reason: Merged-In Ieca32fc3c970f2b720d76071651e85459d082f02 with SHA-1 abacb514f9 is already in history

Original change: https://android-review.googlesource.com/c/platform/system/core/+/1827235

Change-Id: I1ebafba171f690264b2c2aac296ebcdb8b5a4b08
2021-10-01 13:01:56 +00:00
Mohammad Islam
570451bbfe Merge "libbinder: split out PackageManagerNative aidl" 2021-10-01 12:52:23 +00:00
Treehugger Robot
69a9fb4922 Merge "Define ro.vendor.api_level" am: 0a671e24f5
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1839954

Change-Id: Ic9f2dced1b547ec2f83c5fd8c791193781473961
2021-10-01 03:32:50 +00:00
Treehugger Robot
0a671e24f5 Merge "Define ro.vendor.api_level" 2021-10-01 02:46:09 +00:00
Akilesh Kailash
f7e8b809ed Merge "Revert "snapuserd: Handle real time signal 36"" am: ba097d2cd2
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1840354

Change-Id: Ia19a8a44b23f63fffe25020df3d74b94ec6664a6
2021-09-30 17:06:43 +00:00
Akilesh Kailash
ba097d2cd2 Merge "Revert "snapuserd: Handle real time signal 36"" 2021-09-30 16:52:10 +00:00
Akilesh Kailash
fec60563c4 Revert "snapuserd: Handle real time signal 36"
This reverts commit 8d3b31fe68.

Reason for revert: With https://r.android.com/1840754, bionic will handle the real time signal for statically linked binaries.

Change-Id: I81f0892f1734c7ecfb604820a8894506df8618b3
2021-09-30 07:24:11 +00:00
Treehugger Robot
a4fde44aa2 Merge "Add OWNERS for VTS module vts_libdm_test" am: 19dc4d413f
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1770165

Change-Id: I8a8ebde611cfee21156d3877420a2425251e65c6
2021-09-30 04:01:40 +00:00
Treehugger Robot
19dc4d413f Merge "Add OWNERS for VTS module vts_libdm_test" 2021-09-30 03:46:00 +00:00
Treehugger Robot
2d046219ee Merge changes Ie5e47d84,I3c5c9917,Ife48b163 am: 9f2c62481f
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1838534

Change-Id: I91df1e384d10566dc9fb31220681719bbfc240a9
2021-09-29 23:30:23 +00:00
Nikita Ioffe
b9fb80af34 [automerger skipped] Only run RebootTest under root am: 0a0e4793e3 -s ours
am skip reason: Merged-In I3c5c9917d0a787d66272ccf4aefc57e6573841bc with SHA-1 49b3a5c891 is already in history

Original change: https://android-review.googlesource.com/c/platform/system/core/+/1839957

Change-Id: I0d4006321c9453c005807e4efbf66a2f0b05cdd8
2021-09-29 23:30:20 +00:00
Treehugger Robot
9f2c62481f Merge changes Ie5e47d84,I3c5c9917,Ife48b163
* changes:
  Don't create vendor_init in microdroid
  Only run RebootTest under root
  Add reboot_test
2021-09-29 23:16:37 +00:00
Yiming Pan
47af156ee0 Add OWNERS for VTS module vts_libdm_test
Each VTS module is required to have OWNERS file. The ownership is based on
go/vts-owners. For more information about ownership policy, please visit
go/xts-owners-policy.

Test: Tree Hugger
Bug: 143903671
Change-Id: Id2911fd62841bf5622607f9deeb50c7cf1413b1b
2021-09-29 14:46:24 -07:00
Akilesh Kailash
e31df2c655 Merge "snapuserd: Handle real time signal 36" am: 7ec205920c
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1840414

Change-Id: Id54f17a60f31bdd54757580589ee4474711730f1
2021-09-29 21:11:48 +00:00
Yifan Hong
8268f6ea4a Merge "libsnapshot_fuzzer: allow ENXIO." am: d6fc145473
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1839713

Change-Id: Ibd14c26cf444f44ed9dcb9816aaf6a85afcf2945
2021-09-29 21:11:42 +00:00
Akilesh Kailash
7ec205920c Merge "snapuserd: Handle real time signal 36" 2021-09-29 21:04:41 +00:00
Yifan Hong
d6fc145473 Merge "libsnapshot_fuzzer: allow ENXIO." 2021-09-29 20:58:10 +00:00
Treehugger Robot
b5b5d89e50 Merge "Add VerifyMergeOps to ISnapshotWriter" am: 3ad79c8ff7
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1839413

Change-Id: Iedbf10d71ac80e6ab808d6f34e32677d2c6cc8e6
2021-09-29 20:19:33 +00:00
Treehugger Robot
3ad79c8ff7 Merge "Add VerifyMergeOps to ISnapshotWriter" 2021-09-29 20:06:40 +00:00
Max Bires
a1d675c1a8 Merge "Make RemoteProvisioner required for KeyMint cc_bin" am: 9eb326c9c0
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1809956

Change-Id: Iee982c0a6eb13c2e3089a9a293a91b4e6e08237f
2021-09-29 19:36:24 +00:00
Max Bires
9eb326c9c0 Merge "Make RemoteProvisioner required for KeyMint cc_bin" 2021-09-29 19:26:40 +00:00
Akilesh Kailash
8d3b31fe68 snapuserd: Handle real time signal 36
Add a signal handler for real time signal 36 which
is primarily used by profilers. Default action is to
terminate the daemon if there is no signal handler. We
don't want daemon to get terminated, hence just capture
the signal and ignore it.

Bug: 201497662
Test: cow_snapuserd_test, pkill -36 snapuserd
Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: Ife5a8bdb7344956076bc4223c19a126b90a00706
2021-09-29 17:35:49 +00:00
Stephen Crane
a9085181af storageproxyd: Retry RPMB request on UNIT ATTENTION
Attempts a retry of the intial write or read when an RPMB command
triggers a UNIT ATTENTION condition. This causes the UA status to be
reset and hopefully result in a successful command. This runs the risk
of retrying a successful write, but we wouldn't have been able to get
the RPMB response after that write anyway due to the UA condition.

Test: m storageproxyd
Bug: 200037389
Change-Id: Ib970e779365bb396756c114684c7f6e56a737ab1
2021-09-29 10:28:43 -07:00
Kelvin Zhang
8c77196a74 Add VerifyMergeOps to ISnapshotWriter
It turns out update_engine never gets a ICowReader instance... it only
gets a generic FileDescriptor. So bring this function all the way up to
ISnapshotWriter interface.

Test: th
Change-Id: I7d17b9537f97282c99203b5cc13892e5daa1be4c
2021-09-29 10:04:11 -07:00
Alexander Potapenko
53cd1e95e7 init.rc: disable creation of bootreceiver tracing instance for kernels >=4.9 and <= 5.4
The tracing instance takes extra RAM and is not needed on devices running older kernels.
Bug: 194156700
Test: manual on a Pixel device

Change-Id: I794062741688ebea0e4bc500723a966f8f646ee1
Signed-off-by: Alexander Potapenko <glider@google.com>
2021-09-29 15:01:55 +00:00
Jiyong Park
3b3d87de79 Don't create vendor_init in microdroid
vendor_init is a subcontext of init which is responsible for handling
the vendor-defined services and vendor-defined actions. This is mainly
to enforce the Treble architecture in which the vendor components are
provided with a less-privileged context than the system components
because they are less-trusted.

However, in case of microdroid, both the system and the vendor
partitions are from the same entity. As VMs don't have direct access to
any of the underlying hardware, the vendor partition is targeting the
virtual platform, not the real hw platform. There really is no need for
the discrimination.

This CL disables the creation of the vendor_init subcontext when init
runs in microdroid.

Bug: 201363575
Test: atest MicrodroidHostTestCases
Change-Id: Ie5e47d84e9e245565239b4f2159e8182b457699d
2021-09-29 21:35:08 +09:00
Nikita Ioffe
0a0e4793e3 Only run RebootTest under root
This test requires running test services, which causes test to crash
(and still incorrectly be reported as passing) when running on
non-rooted device.

Ignore-AOSP-First: reboot_test is not in AOSP yet
Bug: 190958734
Test: atest CtsInitTestCases
Merged-In: I3c5c9917d0a787d66272ccf4aefc57e6573841bc
Change-Id: I3c5c9917d0a787d66272ccf4aefc57e6573841bc
2021-09-29 21:34:59 +09:00
Nikita Ioffe
86b4324a0a Add reboot_test
This test spawns several services backed by /system/bin/yes executable,
and then stops them either while SIGTERM or SIGKILL.

Ideally we want to unit test more of reboot logic, but that requires a
bigger refactoring.

Test: atest CtsInitTestCases
Bug: 170315126
Bug: 174335499
Merged-In: Ife48b1636c6ca2d0aac73f4eb6f4737343a88e7a
Change-Id: Ife48b1636c6ca2d0aac73f4eb6f4737343a88e7a
2021-09-29 20:09:18 +09:00
Justin Yun
dfbdd93336 Define ro.vendor.api_level
ro.vendor.api_level will have the api_level that the vendor images
are required to implement based on the various api level properties.
ro.board.api_level and ro.board.first_api_level explicitly states
the api level of the vendor images for grf.
If these properties are not provided, it reads the device's launching
api level.
The rest of the properties may show the implemented api level of the
vendor images.

Bug: 200258600
Test: getprop ro.vendor.api_level
Change-Id: Id4131b53d6db00d5bbef3b048384d33c1736d681
2021-09-29 15:37:27 +09:00
Christopher Ferris
bb770d06c4 Merge "Add CHECK to verify assumptions in the code." am: bc6317592a
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1839573

Change-Id: If9f8249b98ecd8922c4fdfaa941505f4a78b218c
2021-09-29 04:10:42 +00:00
Yi-Yo Chiang
aff8d4b02c Merge "init_first_stage: Remove unused srcs & static libs" am: 15ae358c71
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1838538

Change-Id: I73b198ae080e3aa1aa35d6471905bcf8902653c7
2021-09-29 04:10:36 +00:00
Christopher Ferris
bc6317592a Merge "Add CHECK to verify assumptions in the code." 2021-09-29 03:58:07 +00:00
Yi-Yo Chiang
15ae358c71 Merge "init_first_stage: Remove unused srcs & static libs" 2021-09-29 03:56:11 +00:00
Yifan Hong
10e5e5979a libsnapshot_fuzzer: allow ENXIO.
This is an accepted error code.

Fixes: 170395454
Test: run fuzzer

Change-Id: I93862c44f434878a6e1a1ed15a94c92d4a60611b
2021-09-28 19:32:55 -07:00
Treehugger Robot
fcb59b8f72 Merge "Replace test_min_api_level with test_options.min_shipping_api_level" am: 2d7301d235
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1838539

Change-Id: Ic3fb2995766540a714bf83e665553cd999587060
2021-09-29 00:14:59 +00:00
Treehugger Robot
2d7301d235 Merge "Replace test_min_api_level with test_options.min_shipping_api_level" 2021-09-29 00:02:04 +00:00
Christopher Ferris
2b98c82f05 Add CHECK to verify assumptions in the code.
On the main thread, the siginfo pointer will never be nullptr.
Add a CHECK to make sure this is true.

Test: Unit tests pass both 32 bit and 64 bit.
Test: Ran with debug.debuggerd.translate_proto_to_text set to 0
Test: to exercise old path.
Change-Id: I9d5ed0de5d652de8a4f9cd85eb57cbb1ec676404
2021-09-28 16:15:51 -07:00
Treehugger Robot
4e8f468aa0 Merge "Add VerifyMergeOps() to CowReader interface" am: bd69a74677
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1838573

Change-Id: I3e47f0be10e64e3fe6613655ad02b582d8bf585a
2021-09-28 20:58:32 +00:00
Treehugger Robot
bd69a74677 Merge "Add VerifyMergeOps() to CowReader interface" 2021-09-28 20:45:54 +00:00
Yi-Yo Chiang
bc35e823e9 init_first_stage: Remove unused srcs & static libs
Test: Build pass
Change-Id: Id79ad1cf1e66c34c9ef24776c417f40286941bc7
2021-09-28 20:22:45 +08:00
Justin Yun
43678b17a5 Replace test_min_api_level with test_options.min_shipping_api_level
Test options for the api levels are moved to test_options.
test_min_api_level property will be removed with this change.

Bug: 187258404
Test: build
Change-Id: Id943566de2ac693b5955bd84a8463e5013a8bb0f
2021-09-28 20:35:09 +09:00
Kelvin Zhang
f2e1f20fd7 Add VerifyMergeOps() to CowReader interface
update_engine only sees ICowReader, so in order for update_engine to
consume this API, it has to be in the base interface class.

Test: th
Change-Id: I9100b6aa1db6eb6a884752620098172bdd51f200
2021-09-27 18:26:23 -07:00
David Anderson
2374bd48ed Add a test for bug 198265278.
This test uses dependency injection to cause a failure in
QuerySnapshotStatus. We expect ProcessUpdateState to return MergeFailed.
The test also checks that if the merge is attempted again, it can
succeed.

Some duplicated code has also been factored out into the test harness.

Bug: 198265278
Test: vts_libsnapshot_test gtest
Change-Id: I6ccb434afa0e5ebf6781b2cec5277e3b7c210b77
2021-09-27 17:29:45 -07:00
Liangcai Fan
d884ba5916 adds LO_FLAGS_AUTOCLEAR for loop device of zram backing device
Userdata spaces leak when zram writeback is enable and repeatedly kill
system_server(restart android).
The reason is that per_boot‘s inode is hold by loop device
although per_boot is deleted by user which become orphan inode in system.

Adds LO_FLAGS_AUTOCLEAR for loop device of zram backing device,
so loop device can release resouce.

Bug: 200904398

Change-Id: Ifeee9c0b58b10cdf7698077fbcaf54d5faccc3b1
Signed-off-by: Liangcai Fan <liangcai.fan@unisoc.com>
Signed-off-by: Hongyu Jin <hongyu.jin@unisoc.com>
Signed-off-by: Jing Xia <jing.xia@unisoc.com>
2021-09-26 10:07:50 +08:00
Christopher Ferris
f67a8e617f Merge "Disable scudo when using svelte config." am: be17619ccc
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1836204

Change-Id: I219350e1f5b3e255919653746f4f96d5f3a90c2a
2021-09-25 01:54:53 +00:00
Christopher Ferris
be17619ccc Merge "Disable scudo when using svelte config." 2021-09-25 01:36:48 +00:00
Treehugger Robot
8355803863 Merge "libsnapshot: Add function to verify merge sequence" am: 5125c62cf8
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1828972

Change-Id: I1fa3eba99bb5ffa119e0d8560179d98b00ac3312
2021-09-25 01:07:09 +00:00
Treehugger Robot
5125c62cf8 Merge "libsnapshot: Add function to verify merge sequence" 2021-09-25 00:50:49 +00:00