Commit graph

78397 commits

Author SHA1 Message Date
Krzysztof Kosiński
27bccbfdef Merge "storaged: Fix deprecated usages of protobuf API." 2022-09-30 00:31:19 +00:00
Jiyong Park
b2d8315f10 Merge "Annotate symbols correctly" 2022-09-28 01:22:45 +00:00
Akilesh Kailash
33081c0f90 Merge "snapuserd: Set taskprofile OtaProfiles" 2022-09-27 19:36:59 +00:00
Akilesh Kailash
2e780402e2 snapuserd: Set taskprofile OtaProfiles
Since update-engine already has this profile set,
it is better to have similar profile for the daemon
so that threads don't run at high priority.

Additionally, lower the nice value for worker
threads.

No change in the OTA install time observed.

Bug: 237490659
Test: Full OTA on Pixel
Change-Id: I53ec8c647eb781965792683b04621e6fec5eb5f2
Signed-off-by: Akilesh Kailash <akailash@google.com>
2022-09-27 19:36:49 +00:00
Pete Bentley
751cdc9489 Merge "Add AID for PRNG seeder daemon." 2022-09-26 21:27:42 +00:00
Pete Bentley
6cb61610e6 Add AID for PRNG seeder daemon.
Also adjust permissions on /dev/hw_random to allow prng_seeder group
read access.

Manual testing protocol:
* Verify prng_seeder daemon is running and has the
  correct label and uid/gid.
* Verify prng_seeder socket present and has correct
  label and permissions
* Verify no SELinux denials
* strace a libcrypto process and verify it reads seeding
  data from prng_seeder (e.g. strace bssl rand -hex 1024)
* strace seeder daemon to observe incoming connections
  (e.g. strace -f -p `pgrep prng_seeder`)
* Kill daemon, observe that init restarts it
* strace again and observe clients now seed from new instance

Bug: 243933553
Test: Manual - see above
Change-Id: I4d526844b232fc2a1fa5ffd701ca5bc5c09e7e96
2022-09-26 17:50:09 +01:00
Jiyong Park
eb7ec7b9e8 Annotate symbols correctly
Currently, tagging a symbol with #apex (# systemapi or # llndk) is not
required when the symbol is in a non-NDK library. However, this is
considered dangerous because such a symbol will automatically be
promoted to NDK APIs when the library is promoted to an NDK library.
When that happens, the native API council won't be able to notice the
promotion because promoting a non-NDK library into an NDK library
doesn't require an update of the map.txt file, but Android.bp only.

To prevent that, we should mandate those tags for Mainline APIs
regardless of whether the library the API belongs to is an NDK library
or not.

Upcoming changes in build/soong will enforce this. This change is to
prepare for the enforcement.

Note that this is a build-time only change. There's no behavior change
at runtime.

Bug: 184712170
Test: m
Change-Id: I769c5318e0cfd092f2f2b368f1a860065c79818f
2022-09-26 22:14:43 +09:00
Zhanglong Xia
8945a42a1e Merge "init.rc: create /data/misc/threadnetwork folder" 2022-09-26 04:20:54 +00:00
Krzysztof Kosiński
832b63e677 storaged: Fix deprecated usages of protobuf API.
Bug: 203713560
Test: presubmit
Change-Id: I49e78c7eb65a5a99c2e8c79633704d7e60db1e60
2022-09-25 08:18:20 +00:00
Treehugger Robot
3486f7bf43 Merge "Update janitors." 2022-09-23 21:48:30 +00:00
Elliott Hughes
b582e561a3 Update janitors.
Change-Id: I84c8104194df50d1c080a57dbf8d6f21bfb4e713
2022-09-23 20:16:03 +00:00
Treehugger Robot
173bc15585 Merge "Explicitly install RemoteProvisioner for keymint" 2022-09-23 00:46:20 +00:00
zhanglongxia
40e1666fb9 init.rc: create /data/misc/threadnetwork folder
This folder is used to store Thread network settings data files.

Bug: b/248145048
Test: /data/misc/threadnetwork is created.
Change-Id: I58eb3d814723c5f7acfbecef7f852d8e5336c975
2022-09-22 15:25:39 +08:00
Automerger Merge Worker
f2bbe1d91a Merge "Merge "Some device that platform base on android12 doesn't support A/B update, it looks virtual A/B is also not mandatory. so this test case should check ro.vendor.api_level first." into android13-tests-dev am: 9be0c7bbbc" 2022-09-21 21:31:56 +00:00
Treehugger Robot
c7d46a7b05 Merge "Some device that platform base on android12 doesn't support A/B update, it looks virtual A/B is also not mandatory. so this test case should check ro.vendor.api_level first." into android13-tests-dev am: 9be0c7bbbc
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2219604

