Commit graph

77755 commits

Author SHA1 Message Date
Treehugger Robot
4bdbd24b22 Merge "init: Disable 'on' for non-Vendor APEXes" am: 8b3dff3e82 am: bff647cabd
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2101572

Change-Id: I766637091cfbf9b74905f99653d39b9d5c1c201a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-24 14:11:59 +00:00
Treehugger Robot
bff647cabd Merge "init: Disable 'on' for non-Vendor APEXes" am: 8b3dff3e82
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2101572

Change-Id: I29039ae588c79e76e248e1a8627cbe5e14e8e708
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-24 13:53:05 +00:00
Treehugger Robot
8b3dff3e82 Merge "init: Disable 'on' for non-Vendor APEXes" 2022-05-24 13:35:04 +00:00
Steven Moreland
686419e943 [automerger skipped] Merge "init: log services requested restart" into tm-dev am: b862059972 -s ours
am skip reason: Merged-In Ic07f250c98b200b9e5b4432200c3668c6ca0ff35 with SHA-1 61169c76dd is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/18447265

Change-Id: I68405dc21971062490f95dba7204f2d7e099dec9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-23 18:52:42 +00:00
Steven Moreland
826ed616a4 [automerger skipped] init: log services requested restart am: 9e0aae3683 -s ours
am skip reason: Merged-In Ic07f250c98b200b9e5b4432200c3668c6ca0ff35 with SHA-1 61169c76dd is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/18447265

Change-Id: Id037bece9696d7a14b4c8f347c966d90821c670a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-23 18:52:41 +00:00
Steven Moreland
b862059972 Merge "init: log services requested restart" into tm-dev 2022-05-23 18:28:02 +00:00
Akilesh Kailash
6dbe3f6bef [automerger skipped] libsnapshot: Initialize merge_op_start_ to zero. am: d36a68183c -s ours
am skip reason: Merged-In I3cc48a66b532cfe8b2d87c8724d77ab3169a2ddb with SHA-1 fc9a48f5cb is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/18512862

Change-Id: Iffb7e3f1f27d338112c6e4cd51a7e6b9c6f6fe69
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-20 22:17:35 +00:00
Akilesh Kailash
b42ca3ec47 Merge "libsnapshot: Initialize merge_op_start_ to zero." am: 1a3572b0b3 am: 01c6e109af
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2100596

Change-Id: I2c4e73c957779bc7bf679219fde682be3a236b65
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-20 13:15:46 +00:00
Akilesh Kailash
01c6e109af Merge "libsnapshot: Initialize merge_op_start_ to zero." am: 1a3572b0b3
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2100596

Change-Id: I9b34a9e7f736f34731d0f1713df9ffc1e48ce25f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-20 12:49:15 +00:00
Jooyung Han
99fa346c35 init: Disable 'on' for non-Vendor APEXes
Mainline modules are not supposed to rely on 'on' action triggers in
their init scripts because events/properties are not guranteed to be
stable across many devices.

To reduce the potential risk of enabling 'on' for APEXes, for now, we
enable it for only Vendor APEXes.

When an init script in a non-Vendor APEX contains 'on' section, init
emits an error on parsing the script and skip the section.

For example, when init.rc in the ADBD APEX has 'on' section,
the following error is emitted on parsing the script.

  init: Parsing file /apex/com.android.adbd/etc/init.rc...
  init: /apex/com.android.adbd/etc/init.rc: 8: ParseSection() failed:
    'on' is supported for only Vendor APEXes.

Bug: 232543017
Test: see above
Change-Id: I6509c8d2c6b632369d215128f740f9ed78858605
2022-05-20 09:31:08 +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
Akilesh Kailash
1a3572b0b3 Merge "libsnapshot: Initialize merge_op_start_ to zero." 2022-05-20 05:08:03 +00:00
Akilesh Kailash
fc9a48f5cb 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
2022-05-19 20:06:07 +00:00
David Drysdale
5fc297f3e8 [automerger skipped] KeyMint HAL: pass auth token on updateAad am: 986a2dd965 -s ours
am skip reason: Merged-In I2ba275718ef7ce6cc701ac2eb4a122639d7a4351 with SHA-1 37a8ac1d45 is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/18457422

Change-Id: I7efd00d57484dc0b3d29cb6ffe79f6b9384adbec
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-19 11:06:52 +00:00
David Drysdale
435312a6d9 Merge "KeyMint HAL: pass auth token on updateAad" am: 5b8dfacf5b am: 07615033a0
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2101110

