Commit graph

77685 commits

Author SHA1 Message Date
Lucas Wei
dc97f26ef9 fastboot: Add vendor_kernel_boot
Bug: 234474672
Bug: 214409109
Signed-off-by: Lucas Wei <lucaswei@google.com>
Merged-In: I8b0baa887e5e2309a1cb4a602fe8f6ca9e22526b
Change-Id: I60b7ec0c160d38e01b15ed547d51a2a007bfd7f5
2022-06-01 11:42:42 +08:00
TreeHugger Robot
10eb36887f Merge "storaged: Avoid divide-by-zero in performance measurement" into tm-dev am: 190e2bc6e1
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/18620177

Change-Id: I4489ef2286a2bb197056a0eb922a75ac3e4eadbd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-31 17:06:16 +00:00
TreeHugger Robot
190e2bc6e1 Merge "storaged: Avoid divide-by-zero in performance measurement" into tm-dev 2022-05-31 16:47:14 +00:00
David Anderson
346f3905f1 vts_fs_test: Require EROFS sysfs nodes. am: 5b227f3451
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/18636032

Change-Id: Ic976d0f6954342ab3eac142e6984918376769d8a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-27 21:45:07 +00:00
David Anderson
5b227f3451 vts_fs_test: Require EROFS sysfs nodes.
These were backported to android13-5.10 and should be present in
T-launch kernels.

Bug: 233926292
Test: vts_fs_test
Change-Id: Ifb5ff6a200b081fe8696d5803d4a128740eb8e21
Merged-In: Ifb5ff6a200b081fe8696d5803d4a128740eb8e21
Ignore-AOSP-First: cherry-pick
2022-05-27 19:01:59 +00:00
David Anderson
ad90b39ac6 Merge "Relax filesystem requirements in vts_fs_test." into tm-dev am: 0d3b8d557f
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/18625783

Change-Id: I82455225fc73dbc1fea68e16ed09da86a2b727fb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-27 05:25:44 +00:00
David Anderson
0d3b8d557f Merge "Relax filesystem requirements in vts_fs_test." into tm-dev 2022-05-27 04:55:28 +00:00
Hsin-Yi Chen
a60a8fff5b Merge "RESTRICT AUTOMERGE Ignore weak symbol difference in libutils ABI check" into tm-dev am: 3f2a2bf298
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/18603830

Change-Id: I2cd7c8dd7c5870cb51f4773a5cbe8fb0ac51c2d7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-27 03:20:08 +00:00
Hsin-Yi Chen
a61656de7b RESTRICT AUTOMERGE Ignore weak symbol difference in libutils ABI check am: c7d9320ca4
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/18603830

Change-Id: I5c4430e40c53d2d8e3a701a4a1868915de34bb60
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-27 03:20:03 +00:00
Hsin-Yi Chen
3f2a2bf298 Merge "RESTRICT AUTOMERGE Ignore weak symbol difference in libutils ABI check" into tm-dev 2022-05-27 02:59:01 +00:00
Matthew Duggan
84b7ca8d81 storaged: Avoid divide-by-zero in performance measurement
The code previously assumed that write() took a non-zero number of clock
ticks.  This is mostly true, but can't be guaranteed.  Add a check to
avoid crashing if it's 0.

Bug: 233008287
Test: Compile
Change-Id: Idec0052f534dc4abb81a414ca76f6c11f4a4dded
(cherry picked from commit 5a02a9bab9)
Merged-In: Idec0052f534dc4abb81a414ca76f6c11f4a4dded
2022-05-27 01:51:34 +00:00
David Anderson
0895d63952 Relax filesystem requirements in vts_fs_test.
Bug: 233926292
Test: vts_fs_test
Change-Id: I9665acebd6ebfde14e0cd76e8044e7ced9ffbeb3
Ignore-AOSP-First: cherry-pick from AOSP
2022-05-27 00:21:30 +00:00
Rubin Xu
3792ec2dd8 Add AID_SECURITY_LOG_WRITER am: 2cf162748f
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/18603801

Change-Id: I7640668416e47e8a931c5f7ac54ccc0581c9cc2a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-26 17:42:26 +00:00
Hsin-Yi Chen
c7d9320ca4 RESTRICT AUTOMERGE Ignore weak symbol difference in libutils ABI check
The diff_flags make the ABI checker ignore the weak symbol difference
caused by PGO.

Ignore-AOSP-First: This patch relaxes the ABI check for T only.
                   b/232982219 tracks the long-term solution.