Change-Id: I1e3dc03ad750eef1fa629f6cf8349259161e2ba2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-21 21:31:48 +00:00
Steven Moreland
f35d1a765d Merge "hidl2aidl: conversion of gatekeeper hidl to aidl" 2022-09-21 21:26:01 +00:00
Treehugger Robot
7d07586695 Merge "overlayfs: Fix -user build break" 2022-09-21 10:11:09 +00:00
Yi-Yo Chiang
602ac4b03c overlayfs: Fix -user build break
Bug: 241179247
Fixes: 247941706
Test: Treehugger
Change-Id: I2a7683014bb7c6f23a81a6d4b1199f19a8c184b9
2022-09-21 07:08:45 +00:00
Treehugger Robot
9be0c7bbbc Merge "Some device that platform base on android12 doesn't support A/B update, it looks virtual A/B is also not mandatory. so this test case should check ro.vendor.api_level first." into android13-tests-dev 2022-09-21 00:07:44 +00:00
Treehugger Robot
7cad2e8654 Merge "Fix module-file name collisions" 2022-09-20 23:24:20 +00:00
Jaegeuk Kim
4ae0eb0f86 Merge "fs_mgr: remove atgc mount option for zoned device" 2022-09-20 20:02:08 +00:00
Cole Faust
7e279e97a3 Fix module-file name collisions
Bazel doesn't allow a module and file with the same name.

Bug: 198619163
Test: Presubmits
Change-Id: I345086764071ca649de1ac11804e21675cd5e59d
2022-09-20 12:33:47 -07:00
David Anderson
2dcde2a36a Merge "remount: Remove unused errno propagation." 2022-09-20 18:23:29 +00:00
David Anderson
eec8932c35 Merge "remount: Remove errno interaction from fs_mgr_overlayfs_teardown." 2022-09-20 18:23:19 +00:00
Jaegeuk Kim
36755637ca fs_mgr: remove atgc mount option for zoned device
F2FS gives EINVAL when trying to mount zoned device with atgc. This patch
allows to keep the single fstab to support legacy and zoned devices at the
same time.

Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: I47a667443e7e60cb6729553b2ca24026e21fd90d
2022-09-20 10:07:18 -07:00
Treehugger Robot
4ea99506b0 Merge "Some device that platform base on android12 doesn't support A/B update, it looks virtual A/B is also not mandatory. so this test case should check ro.vendor.api_level first." 2022-09-20 08:13:28 +00:00
David Anderson
76dd810ecf remount: Remove unused errno propagation.
This removes all remaining save/restores of errno in
fs_mgr_overlayfs.cpp.

Bug: 241179247
Test: adb-remount-test.sh
Change-Id: I8bae6eb2752fe9460763455e88f9b82ad57c10e4
2022-09-19 22:30:06 -07:00
David Anderson
0aabcbc973 remount: Remove errno interaction from fs_mgr_overlayfs_teardown.
This patch eliminates errno as part of the return contract for
fs_mgr_overlayfs_teardown().

The non-standard use of implicit errno makes it extremely difficult to
reason about how these functions can fail. As it turns out,
fs_mgr_overlayfs_teardown has been consistently failing for a long time,
but in a place where errno isn't set, which meant "enable-verity" never
saw the failure.

The failure was originating from umount2(MNT_DETACH) which guaranteed
that DeleteBackingImage would fail with EBUSY, and DeleteBackingImage is
a binder call that doesn't set errno.

This patch switches to umount() and returns a "busy" status if the
unmount fails with EBUSY. In this case it will also disable the scratch
partition. There is a long-standing existing bug where, for non-VAB
devices, it will delete the underlying scratch partition off super. This
is pretty risky with MNT_DETACH, but that path is left unchanged here.

Some duplicated code in set-verity-state was refactored as well, since
the return value of fs_mgr_overlayfs_teardown is now more complex.

Bug: 241179247
Test: adb-remount-test.sh
Change-Id: I2ca75332b75a302622ba9b86d122a6f2accdda3e
2022-09-19 22:30:05 -07:00
Treehugger Robot
e18dd44fdb Merge "charger: fix secondary display not turning off after first display was off" 2022-09-20 04:52:18 +00:00
Jack Wu
20b8a015c0 charger: fix secondary display not turning off after first display was off
turn off both display after first display was turned off

Bug: 242967285
Test: charging animation can show in display correctly
Signed-off-by: Jack Wu <wjack@google.com>
Change-Id: Ie5741b49322aaf8a3750b1977fb203e4d0df3539
2022-09-20 02:53:16 +00:00
Treehugger Robot
44e21ec352 Merge "Remove Python enables identical to global defaults." 2022-09-19 16:39:57 +00:00
Subrahmanyaman
355e97773a hidl2aidl: conversion of gatekeeper hidl to aidl
Conversion of the gatekeeper hidl interface to stable aidl interface.

Bug: 205760843
Test: run vts -m VtsHalGatekeeperTarget
Change-Id: I7ca82780b1f834f00c3708dea55ac6500cd08c9c
2022-09-19 16:39:27 +00:00
Krzysztof Kosiński
519fdce310 Remove Python enables identical to global defaults.
Bug: 245854393
Test: presubmit
Change-Id: I67540844a28975f8f32539774748930907267764
2022-09-18 01:47:14 +00:00
biandonglei
9e7a73cf0c Some device that platform base on android12 doesn't support A/B update, it looks virtual A/B is also not mandatory. so this test case should check ro.vendor.api_level first.
test:
 run vts -m vts_ota_config_test -t VAB#Enabled