Change-Id: I5142ebac2d6aa7f6d50aff4dd9492fa6ffa12d1f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-19 08:36:21 +00:00
David Drysdale
07615033a0 Merge "KeyMint HAL: pass auth token on updateAad" am: 5b8dfacf5b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2101110

Change-Id: If8335ede4b6322895858c095a3f5ee1e765ecac1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-19 07:58:43 +00:00
David Drysdale
5b8dfacf5b Merge "KeyMint HAL: pass auth token on updateAad" 2022-05-19 05:50:51 +00:00
Matthew Duggan
440f64591b Merge "storaged: Avoid divide-by-zero in performance measurement" am: 91d24d5bad am: 58d33900f2
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2096820

Change-Id: I3e68787eca7ca5c1eba69a881786e22e022a15a3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-19 01:45:44 +00:00
Matthew Duggan
58d33900f2 Merge "storaged: Avoid divide-by-zero in performance measurement" am: 91d24d5bad
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2096820

Change-Id: I9f3255750b1203c08f6d1a90a0014e63ed4733db
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-19 01:07:12 +00:00
Matthew Duggan
91d24d5bad Merge "storaged: Avoid divide-by-zero in performance measurement" 2022-05-19 00:15:50 +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
David Drysdale
37a8ac1d45 KeyMint HAL: pass auth token on updateAad
Bug: 230716629
Test: CtsVerifier with aosp/2077898 included
Change-Id: I2ba275718ef7ce6cc701ac2eb4a122639d7a4351
2022-05-18 11:12:01 +01:00
Matthew Duggan
5a02a9bab9 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
2022-05-18 17:05:54 +09:00
Treehugger Robot
af4e6561d7 Merge "init: log services requested restart" am: 0ddcf6d2f1 am: 4d3bf512b0
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2099238

Change-Id: I8ef99df0a8ecb38f14d5fdf12374f240f0439f37
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-18 06:38:58 +00:00
Treehugger Robot
4d3bf512b0 Merge "init: log services requested restart" am: 0ddcf6d2f1
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2099238

Change-Id: I2787b58b63670b60bcaa899bb68a2a64341ae06c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-18 05:53:40 +00:00
Treehugger Robot
0ddcf6d2f1 Merge "init: log services requested restart" 2022-05-18 05:31:04 +00:00
Treehugger Robot
627897b869 Merge "init.rc: restorecon /data/media before chattr" am: 3a728ac7c6 am: 71fca25a67
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2098435

Change-Id: If29ff328709c50b25cb3259c83ebaa5dc9c18944
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-18 00:43:18 +00:00
Treehugger Robot
71fca25a67 Merge "init.rc: restorecon /data/media before chattr" am: 3a728ac7c6
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2098435

Change-Id: Ib600570523bba0702e411e7ac73844b57e9e8a34
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-18 00:16:19 +00: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
Treehugger Robot
3a728ac7c6 Merge "init.rc: restorecon /data/media before chattr" 2022-05-18 00:00:23 +00:00
Steven Moreland
61169c76dd 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
2022-05-17 22:54:55 +00:00
Victor Hsieh
5d439bd37a [automerger skipped] Make VMCompilationPerformance an aggregated profile with default am: b40fb113e7 -s ours
am skip reason: Merged-In Ib8cd65782c818474fb129efbd9ef9a3e23ad1eb3 with SHA-1 c9e0f79593 is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/18423662

Change-Id: If4b3f1d29b14a351f3de42e15741f9aae0f278ac
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-17 22:52:58 +00:00
Eric Biggers
dce8ba253e init.rc: restorecon /data/media before chattr
The SELinux type of /data/media has changed from media_rw_data_file to
media_userdir_file, but the recursive restorecon of /data happens too
late when taking an upgrade.  Add a restorecon of /data/media to just
above the chattr command which needs the new label to be allowed.  This
doesn't "really" matter, since the chattr command is only needed just
after the directory was created anyway, but this fixes a SELinux denial.

Bug: 156305599
Bug: 232824121
Change-Id: I897be19ceb4686511469bdf7efda2483f298eee4
2022-05-17 02:40:22 +00:00
Eric Biggers
2f7a362c42 Merge changes If6611d64,Ie55c3ac1 am: 9fcf000264 am: 1e67c2529f
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2098430

Change-Id: Icb7c4a40e6f7c0ffaccc5f1b456965fe111dd074
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-17 02:19:05 +00:00
Eric Biggers
1e67c2529f Merge changes If6611d64,Ie55c3ac1 am: 9fcf000264
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2098430