Test: make libutils.vendor
Bug: 230076879
Change-Id: I8ec2c0f5a540263b4e8a0a4f9cf26f9c297593b5
2022-05-26 15:20:06 +08:00
Rubin Xu
2cf162748f Add AID_SECURITY_LOG_WRITER
A suppplementary group to mark which app can write to the security log
buffer. Granted via android.permission.WRITE_SECURITY_LOG and checked by
logd.

Bug: 232283779
Test: manual
Change-Id: I3ad66031ab1c9eef26db0f3e8968659dfa2855cb
(cherry picked from commit 7e14d138ae)
Merged-In: I3ad66031ab1c9eef26db0f3e8968659dfa2855cb
2022-05-25 20:54:35 +00:00
Christopher Ferris
c9ba5eaf54 Fix check for thread unwind. am: 2d5d46ca85
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/18596248

Change-Id: I4470db471380f6ecca9dfb1f06cbc8c73ae29045
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-25 18:41:48 +00:00
Christopher Ferris
2d5d46ca85 Fix check for thread unwind.
If a process requires executing fallback unwinder and the thread
crashing is not the main thread, the wrong unwinder is used.
Fix this case, and add a new unit test that causes an abort in
the non main thread.

Bug: 233721755

Test: New unit test passes with fix and fails without.
Test: Ran debuggerd on swcodec process and it still dumps all threads.
Change-Id: I70fffc5d680256ce867e7a1d427593b584259160
2022-05-24 21:31:03 -07:00
Steven Moreland
94e8cb1682 Merge "init: log services requested restart" into tm-dev am: b862059972
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/18447265

Change-Id: I16d806fd3dcad5936ef43534d7a2252cb9072a7c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-23 18:54:12 +00:00
Steven Moreland
b862059972 Merge "init: log services requested restart" into tm-dev 2022-05-23 18:28:02 +00:00
Akilesh Kailash
1ba9714583 libsnapshot: Initialize merge_op_start_ to zero. am: d36a68183c
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/18512862

Change-Id: I8db49bc8d5f2b920f7817c0f3e61456bd8c30a07
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-20 22:25:41 +00:00
Akilesh Kailash
d36a68183c libsnapshot: Initialize merge_op_start_ to zero.
merge_op_start_ is used to set the iterator for merge operations.
Uninitialized value can potentially lead to setting up
of bad iterator.

Bug: 233246309
Test: Full OTA
Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: I3cc48a66b532cfe8b2d87c8724d77ab3169a2ddb
Merged-In: I3cc48a66b532cfe8b2d87c8724d77ab3169a2ddb
2022-05-20 06:11:32 +00:00
David Drysdale
93f7ada2f6 KeyMint HAL: pass auth token on updateAad am: 986a2dd965
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/18457422

Change-Id: I3268e289311f24e8978b0ced17ec0c2ad816d881
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-19 11:08:12 +00:00
David Drysdale
986a2dd965 KeyMint HAL: pass auth token on updateAad
Bug: 230716629
Test: CtsVerifier with aosp/2077898 included
Change-Id: I2ba275718ef7ce6cc701ac2eb4a122639d7a4351
Merged-In: I2ba275718ef7ce6cc701ac2eb4a122639d7a4351
Ignore-AOSP-First: cherry-pick of aosp/2101110
2022-05-18 12:31:32 +01:00
Steven Moreland
9e0aae3683 init: log services requested restart
We have a case where a service is requested to be started and does
not appear to be running, but we see no indication that it is
actually starting. This log should be enough information to see
if init is in a bad state.

Bug: 232297944
Test: doesn't add too much spam
    ~/android/aosp/system/core/init :) adb logcat -d | grep "requested start" | wc -l
    42
Change-Id: Ic07f250c98b200b9e5b4432200c3668c6ca0ff35
Merged-In: Ic07f250c98b200b9e5b4432200c3668c6ca0ff35
2022-05-18 00:08:44 +00:00
Victor Hsieh
5ac82ea1a9 Make VMCompilationPerformance an aggregated profile with default am: b40fb113e7
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/18423662

Change-Id: I98c9a088c6eabccb12b9489992981081b4f2e498
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-17 22:55:00 +00:00
Victor Hsieh
b40fb113e7 Make VMCompilationPerformance an aggregated profile with default
The VMCompilationPerformance profile is used to run Isolated Compilation
in a Protected VM, normally during the device idle, where relevant
APEXes are staged.

The original VMCompilationPerformance introduced in aosp/2060891 does
not have any specific definition and requires vendors to customize it.
This change re-defines it as an aggregated profile with a default set of
existing profiles, so that performance can be reasonable by default.