issue:
 245441425

Change-Id: I1795c931b28fd5fe28aa0f23717d4238fb352d37
2022-09-17 06:47:02 +00:00
biandonglei
bfd3e38284 Some device that platform base on android12 doesn't support A/B update, it looks virtual A/B is also not mandatory. so this test case should check ro.vendor.api_level first.
test:
 run vts -m vts_ota_config_test -t VAB#Enabled

issue:
 245441425

Change-Id: I1795c931b28fd5fe28aa0f23717d4238fb352d37
2022-09-17 06:44:46 +00:00
Florian Mayer
1ee1567b93 Merge "Do not use GetBoolProperty in signal handler" 2022-09-16 21:31:12 +00:00
Florian Mayer
094917deb7 Do not use GetBoolProperty in signal handler
This uses an std::string, which causes a heap allocation, which is not
async-safe.

Test: atest --no-bazel-mode permissive_mte_test
Change-Id: I4bd53d42d9a6a659abe62a964f14c81d9ec059d0
2022-09-16 12:01:40 -07:00
Inseob Kim
ed673496c2 Explicitly install RemoteProvisioner for keymint
This is effectively a no-op change; both packages are installed.
However, removing required and moving it to PRODUCT_PACKAGES cuts the
dependency from vendor modules to system-ext modules. This is needed for
vendor-only build test.

Test: build and see both packages are installed
Change-Id: I6620020a1eccfab08594c9be3b298611bd237f1d
2022-09-16 20:54:03 +09:00
Treehugger Robot
a67092a7b8 Merge "Updates the FB_COMMAND_SIZE from 64 to the linux max value of 4096 and updates the relevant unit tests." 2022-09-15 08:48:52 +00:00
Treehugger Robot
eed5e27c24 Merge "Fix the build with a newer LLVM." 2022-09-15 01:45:50 +00:00
Nicolas Gagnon
57ea923f30 Merge "Port ADB's new handling of the USB packet ClearFeature(HALT) to Fastboot." 2022-09-14 23:17:56 +00:00
Nicolas Gagnon
e21b7a552d Port ADB's new handling of the USB packet ClearFeature(HALT) to Fastboot.
This patch addresses Fastboot/Fastbootd connection issues seen on ARM Mac devices.

Original ADB patch: https://android-review.googlesource.com/c/platform/packages/modules/adb/+/1699250/

Bug: 238779161
Test: 'fastboot update <path_to_update_archive>.zip' now works on ARM Mac.

Signed-off-by: Nicolas Gagnon <nicolasgagnon@google.com>
Change-Id: Id67904d91abc8b66ef1a00962e1fd57c97df98a7
2022-09-14 21:11:30 +00:00
Elliott Hughes
b795d6fa4b Fix the build with a newer LLVM.
Unify all our "noinline" variants to the current most common one, not
least because the new [[noinline]] syntax is fussier about where it goes.

Test: treehugger
Change-Id: Icfcb75c9d687f0f05c19f66ee778fd8962519436
2022-09-14 20:16:25 +00:00
Florian Mayer
565305b852 Merge "[MTE] only upgrade to SYNC mode for MTE crashes" 2022-09-14 01:22:45 +00:00
Florian Mayer
d705c2dbcd [MTE] only upgrade to SYNC mode for MTE crashes
Bug: 244471804
Test: atest mte_ugprade_test on emulator
Change-Id: Ie974cf2dec96267012f1b01b9a40dad86551b1be
2022-09-13 15:35:07 -07:00
Christopher Ferris
16909c5fc7 Merge "Fix thread unwind in CallStack." 2022-09-13 21:14:02 +00:00
Bradley Furman
7518e8ba7e Updates the FB_COMMAND_SIZE from 64 to the linux max value of 4096 and
updates the relevant unit tests.

BUG=182864081

Test: Update the size check to the existing unit tests

Change-Id: I66b08884a5228e164c22c575a6f6c82a236fece2
2022-09-13 20:58:06 +00:00
Pete Bentley
39fee4c4c0 Merge "init: Add option to listen on sockets before starting service." 2022-09-13 11:32:27 +00:00
Treehugger Robot
8c8df2284b Merge "Explain how to get a tombstone proto." 2022-09-13 01:42:12 +00:00
Christopher Ferris
15fee82247 Fix thread unwind in CallStack.
The CallStack unwind of a different thread was broken since it
wasn't properly setting the tid value.

Fix this problem and add new unit tests to verify the behavior.

Bug: 246405269

Test: New unit tests pass.
Test: Ran unit tests for 1000 operations to verify not flaky.
Change-Id: I00342e6cdcdb4bcb68f29734dadee6c987c98040
2022-09-12 18:37:22 -07:00