Commit graph

73578 commits

Author SHA1 Message Date
David Anderson
0fa7c40c4c init: Add diagnostics for signalfd epoll failures.
Bug: 222441619
Test: inject failure with close, check for log messages
Change-Id: Ia18b88841779e230d00a6c47aaed4952b1444f85
2022-03-07 21:10:40 -08:00
Wei Wang
a323e0233d Merge "Support process path for WriteFileAction" 2022-03-01 00:06:57 +00:00
Treehugger Robot
8e4b2bfd5b Merge "Update to KeyMint & iRPC v2" 2022-02-28 21:46:00 +00:00
Shawn Willden
0485712141 Update to KeyMint & iRPC v2
Bug: 221390931
Test: run vts -m vts_treble_vintf_vendor_test
Change-Id: I1749439700f78433d31b52067edb32a031cc8777
2022-02-28 09:35:43 -07:00
Rick Yiu
9221b1eeae Support process path for WriteFileAction
Currently, there is no distinguish between SetTaskProfiles and
SetProcessProfiles in WriteFileAction because they use the same task
path. Add ProcFilePath attribute so that WriteFileAction could use
a separate path for process in SetProcessProfiles.

Bug: 218684257
Test: function works
Change-Id: I004b8c8799240c54f1ef1fed0566fa5057341cf4
2022-02-26 12:38:03 +00:00
Devin Moore
192b5569b0 Merge "Update init/README.md to mention bootconfig for androidboot argument" 2022-02-25 23:00:17 +00:00
Treehugger Robot
5a1f51b070 Merge "Fix OkOrFail<status_t> conversion ambiguities" 2022-02-25 21:15:57 +00:00
Atneya Nair
dde6034eac Fix OkOrFail<status_t> conversion ambiguities
OkOrFail<status_t> has specialized conversions for Result<int, StatusT>
to avoid ambiguous implicit conversion sequences. Since user conversion
operators sequences can be followed by integral promotion, specializing
for integral types is necessary.

Specialize ResultError<StatusT> so calling code() returns a status_t
instead of a StatusT and message() is implemented even when not carrying
a string.
Eventually, these classes should be combined.

Add equality operators for ResultError<StatusT>.

Bug: 219580167
Test: atest Errors_test.cpp
Merged-In: I14acecfd2aef33c40e79ddb091e2f4af9291d837
Change-Id: Ifb5ed3c2d3452b10901e4aeb19368d873225d9ce
2022-02-25 14:27:41 -05:00
Tri Vo
96686aaf60 Merge "Bumping the HAL client version." 2022-02-25 18:03:20 +00:00
Devin Moore
07ec259a54 Update init/README.md to mention bootconfig for androidboot argument
In Android S and later, androidboot.* kernel cmdline parameters are
moved to bootconfig instead the kernel cmdline. This includes the
androidboot.force_normal_boot.

Bug: 219951268
Test: N/A
Change-Id: Id0328ad09a34d654de9936e37a576a8a9f44de6c
2022-02-25 17:04:45 +00:00
Akilesh Kailash
806c29721a Merge "snapuserd: Fallback to synchronous I/O if any errors observed during async merge." 2022-02-25 00:58:19 +00:00
Akilesh Kailash
325e2acbb9 snapuserd: Fallback to synchronous I/O if any errors observed during
async merge.

If there are any I/O errors during async merge, we will
retry the I/O in synchronous I/O path. For this to happen,
we have to reset the iterator so that we replay the blocks
which were partially completed during async merge. Furthermore,
we will disable the async merge and continue to do the I/O
in synchronous path.

Additionally, cut down the queue depth to 8 so that
it will decerease the number of the async offload. We don't
want to have a big queue depth with async offload.