This profile may be renamed to a more generic name later, e.g.
"SCHED_SP_COMPUTE".

Bug: 231437770
Test: Run `composd_cmd test-compile` on a local device.
      Before: 1m50s +/- 10s (with whatever that's default)
      After: 1m25s +/- 5s
Ignore-AOSP-First: cherry pick from aosp/2097065
Change-Id: Ib8cd65782c818474fb129efbd9ef9a3e23ad1eb3
Merged-In: Ib8cd65782c818474fb129efbd9ef9a3e23ad1eb3
2022-05-16 17:53:01 -07:00
TreeHugger Robot
da7b7aa978 Merge "Update the encryption rule of /data/bootanim to DeleteIfNecessary" into tm-dev am: 7e778c1350
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/18364895

Change-Id: I0b0e3c765cdc6c432f41c94f382260f31afa9b18
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-13 23:53:56 +00:00
TreeHugger Robot
7e778c1350 Merge "Update the encryption rule of /data/bootanim to DeleteIfNecessary" into tm-dev 2022-05-13 23:21:41 +00:00
Pete Bentley
c2b6179472 Remove setenvs when running boringssl_self_test. am: 8a9b9820e5
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/18375393

Change-Id: I9916b575d4846dd411951271d87c168e8d3bebfe
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-13 20:42:13 +00:00
Josh Yang
86b08e5efd Update the encryption rule of /data/bootanim to DeleteIfNecessary
Directories should always be encrypted unless there is a specific reason
they can't be.  /data/bootanim is unencrypted without a specific reason,
so fix it to be encrypted.  It is too late to use encryption=Require.
However, the contents of this directory doesn't need to be preserved on
updates, so we can use encryption=DeleteIfNecessary instead of
encryption=Attempt.

Bug: 232299581
Test: build succeeds
Change-Id: Iae80043f3957a053d47ab4754c42b1fdc8e696b3
Merged-In: I17bcb901ad533cada4e0aa061196fc94d7b213ec
2022-05-13 17:03:22 +00:00
Pete Bentley
8a9b9820e5 Remove setenvs when running boringssl_self_test.
No longer needed as the code to generate flag files based on
this environment variable is removed in Android 13.

Bug: 231946889
Test: Build and boot,
Change-Id: I8ce57619aa4d1e6457f3f864bf5e403f727c040c
(cherry picked from commit ba830eb81b)
Merged-In: I8ce57619aa4d1e6457f3f864bf5e403f727c040c
2022-05-13 17:42:53 +01:00
William Escande
387297b446 Set the aptx as provided by system am: e41474eae5
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/18337263

Change-Id: I1a3839e9a98c0122b324893dad218d4f1ac0857d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-12 23:39:19 +00:00
William Escande
e41474eae5 Set the aptx as provided by system
Aptx and aptx-Hd are both vendor libs in system_ext.
In order to load their dependencies from a compatible environement
Bluetooth need to setup the linker

Fix: 231967310
Test: atest net_test_stack_a2dp_native
Test: Log analyze after bluetooth boot
Tag: #refactor
Ignore-AOSP-First: Apex only on tm and below
Change-Id: I752e65889a42fe3378f51bd0821c2958ed9b5a7d
2022-05-11 21:14:41 -07:00
Suren Baghdasaryan
5441a80446 Merge changes from topic "228160715_fix" into tm-dev am: e31c7a17e5
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/18090771

Change-Id: I57f66433d40274f0535e31c0550884744df4636e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-04 16:33:18 +00:00
Suren Baghdasaryan
f98610b808 libprocessgroup: Add a function to remove only empty process groups am: 6761b6dcdc
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/18090770

Change-Id: I45e4f502cdf958c26b22370b43c7c8215c18fde9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-04 16:33:17 +00:00
Daeho Jeong
ecbfa8618e Merge "init.rc: increase readahead window multiplier for POSIX_FADV_SEQUENTIAL files" into tm-dev am: bc752d279f
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/18124890

Change-Id: Ief7ea0473d998e8ce302dafd802d1e4a99ec9098
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-04 16:31:24 +00:00
Suren Baghdasaryan
e31c7a17e5 Merge changes from topic "228160715_fix" into tm-dev
* changes:
  init: Purge empty process groups on zygote restart
  libprocessgroup: Add a function to remove only empty process groups
2022-05-04 15:58:58 +00:00
Daeho Jeong
bc752d279f Merge "init.rc: increase readahead window multiplier for POSIX_FADV_SEQUENTIAL files" into tm-dev 2022-05-04 15:37:48 +00:00
Jaegeuk Kim
b9d00c445b Shutdown f2fs to avoid fsck am: 7e0df03bc9
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/18095143

Change-Id: Ib8760b2d14a3e852cc4b001b9edf0b381ba605d8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-04 01:49:50 +00:00
Suren Baghdasaryan
870725ac14 init: Purge empty process groups on zygote restart
When system_server crashes or gets killed, it causes zygote to kill
itself, which in turn leads to killing all processes in the same
process group (all apps). This leaves empty process groups because
system_server is not there to remove them.
Purge empty process groups when init detects zygote death.

Bug: 228160715
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I0ce27eea28f8713e52033bbec2d5363a7b8ff5db
Merged-In: I0ce27eea28f8713e52033bbec2d5363a7b8ff5db
2022-05-04 00:44:47 +00:00
Suren Baghdasaryan
6761b6dcdc libprocessgroup: Add a function to remove only empty process groups
When system_server and zygote crash or get killed, all apps also get
killed but their process groups are left empty. Provide a function to
remove all empty process groups so that init can purge them when this
even happens.

Bug: 228160715
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Ife38ca021e80cd38106f218ae13183e8c2631bf0
Merged-In: Ife38ca021e80cd38106f218ae13183e8c2631bf0
2022-05-04 00:44:39 +00:00
Daeho Jeong
2a7bd96c19 init.rc: increase readahead window multiplier for POSIX_FADV_SEQUENTIAL files
Set readahead window multiplier for POSIX_FADV_SEQUENTIAL files as 16 to
enhance file read performance like a language package loading.

Bug: 192011293
Test: adb shell cat /dev/sys/fs/by-name/userdata/seq_file_ra_mul
Signed-off-by: Daeho Jeong <daehojeong@google.com>
Change-Id: I7f7e4339651be2d6aa99b07bcb12ab62136a940e
Merged-In: I7f7e4339651be2d6aa99b07bcb12ab62136a940e
2022-05-02 10:52:11 -07:00
TreeHugger Robot
03f6f875d5 Merge "Delete stale Virtualization image files" into tm-dev am: a5867617af
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/18029202

Change-Id: I860189af577549b19bfd122cc7400e8b3da5771d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-02 17:33:08 +00:00
Jaegeuk Kim
7e0df03bc9 Shutdown f2fs to avoid fsck
Bug: 229406072
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: Id3b27219ab2a4655f1740829b0f03f027e66349d
Merged-In: Id3b27219ab2a4655f1740829b0f03f027e66349d
2022-04-29 20:17:40 +00:00
TreeHugger Robot
a5867617af Merge "Delete stale Virtualization image files" into tm-dev 2022-04-29 08:09:24 +00:00
Elliott Hughes
d02ad10144 Merge "libutils: clearer abort on overflow." into tm-dev am: c94d40e4a8
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/18011602

Change-Id: I02f8128ff78baf4954bcb5e82304831592a48b49
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-28 16:39:56 +00:00
Elliott Hughes
c94d40e4a8 Merge "libutils: clearer abort on overflow." into tm-dev 2022-04-28 15:52:30 +00:00
Alan Stokes
34ee0c931c Delete stale Virtualization image files
Delete all files and directories under
/data/misc/virtualizationservice at boot. Originally they were owned
by the virtualizationservice user; we now run as system, and don't
have permission to remove them after boot.

Bug: 230056726
Test: Create fake stale dir+file, see them deleted
Ignore-AOSP-First: Needed in T, will CP to aosp
Change-Id: I5ff7d055aeeb25ba7693e50876d6b8a830c4bf51
2022-04-28 10:57:36 +01:00
Jooyung Han
ad56552398 Unshare mount namespace in bootchart's thread am: 1f85546be5
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/17994482

Change-Id: I343cddbb8c78b44600e611c73fcb98afc0d0e093
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-28 00:51:44 +00:00
Elliott Hughes
b10bf63c93 libutils: clearer abort on overflow.
Let's turn a bug into a feature... Since this code is built with intsan,
anyone who caused overflow here will have had an abort, so we know
no-one actually needs the BAD_INDEX return that was presumably the
original author's intent. So let's just mandate that, since it's a lot
harder to ignore an abort than it is to ignore an error return.

Bug: http://b/179044558
Test: treehugger
Change-Id: I08f1018f9da1e09de885699138b7543d55bb2a36
(cherry picked from commit a5f2e4d421)
Merged-In: I08f1018f9da1e09de885699138b7543d55bb2a36
2022-04-28 00:25:25 +00:00