Commit graph

73528 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
Alexander Potapenko
9cd1815798 Merge "Added AID for the new dmesgd" 2022-02-08 11:18:27 +00:00
Treehugger Robot
45df56880c Merge "system_dlkm: Allow overlayfs mount for user build" 2022-02-08 06:50:14 +00:00
Treehugger Robot
82b74d6f15 Merge "libutils: don't call SetTaskProfiles around priority" 2022-02-08 05:52:22 +00:00
Ramji Jiyani
023d897961 system_dlkm: Allow overlayfs mount for user build
Bug: 200082547
Test: Verification of overlayfs entries with below
      1. adb root && adb remount && adb reboot
      2. adb shell mount | grep system_dlkm
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
Change-Id: I3fae1fcc6bba81795d6646c10d9fb9552ead8370
2022-02-08 02:13:33 +00:00
Steven Moreland
39fc18b0cd libutils -= libprocessgroup dep
:)

This pulls in quite a few things into a lot of processes. Removing it
separately, in case the use of SetTaskProfiles needs to be reverted,
removing this as well might cause that revert to have linker errors
if new static users of libutils are introduced in the meantime.

Bug: 208895940
Test: build
Change-Id: Iaf5b5d41328c1b1f50bb32be8a6a1bd3a0c3f22f
2022-02-08 01:56:45 +00:00
Tim Murray
0455a2c39c libutils: don't call SetTaskProfiles around priority
Threads should always be in the same state as their parents. This also
implies that the additional SetTaskProfiles is unnecessary when
creating a new thread.

Test: boots, TH
Bug: 208895940
Change-Id: Id971c6e87d342a695bea106cdd258bc0ef6f7ecb
2022-02-08 01:54:09 +00:00
David Anderson
4b7400756c Merge "fs_mgr: Add VTS tests for EROFS." 2022-02-07 18:38:40 +00:00
Jordan Demeulenaere
13041ef021 Merge "Revert "Add a core configuration that disables the zygote."" 2022-02-07 14:53:40 +00:00
Alexander Potapenko
585a214741 Added AID for the new dmesgd
Bug: 215095687
Test: m -j dmesgd
Change-Id: Iee3a1a644115c7808ca545ca8d22cd783a2be114
2022-02-07 13:54:21 +01:00
Jordan Demeulenaere
09dacde8ab Revert "Add a core configuration that disables the zygote."
Revert "Add a core configuration that disables the zygote."

Revert submission 1964759-master-I4f918502e611e950fa039e4e2ed817c97b928ba2

Reason for revert: b/217993447
Reverted Changes:
I4f918502e:Add a core configuration that disables the zygote....
I4f918502e:Add a core configuration that disables the zygote....
I4f918502e:Add a core configuration that disables the zygote....

Change-Id: I9dc73c6338ed158bd712324b99ae9e3cd4a36424
2022-02-07 09:05:29 +00:00
Treehugger Robot
a1a2c257f3 Merge "Add a core configuration that disables the zygote." 2022-02-04 23:52:33 +00:00
David Anderson
3de5c2c25d fs_mgr: Add VTS tests for EROFS.
Bug: 211775434
Test: vts_fs_test
Change-Id: I438efe110bb388c28b47753501168449fcb8fbe5
2022-02-03 14:47:47 -08:00
Treehugger Robot
848fe8abea Merge "system_dlkm: add unguarded mount point" 2022-02-02 22:04:51 +00:00
Ramji Jiyani
273c0184b1 system_dlkm: add unguarded mount point
Always create system_dlkm mountpoint like
vendor_dlkm and odm_dlkm; as some CF mixed
tests are using the dynamic partition to boot
with builds with no system_dlkm which causes
avd boot failures.

Bug: 217511547
Test: TH
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
Change-Id: Ibf32127df22898706db02400addaa0f1193c105c
2022-02-02 19:45:22 +00:00
Treehugger Robot
c75044d639 Merge changes from topic "system_dlkm_dynamic"
* changes:
  system_dlkm: Fix flag for mount point guard
  system_dlkm: load property for dynamic partition
2022-02-02 06:04:07 +00:00
Ramji Jiyani
86175ef960 system_dlkm: Fix flag for mount point guard
Replace /system_dlkm mount guard flga from
BOARD_USES_SYSTEM_DLKM_PARTITION to
BOARD_USES_SYSTEM_DLKMIMAGE. board_config.mk
and other tools are using this format of image
name to auto generate code to prevent duplication.

Bug: 200082547
Test: TH
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
Change-Id: Ie4dc899509cf42afb553936e6dbf69d5ce234d01
2022-02-02 02:34:46 +00:00
Ramji Jiyani
8431328d96 system_dlkm: load property for dynamic partition
Load from: /system_dlkm/etc/build.prop

Bug: 200082547
Test: TH
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
Change-Id: I9c34c44fc969107b215c05ed9b0ed779683a30b6
2022-02-02 02:34:46 +00:00
David Anderson
ed54a2f2be Merge "libfiemap: Add a helper to verify image fiemaps." 2022-02-01 22:43:46 +00:00
Jeffrey Vander Stoep
2e7bc19fc2 Merge "Revert "Use Apex sepolicy if it's available"" 2022-02-01 12:42:11 +00:00
Jeffrey Vander Stoep
5638fcc22b Revert "Use Apex sepolicy if it's available"
Revert "Build precompiled_sepolicy.apex_sepolicy.sha256"

Revert submission 1965099-precompiled-apex-sepolicy

Reason for revert: Boot regression b/217252559
Reverted Changes:
I2dbe43e32:Use Apex sepolicy if it's available
Bug: 217252559

Change-Id: I1cca3a1ae833c21619de26b2610736170ec5463c
2022-02-01 11:21:38 +00:00
Treehugger Robot
d15b09f187 Merge "init: remove debug logging." 2022-01-31 23:54:48 +00:00
Christopher Ferris
e882aa841b Merge "Fix typo." 2022-01-31 23:05:41 +00:00
Ken Chen
d30232369d Merge "[NETD-BPF#27] Require libnetd_updatable.so from APEX" 2022-01-31 22:48:06 +00:00
Christopher Ferris
16a7bc2355 Fix typo.
Change use of new_ to old_ to save the old sigaction data. This hasn't
caused any issues, but it's obviously wrong.

Test: Ran unit tests on coral.
Change-Id: I96be5b0980c323c3aeafb422fbc06202577604a2
2022-01-31 13:08:54 -08:00
Elliott Hughes
0305cf0f19 init: remove debug logging.
I think this was left in by accident?

Test: treehugger
Change-Id: Ie954efe33f1f811f58c9df4934d50caf0f79e0ea
2022-01-31 13:03:29 -08:00