Bug: 220991038
Test: Instrument the code to fail the Async I/O's
randomly and make sure merge is completed. Instrumentation
was done both on readahead and merge code path.

Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: I0db6d0f46054ca5b8423201a598c726b2c3d21ac
2022-02-24 06:08:26 +00:00
Treehugger Robot
7a7c8e4607 Merge "Make task profiles easier to debug" 2022-02-24 02:27:55 +00:00
Treehugger Robot
df62d41eeb Merge "Provide alternate SE RoT provisioning path." 2022-02-23 18:13:01 +00:00
Tri Vo
7da30bd9f8 Merge "trusty: Convert Trusty driver tests to python_test" 2022-02-23 17:58:06 +00:00
Shawn Willden
0f89bc1270 Provide alternate SE RoT provisioning path.
On some devices it is infeasible to provision the KeyMint RoT bits in
the Android Bootloader.  This provides an alternate path to provision
them from the TEE during early boot.

Bug: 219076736
Test: VtsAidlKeyMintTargetTest
Change-Id: Ibae9050b9a102dad3710f9495d3dfa43fa1d1b3f
Merged-In: Ibae9050b9a102dad3710f9495d3dfa43fa1d1b3f
2022-02-22 23:51:15 -07:00
Tri Vo
ccc11f4969 trusty: Convert Trusty driver tests to python_test
Original tests are implemented as shell scripts here:
https://android.googlesource.com/trusty/vendor/google/aosp/+/refs/heads/master/scripts/test-map#100

Bug: 219992178
Test: trusty_driver_test
Change-Id: I8a55cb660bb0cb27bb4ef32aaa0658d0c17c36e3
2022-02-22 17:40:29 -08:00
Yi-yo Chiang
ae0f4d5e45 Merge "TransformFstabForDsu: Insert synthesised entry at end of mount group" 2022-02-20 05:33:41 +00:00
David Anderson
692c6d0f74 Merge "Add a VTS test for Virtual A/B." 2022-02-19 01:28:59 +00:00
David Anderson
7a5379d0e1 Merge "fs_mgr: Fix __ANDROID_RECOVERY__ usage in libfiemap." 2022-02-18 23:29:27 +00:00
David Anderson
36a4784681 Add a VTS test for Virtual A/B.
Bug: N/A
Test: vts_ota_config_test
Change-Id: Ibcee72dcbd9b8d157c3cc989d46fba6277115207
2022-02-18 14:16:44 -08:00
Treehugger Robot
1889a41c88 Merge "Add systrace tag for thermal" 2022-02-18 16:54:53 +00:00
Yi-Yo Chiang
6bcabc03d3 TransformFstabForDsu: Insert synthesised entry at end of mount group
The intention of inserting this synthesised mount entry is for the
FirstStageMount() procedure to eventually fallback to this entry if all
previous mount lines failed.
In order for FirstStageMount() to retry mount, the mount lines have to
be grouped together.
This change ensures that would happen and add test.

Bug: 220074274
Test: atest CtsFsMgrTestCases
Change-Id: Id042a6a6738d27c06a397ef7f4e0977907371c05
2022-02-18 23:00:25 +08:00
Colin Cross
86b6db0b0f Merge "Use sanitizer paths exported by make" 2022-02-18 03:39:26 +00:00
Bart Van Assche
f096bd2d24 Make task profiles easier to debug
Add support for querying the task profile and action names at runtime.
Log more information with verbose logging enabled. The additional
logging statements make it easier to verify whether changes in
task_profiles.json work as expected.

Bug: 213617178
Test: Booted Android in Cuttlefish.
Change-Id: I175e46d142bb015732b135952fdbeb9986f20ee3
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2022-02-18 03:06:30 +00:00
David Anderson
c2b2bf3539 Merge "remount: Create a bigger scratch partition on /data." 2022-02-18 01:56:27 +00:00
David Anderson
460886c175 Merge "fs_mgr: Don't allow dt fstabs in new devices." 2022-02-18 01:56:09 +00:00
David Anderson
fb921468ab fs_mgr: Fix __ANDROID_RECOVERY__ usage in libfiemap.
Certain code in libfiemap should be unreachable in recovery/ramdisk
builds, but whether intentionally or not, __ANDROID_RECOVERY__ is not
working in vendor_boot.

