Commit graph

78386 commits

Author SHA1 Message Date
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
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
Elliott Hughes
df2e7eb3cc Explain how to get a tombstone proto.
There's a link here from the javadoc, but a link to the javadoc from
here seems like a good idea.

Test: N/A
Change-Id: I89a29f72d086d08174e72f7d0aa0421fe417f733
2022-09-12 22:24:18 +00:00
Automerger Merge Worker
61c82abe24 Merge "Merge "libsnapshot: Remove flaky image creation test." into android13-tests-dev am: 220d4aba05" 2022-09-12 18:31:04 +00:00
David Anderson
430867e7cc Merge "libsnapshot: Remove flaky image creation test." into android13-tests-dev am: 220d4aba05
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2190056

Change-Id: I91ca9d97ba751e292dd8f68188470ab6735e68eb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-12 18:31:00 +00:00
Adam Langley
ecc14a5958 init: Add option to listen on sockets before starting service.
Review note: Original change was a p-o-c by agl in
https://r.android.com/2094350 which I think is actually
production quality.  I'm just taking it over so that he doesn't
get spammed by any review comments as that's not a good use
of his time.

Needed for the hardware entropy daemon (see bug).

Original commit message:
If one needs to create a service that synchronously starts listening on
a socket then there are currently no good options.

The traditional UNIX solution is to have the service create the socket
and then daemonise. In this situation, init could start the service with
`exec_start` and yet not block forever because the service forks and
exits. However, when the initial child process exits, init kills the
daemon process:

> init: Killed 1 additional processes from a oneshot process group for
> service 'foo'. This is new behavior, previously child processes
> would not be killed in this case.

Next, there is a `socket` option for services and (although the
documentation didn't nail this down), the socket is created
synchronously by `start`. However, init doesn't call `listen` on the
socket so, until the service starts listening on the socket itself,
clients will get ECONNREFUSED.

This this change adds a `+listen` option, similar to `+passcred` which
allows a socket service to reliably handle connections.

Bug: 243933553
Test: Started prng_seeder from init using the new listen flag
Change-Id: I91b3b2b1fd38cc3d96e19e92b76c8e95788191d5
2022-09-12 15:16:35 +01:00
Suren Baghdasaryan
633ce78b94 Merge "init: Change extra_free_kbytes.sh to add margin relative to the default watermark level" 2022-09-09 16:55:25 +00:00
Deyao Ren
2880afb77f Merge "Clean up services created after running test" 2022-09-09 16:20:31 +00:00
deyaoren@google.com
909bc47536 Clean up services created after running test
Services created during new tests weren't properly cleaned up after tests. It caused slowdown of subsequent tests as described in b/244486404.
This change kills/terminates services after test with apex services.

To provide some context, original change is at https://android-review.googlesource.com/q/topic:vapex_stop_service. The issue was discovered by android test monitor and filed as a P0 bug.

Bug: 244486404
Change-Id: Ie64e0eb1686e94ef543a457ea49d1d7aeab38c97
2022-09-09 04:15:26 +00:00
Spandan Das
a23b5467dc Merge "Declare the headers of the ndk_library" 2022-09-08 23:53:18 +00:00
Spandan Das
9b4bc28b43 Declare the headers of the ndk_library
This creates a dependency edge between the ndk_library and its headers,
which should be a no-op in regular Soong builds. This dependency edge
will be used in the Multi-tree project to export the relevant .h files into a well
known location

Test: m nothing
Bug: 239044713
Change-Id: I374b1529456c4c71ac419b4684f2fd215c68e791
2022-09-08 21:59:20 +00:00
David Anderson
0dfbdc5bdb Merge "vts_libsnapshot_test: Fix test flakiness." 2022-09-08 19:44:05 +00:00
Suren Baghdasaryan
cfd8864f9a init: Change extra_free_kbytes.sh to add margin relative to the default watermark level
extra_free_kbytes.sh accepts a parameter representing the number of KB
to add to low and high watermarks. It adds this margin to the current
watermark levels, however this is not how /proc/sys/vm/extra_free_kbytes
knob that it replaces used to work. The old knob would add the margin
relative to the original and not the current level of the watermarks.
Change extra_free_kbytes.sh to add the specified margin to the original
watermark levels to act as correct replacement of the old knob.

Bug: 242837506
Fixes: 642048d969 ("init: Add extra_free_kbytes.sh script to adjust watermark_scale_factor")
Test: repeatedly run 'setprop sys.sysctl.extra_free_kbytes 30375'
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I8af603ba00bd4fb8182b80b3c0969fa96cdd7311
2022-09-08 19:34:43 +00:00