Commit graph

74735 commits

Author SHA1 Message Date
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
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
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
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
Bob Badour
4dee42af55 Merge "Add LOCAL_LICENSE_KINDS to system/core" am: 25bffff0cd
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1980148

Change-Id: Ibce989d10ee1ddf558da9fb76d3956b567ab5e14
2022-02-10 23:01:12 +00:00
Bob Badour
25bffff0cd Merge "Add LOCAL_LICENSE_KINDS to system/core" 2022-02-10 22:45:41 +00:00
Bob Badour
c9605e6ae1 Add LOCAL_LICENSE_KINDS to system/core
Added SPDX-license-identifier-Apache-2.0 to:
  fastboot/fuzzer/Android.bp
  fs_mgr/fuzz/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Change-Id: I3bb21e1af846d175a345c2a3a632dc47ecdd62de
2022-02-10 11:12:20 -08:00
Akilesh Kailash
4d3cab4c2d Merge changes I5458127b,Ib36bf44c,I481548e8,I449de193 am: 1aad41c3e7
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1977752

Change-Id: Ia971cab37bc0953f20c2cbb03b5d2b505f0782c6
2022-02-10 07:49:44 +00:00
Akilesh Kailash
1aad41c3e7 Merge changes I5458127b,Ib36bf44c,I481548e8,I449de193
* changes:
  libsnapshot: Propagate io_uring enablement to daemon
  snapuserd: Cut down worker threads
  snapuserd: Terminate daemon spin up during first stage init
  snapuserd: Avoid checking system properties when daemon launched from fist stage init and during selinux transition
2022-02-10 07:34:48 +00:00
Treehugger Robot
df9aea0e20 Merge "Make apex_available explicit" am: 2d0281307e
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1977809

Change-Id: Ibe707d8b2310f4b67cf7f6d65a4b296ca3ac0ac6
2022-02-10 06:31:43 +00:00
Treehugger Robot
2d0281307e Merge "Make apex_available explicit" 2022-02-10 06:13:13 +00:00
Akilesh Kailash
a0049a122d libsnapshot: Propagate io_uring enablement to daemon
During selinux init transition, system properties
are not yet enabled. Hence, store the io_uring feature
in snapshot.proto and propagate the same snapuserd
daemon

Bug: 214340811
Test: OTA
Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: I5458127b00946b5254d5c68d407ab525a0075cb9
2022-02-09 22:46:49 +00:00
Akilesh Kailash
1ab17cc2a1 snapuserd: Cut down worker threads
We don't need 4 threads per partition all the time.
Cut down to 1 thread for all purposes except during boot time.

During boot, we need multiple worker threads to serve
I/O's to speed up the booting process. For all other
purposes, single thread is sufficient. It will cut
down memory usage ~25MB.

Bug: 214340811
Test: OTA
Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: Ib36bf44c63676d3f3169fbda04b7fc3d1760cfbf
2022-02-09 21:26:27 +00:00
Akilesh Kailash
b7f0a04201 snapuserd: Terminate daemon spin up during first stage init
Bug: 214340811
Test: OTA
Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: I481548e878ff7ee5fdf7343fab961a1ded391634
2022-02-09 21:26:11 +00:00
Akilesh Kailash
d5f320193c snapuserd: Avoid checking system properties when daemon launched
from fist stage init and during selinux transition

Bug: 207298357
Test: OTA
Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: I449de1939531dbf3cc35e05c80e51237c4dc2b99
2022-02-09 21:25:59 +00:00
Kamaljeet Maini
3d246af81b Merge "Allow disabling AVB on special vbmeta partitions" am: a08ebb3086
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1618979

Change-Id: I56ab6a6702cccb3787460c57c792cb047db47d01
2022-02-09 20:24:59 +00:00
Kamaljeet Maini
a08ebb3086 Merge "Allow disabling AVB on special vbmeta partitions" 2022-02-09 19:58:56 +00:00
Ray Essick
94b8a000e4 Make apex_available explicit
Move the implicit allowing by modules from a list in the build
tools to explicit lines in the relevant module's Android.bp

Bug: 215589022
Test: build
Change-Id: Ifb93c0a6c4a1bd53a3ad505d27a83c513a98cad8
2022-02-09 11:37:19 -08:00
Treehugger Robot
0a8e5126ef Merge "libutils: Remove a little dead code" am: 4a39ba316f
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1977026

Change-Id: I7e478b252fbc5a2e79a3a9f307f2befe13c9c20b
2022-02-08 23:19:07 +00:00
Steven Moreland
55975b7e0a Merge "libutils -= libprocessgroup dep" am: a0542fb15f
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1975707

Change-Id: If5a1637c0e52fbe2f3e4c6669e2485fb67a6a4ca
2022-02-08 23:18:48 +00:00
Treehugger Robot
4a39ba316f Merge "libutils: Remove a little dead code" 2022-02-08 23:12:39 +00:00
Steven Moreland
a0542fb15f Merge "libutils -= libprocessgroup dep" 2022-02-08 23:03:06 +00:00
Paweł Grabas
ff9cfac08e Allow disabling AVB on special vbmeta partitions
The vbmeta partition might have additional prefix
(e.g., guest_vbmeta_a) on some virtual machine
environment. Allowing rewriting the disable-verity/
disable-verification bits in the vbmeta image upon
flash under such use case.

Bug: https://partnerissuetracker.corp.google.com/u/1/issues/181791553
Test: manual tests with different names of vbmeta partition
Change-Id: Iacadaf587fce1e1e7fef946f56bbfc7f4e8233d8
2022-02-08 22:40:06 +00:00
Treehugger Robot
c47400742e Merge "Revert "Revert "Use Apex sepolicy if it's available""" am: eb710bfa72
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1976607

Change-Id: I7af930c421923c0e2b982e88a60fc42e25125f32
2022-02-08 18:35:56 +00:00
Greg Kaiser
044be6bceb libutils: Remove a little dead code
With our recent change 0455a2c39c,
there's some logic that can be simplified to make this slightly
easier to read.

This CL does not change the behavior of this code.

Bug: 208895940
Test: TreeHugger
Change-Id: I4de2dbaf4406cbb7785df8839bb3ae453186ea69
2022-02-08 07:37:13 -08:00
Treehugger Robot
eb710bfa72 Merge "Revert "Revert "Use Apex sepolicy if it's available""" 2022-02-08 14:47:43 +00:00
Jeffrey Vander Stoep
baeece6d0c Revert "Revert "Use Apex sepolicy if it's available""
This reverts commit 5638fcc22b.

Reason for revert: Root cause of b/217252559 fixed.

Change-Id: I8d2fbf0cab23a56dbea1f422608097c48d9288c0
2022-02-08 12:42:33 +00:00