Change-Id: I54d1f654bd6a57bbcbecadcc965b4696ec597fa1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-17 01:53:03 +00:00
Eric Biggers
9fcf000264 Merge changes If6611d64,Ie55c3ac1
* changes:
  init: remove unneeded special cases from FscryptInferAction
  init: fix mkdir to reliably detect top-level /data directories
2022-05-17 01:09:21 +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
Victor Hsieh
1450294215 Merge "Make VMCompilationPerformance an aggregated profile with default" am: 04e6f149e0 am: 55c5be2417
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2097065

Change-Id: Ic91caf3025f6f2e78f8e8fc1f46e3ae91a993759
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-16 21:57:42 +00:00
Victor Hsieh
55c5be2417 Merge "Make VMCompilationPerformance an aggregated profile with default" am: 04e6f149e0
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2097065

Change-Id: I496fa51dca737178a53ad1b169cffd4b80e92421
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-16 21:31:16 +00:00
Victor Hsieh
04e6f149e0 Merge "Make VMCompilationPerformance an aggregated profile with default" 2022-05-16 21:12:51 +00:00
Victor Hsieh
c9e0f79593 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
Change-Id: Ib8cd65782c818474fb129efbd9ef9a3e23ad1eb3
2022-05-16 14:09:37 -07:00
Eric Biggers
48c05a6d03 init: remove unneeded special cases from FscryptInferAction
All the individual directories being treated specially by
FscryptInferAction() already have an explicit encryption action in the
corresponding mkdir commands.  The explicit action is the source of
truth, so the special cases in FscryptInferAction() are unnecessary.

Also, some of these cases were outdated.  For example, /data/app-staging
was changed from encryption=None to encryption=DeleteIfNecessary at some
point, but FscryptInferAction() was not updated.  This is causing the
warning "Inferred action different from explicit one" to be logged.

Additional "Inferred action different from explicit one" warnings are
logged due to subdirectories of /data/apex being explicitly encrypted.

Change FscryptInferAction() to only do what it needs to do: check
whether the directory is a top-level directory of /data or not.  Remove
the above-mentioned warning which is not useful.

Bug: 232554803
Change-Id: If6611d64107a19d242892c92dfea095577e193e5
2022-05-16 19:06:22 +00:00
TreeHugger Robot
4a03dc627b [automerger skipped] Merge "Update the encryption rule of /data/bootanim to DeleteIfNecessary" into tm-dev am: 7e778c1350 -s ours
am skip reason: Merged-In I17bcb901ad533cada4e0aa061196fc94d7b213ec with SHA-1 a1039f9a4b is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/18364895

Change-Id: I267e41be53484a1a9c2b390749914ebdcfdc8599
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-13 23:54:25 +00:00
Josh Yang
377aae3158 [automerger skipped] Update the encryption rule of /data/bootanim to DeleteIfNecessary am: 86b08e5efd -s ours
am skip reason: Merged-In I17bcb901ad533cada4e0aa061196fc94d7b213ec with SHA-1 a1039f9a4b is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/18364895

Change-Id: I11fa48590f4511ddb642ae79b4bfce90993b44a5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-13 23:54:21 +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
Treehugger Robot
c96cc03eb0 Merge "Change the encryption rule of /data/bootanim to DeleteIfNecessary" am: e4200bac8d am: e19ae58831
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2097855

Change-Id: I7f1438d090421725ea804a322e7703fbcd72fbbc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-13 22:22:36 +00:00
Christopher Ferris
2b80d24d64 Merge "Use the new AndroidUnwinder object." am: f26a9504db am: 816f2dac18
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2029024

Change-Id: Idf9fefe66f5587ea99e11b9dbbe75acf20d2bdfb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-13 22:22:25 +00:00
Jaegeuk Kim
e6a752470b Merge "logwrap_fork_execvp block recovery auto reboot" am: 85d86d0e85 am: 676a3b878f
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2089483

Change-Id: Iaf2a6c1faffae6fd9f0ae3384f3e732e74497cad
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-13 22:22:17 +00:00
Pete Bentley
e81d47f9cd [automerger skipped] Remove setenvs when running boringssl_self_test. am: 8a9b9820e5 -s ours
am skip reason: Merged-In I8ce57619aa4d1e6457f3f864bf5e403f727c040c with SHA-1 ba830eb81b is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/18375393

Change-Id: I8b152bda56aa2825ff1a09989b416e7ad620d9f6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-13 21:59:31 +00:00
Treehugger Robot
e19ae58831 Merge "Change the encryption rule of /data/bootanim to DeleteIfNecessary" am: e4200bac8d
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2097855

Change-Id: Ia89c9c9b89871412ce21d8278048ca6cc4e0940f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-13 21:53:42 +00:00