Commit graph

74809 commits

Author SHA1 Message Date
Peter Collingbourne
a18742903a Merge "Reland "Add a core configuration that disables the zygote."" am: 15a20e3906
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1986874

Change-Id: I338f8826f27a4508bc572fc38940454c038454d4
2022-02-18 21:12:47 +00: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
bb0888e968 Merge "fastbootd: Remove all scratch partitions on update-super." am: 035921dd17
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1978058

Change-Id: I93252a4ada9e9f7e8a7ef192d9cf3dd86a8b851e
2022-02-18 02:25:08 +00:00
Christopher Ferris
2d9bbfd765 Merge "Dump threads in tombstone fallback path." am: f3a800b1cc
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1981146

Change-Id: I426bf4001180feb14be3c64e6d326f63f0e2aec4
2022-02-18 02:24:15 +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
1a586628dd Merge "Remove setCounterSet and deleteTagData support from libcutils" am: 78b86ae297
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1968440

Change-Id: I1a442c890e39bd69554b453890e79d907a71bd71
2022-02-16 20:35:22 +00:00
Patrick Rohr
78b86ae297 Merge "Remove setCounterSet and deleteTagData support from libcutils" 2022-02-16 19:59:14 +00:00
Treehugger Robot
3f0fb46ac2 Merge "Disable Async merge. I/O failures seen on one specific device intermittently." am: 79aedde9b5
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1987070

Change-Id: I30a39ca4b0785f71c7bd48ec954a9f53d4e6f71f
2022-02-16 12:57:45 +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
54a77076ce Merge "Disable async merge writes until we figure out the intermittent I/O errors." am: 7c63034fc0
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1987186

Change-Id: If0702275c0341e32b380c330a13ff7af03a20a34
2022-02-16 04:43:48 +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
7bb209eb43 Merge changes I6fbbb329,I80a7c0a3 am: 5d1a87171f
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1972101

Change-Id: Id74f4841d43273db27686438d5b7b91885ce577e
2022-02-16 00:23:44 +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
32165ac246 Merge "Make crash_dump.policy a dependency of crash_dump." am: efc9366188
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1970079

Change-Id: Ic29d6ac3a7f1ae816fa0bc4278823407b791afb5
2022-02-15 21:14:46 +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
7b7d9af89b Merge "Declare license metadata for copied files." am: 6236db23ca
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1984869

Change-Id: I8ea8eb445d479892556b8483b3452a81ef76cde2
2022-02-15 07:13:41 +00:00
Treehugger Robot
6236db23ca Merge "Declare license metadata for copied files." 2022-02-15 06:57:45 +00:00
Treehugger Robot
61a4f3c50e Merge changes I22e6d914,Iabe7ecd9,I79bdb89e,I6a3cedc7 am: e261623906
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1972100

Change-Id: Ic52714c3756902e91e894c0d063591955a422344
2022-02-15 03:13:06 +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
Bart Van Assche
6856cfcb21 Use the 'override' keyword where appropriate
This patch implements the following advice from the Google C++ Style
Guide: "Explicitly annotate overrides of virtual functions or virtual
destructors with exactly one of an override or (less frequently) final
specifier. Do not use virtual when declaring an override. Rationale: A
function or destructor marked override or final that is not an override
of a base class virtual function will not compile, and this helps catch
common errors. The specifiers serve as documentation; if no specifier is
present, the reader has to check all ancestors of the class in question
to determine if the function or destructor is virtual or not."

Bug: 213617178
Test: Booted Android in Cuttlefish.
Change-Id: Iabe7ecd91a2c09a77922c60ff4a00314da509d4a
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2022-02-15 00:09:34 +00:00
Bart Van Assche
8923d72252 Micro-optimize CgroupMap::ActivateControllers()
The C++ string concatenation operator is inefficient because it always
allocates a new string, even in cases where std::string::apppend() does
not allocate a new string. Hence this patch that replaces string
concatenation with a call to std::string::append().

Bug: 213617178
Test: Booted Android in Cuttlefish.
Change-Id: I79bdb89e957d3cfb40e48ef00c3e5576b4f533a5
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2022-02-15 00:09:34 +00:00
Bart Van Assche
20d59bd21b Make class SetTimerSlackAction easier to maintain
Unify the Darwin and Linux class declarations. Move all #ifdefs for this
class into the .cpp file. This patch does not change any functionality.

Bug: 213617178
Test: Booted Android in Cuttlefish.
Change-Id: I6a3cedc75c2dbf8aa062edda76cae9959767a763
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2022-02-15 00:09:34 +00:00
Xin Li
d6fb581b00 Skip SP2A.220305.012
Bug: 219523960
Merged-In: I86c2de977de052bfe9dcdc002dcbd9026601d0f3
Change-Id: I9f49eae1e6038aec5acaf0d309ed7365ba1e6620
2022-02-14 20:07:20 +00:00
TeYuan Wang
5ad0a9f864 Add systrace tag for thermal
Bug: 218939123
Test: build
Change-Id: Id899df349e83fa7bf4d962e88d683488632df702
2022-02-14 15:13:45 +08:00
Bob Badour
3332e2127a Declare license metadata for copied files.
Bug: 151177513

Test: m nothing reportmissinglicenses
Change-Id: I2d06c042e41eda55930ea3b49efd9f27e35bc520
2022-02-12 21:20:41 -08:00
TreeHugger Robot
d1280484a6 Merge "Empty merge of sc-v2-dev-plus-aosp-without-vendor@8084891" into stage-aosp-master 2022-02-11 15:20:37 +00:00
Xin Li
3435c5f555 Empty merge of sc-v2-dev-plus-aosp-without-vendor@8084891
Bug: 214455710
Merged-In: Ibbfdf8a4b771bd7520ecbaaf15a1153d6bf0e599
Change-Id: Id679b442831c22f6a9a2e593eb580cd9802dc51c
2022-02-11 06:17:34 +00:00
Treehugger Robot
8fb7b0d0dd Merge "Update ro.vendor.api_level for non-GRF devices" am: 075b6d725e
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1981186

Change-Id: Id9a5e81b98829ea886a374276d4b5be4ac0b4142
2022-02-11 06:13:16 +00:00
Treehugger Robot
075b6d725e Merge "Update ro.vendor.api_level for non-GRF devices" 2022-02-11 05:50:15 +00:00
Justin Yun
d1e4f7d157 Update ro.vendor.api_level for non-GRF devices
Non-GRF devices must read only the `ro.product.first_api_level` but
not the vendor build version because `ro.product.first_api_level` is
always less than or equal to `ro.vendor.build.version.sdk` for
non-GRF devices.

Bug: 218610653
Test: getprop ro.vendor.api_level
Change-Id: Ib98c33ae052daa949208c43bd441f98cf442da49
2022-02-11 09:44:31 +09:00