To make sure this is doing exactly what we want, use __ANDROID_RAMDISK__
instead.

Bug: 205987817
Test: build boot, vendor_boot, recovery
Change-Id: Id419f7d9068e791427a896c22569ae4543548df7
2022-02-17 13:06:13 -08:00
Colin Cross
21527e9794 Use sanitizer paths exported by make
The clang prebuilts now provide a single module with per-architecture
variants instead of a module per architecture, which means the module
name doesn't match the installed file name.  Use the file names
exported from Soong instead of the module names.

Bug: 220019988
Test: m out/target/produuct/coral/system/etc/sanitizer.libraries.txt
Change-Id: I12e7e988ce60d928987db8611883e67f2ecdee87
2022-02-17 11:19:48 -08:00
David Anderson
c1c05daac1 remount: Create a bigger scratch partition on /data.
When creating a scratch partition on /data, use either the size of
super, or half the free space on /data - whichever is smaller.

Bug: 213617068
Test: adb remount
Change-Id: If42fe9e1dc53d5a0137ace917a440232f70947fa
2022-02-17 11:11:07 -08:00
Peter Collingbourne
15a20e3906 Merge "Reland "Add a core configuration that disables the zygote."" 2022-02-17 18:37:21 +00:00
David Anderson
18c6157902 fs_mgr: Don't allow dt fstabs in new devices.
Bug: 214857162
Test: vts_fs_test
Change-Id: I69870fa632b01fdb411371cbb8c5b17271631395
2022-02-17 10:30:59 -08:00
David Anderson
035921dd17 Merge "fastbootd: Remove all scratch partitions on update-super." 2022-02-17 18:24:19 +00:00
Christopher Ferris
f3a800b1cc Merge "Dump threads in tombstone fallback path." 2022-02-17 17:04:55 +00:00
David Anderson
982c3410c7 fastbootd: Remove all scratch partitions on update-super.
This ensures that the dynamic "scratch" partition is removed when doing
a flashall operation.

If "scratch" is on /data, disable the partition. Add IsImageDisabled to
ImageManager so EnsureScratchMapped can skip mapping it. Also, fix
"scratch" not getting unmapped if on /data.

Bug: 205987817
Test: adb remount
      adb sync
      adb reboot fastboot
      fastboot flashall --skip-reboot # no errors
Test: adb-remount-test.sh
Change-Id: I4b9702e1dac15fb663635506fb50a8274e1e10d1
2022-02-17 04:16:53 +00:00
Christopher Ferris
b999b82eb7 Dump threads in tombstone fallback path.
When dumping a tombstone using the fallback path, only the main
thread was showing up. Modify the code to dump the threads using
a slightly different path for the tombstone generation code.

In addition, while looking at this code, two MTE variables were
not set in the tombstone fallback code. Added those variables
so MTE devices will work properly in this fallback path.

Modified the tombstone unit tests for seccomp to have
multiple threads and verify those threads show up in the tombstone.

Bug: 208933016

Test: Ran unit tests.
Test: Ran debuggerd <PID> on a privileged process and verified
Test: all threads dumped. Also verified that the tagged_addr_ctrl
Test: variable is present on the raven device.
Change-Id: I16eadb0cc2c37a7dbc5cac16af9b5051008b5127
2022-02-16 15:02:38 -08:00
Patrick Rohr
78b86ae297 Merge "Remove setCounterSet and deleteTagData support from libcutils" 2022-02-16 19:59:14 +00:00
Treehugger Robot
79aedde9b5 Merge "Disable Async merge. I/O failures seen on one specific device intermittently." 2022-02-16 08:50:36 +00:00
Akilesh Kailash
0cc213be87 Disable Async merge.
I/O failures seen on one specific device intermittently.

Bug: 219642530
Test: OTA
Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: I5b6fbfb13e40b15b25324b70efef11aede916596
2022-02-16 04:20:54 +00:00
Akilesh Kailash
7c63034fc0 Merge "Disable async merge writes until we figure out the intermittent I/O errors." 2022-02-16 01:47:39 +00:00
Treehugger Robot
5d1a87171f Merge changes I6fbbb329,I80a7c0a3
* changes:
  Introduce interface class IProfileAttribute
  Fix a race condition in Service::Start()
2022-02-16 00:11:56 +00:00
Peter Collingbourne
d22ff8a93a Reland "Add a core configuration that disables the zygote."
In targets that do not include a zygote binary, attempting to start the
zygote service will result in repeated service restarts. Avoid this by
providing a way for targets to opt out of declaring a zygote service.

The fvp_mini target does not have a zygote, so apply this opt-out to
that target.

Relanding after fixing breakage on an internal branch.

Bug: 217455793
Change-Id: Ic26f76142afb5f700bd7b12359d62feb2652b617
2022-02-15 16:03:35 -08:00
Akilesh Kailash
1a74a82d23 Disable async merge writes until we figure out the intermittent
I/O errors.

Bug: 219642530
Test: OTA

Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: Ica8e95394b92e6893c944676d28e05af2bde9a83
2022-02-15 23:22:04 +00:00
Bart Van Assche
4c99e96e2b Introduce interface class IProfileAttribute
This patch does not change any functionality but makes it easier to add
unit tests in a later patch.

Bug: 213617178
Test: Compile-tested only.
Change-Id: I6fbbb3297795c9d7ece8fb3263b3a9b0e5115b18
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2022-02-15 22:31:11 +00:00
Bart Van Assche
ee36ba39f9 Fix a race condition in Service::Start()
The SetTaskProfiles() call modifies cgroup attributes. Modifying cgroup
attributes can only succeed after the cgroups and cgroup attributes have
been created. Hence this patch that makes the child process wait until
the parent has finished creating cgroups and activating cgroup
controllers.

Bug: 213617178
Test: Without this patch the migration to the v2 hierarchy does not work reliably. With this patch applied, the migration to the v2 hierarchy works reliably.
Change-Id: I80a7c0a35453d8fd89ed798d077086aa8ba9ea17
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2022-02-15 22:31:09 +00:00
Treehugger Robot
efc9366188 Merge "Make crash_dump.policy a dependency of crash_dump." 2022-02-15 20:57:56 +00:00
Treehugger Robot
6236db23ca Merge "Declare license metadata for copied files." 2022-02-15 06:57:45 +00:00
Treehugger Robot
e261623906 Merge changes I22e6d914,Iabe7ecd9,I79bdb89e,I6a3cedc7
* changes:
  Make two error messages more detailed
  Use the 'override' keyword where appropriate
  Micro-optimize CgroupMap::ActivateControllers()
  Make class SetTimerSlackAction easier to maintain
2022-02-15 02:55:48 +00:00
Max Bires
b6179f25be Bumping the HAL client version.
This CL bumps the reported version for Trusty's
IRemotelyProvisionedComponent HAL interface for KeyMint. It also adds
the uniqueId field added to the RpcHardwareInfo in version 2.

Test: atest VtsHalRemotelyProvisionedComponentTargetTest
Change-Id: I336ec7cd12ca2ea3b836601ebe0ca400524b8ca4
2022-02-15 02:24:04 +00:00
Bart Van Assche
6e814b0eb2 Make two error messages more detailed
Provide context information to make it easier to map error messages to
the source code that reported these error messages.

Bug: 213617178
Test: Booted Android in Cuttlefish and verified the error messages in logcat.
Change-Id: I22e6d91476d91dcf32bafe5ead922e5652136584
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2022-02-15 00:09:34 +00:00