Commit graph

73017 commits

Author SHA1 Message Date
Wei Wang
04557e2fd7 Merge changes from topic "sysbg_aosp" am: 1132977223 am: d7c942ad46 am: 808464a9d0
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1847154

Change-Id: Ifd17f12c911cd14681f31b4aa3b485d1d5fa5127
2021-10-07 20:04:08 +00:00
Wei Wang
808464a9d0 Merge changes from topic "sysbg_aosp" am: 1132977223 am: d7c942ad46
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1847154

Change-Id: Ibe71cbe11ad517dd72c8eaba95ffcdceb7e0900c
2021-10-07 19:44:58 +00:00
Wei Wang
d7c942ad46 Merge changes from topic "sysbg_aosp" am: 1132977223
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1847154

Change-Id: Ida42e219f4782812392b213751560ab969b37b8f
2021-10-07 19:28:56 +00:00
Wei Wang
1132977223 Merge changes from topic "sysbg_aosp"
* changes:
  task_profiles: add ServicePerformance to legacy device policy
  libutils: use system_background for low prio tasks in framework
2021-10-07 17:54:40 +00:00
David Anderson
d4c7f3b28c Merge "adds LO_FLAGS_AUTOCLEAR for loop device of zram backing device" am: af09c15049 am: d50f25bed6 am: d23803f00a
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1834393

Change-Id: Icbf141a0e5a6ba4ca78da0639a779ad9a86c707a
2021-10-07 16:23:47 +00:00
David Anderson
d23803f00a Merge "adds LO_FLAGS_AUTOCLEAR for loop device of zram backing device" am: af09c15049 am: d50f25bed6
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1834393

Change-Id: I3d8e8b1dcbb08146e421b7b7adb4f6b1d18fd5f3
2021-10-07 16:13:59 +00:00
David Anderson
d50f25bed6 Merge "adds LO_FLAGS_AUTOCLEAR for loop device of zram backing device" am: af09c15049
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1834393

Change-Id: Iaf19224833be90ec30db8fa2f932245462dea98b
2021-10-07 16:01:19 +00:00
David Anderson
af09c15049 Merge "adds LO_FLAGS_AUTOCLEAR for loop device of zram backing device" 2021-10-07 15:49:18 +00:00
Steven Moreland
9bf6083f63 Merge "Revert "strerror: incl enum name"" am: 2e1e76b8ff am: 8a258bb4b9 am: e7fcc3cd14
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1847496

Change-Id: Ia9b447313185b6d24aaef4b95d597c40d048f285
2021-10-07 01:06:10 +00:00
Steven Moreland
e7fcc3cd14 Merge "Revert "strerror: incl enum name"" am: 2e1e76b8ff am: 8a258bb4b9
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1847496

Change-Id: I544aad15b59bbb9fadffa0c54cf8adbca8cd1cdf
2021-10-07 00:54:01 +00:00
Steven Moreland
8a258bb4b9 Merge "Revert "strerror: incl enum name"" am: 2e1e76b8ff
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1847496

Change-Id: I2bc268dd32dfcf0e34e76a1391cb31561fd1b569
2021-10-07 00:39:31 +00:00
Steven Moreland
2e1e76b8ff Merge "Revert "strerror: incl enum name"" 2021-10-07 00:25:39 +00:00
Steven Moreland
dde8fefced Revert "strerror: incl enum name"
Revert "strerror: incl enum name"

Revert submission 1833622-usable-strerror

Reason for revert: b/202330586
Bug: 202330586
Reverted Changes:
I4d8f617a0:Track strerror(3) change.
I8ea86220c:strerror: incl enum name
I407bd9f4d:strerror: incl enum name

Change-Id: I293ac322160c6a82ff7004a3de085cafbd514458
2021-10-07 00:19:18 +00:00
Alexander Potapenko
b49c2bf675 [automerger skipped] init.rc: disable creation of bootreceiver tracing instance for kernels >=4.9 and <= 5.4 am: 4edda28b92 -s ours
am skip reason: Merged-In I794062741688ebea0e4bc500723a966f8f646ee1 with SHA-1 53cd1e95e7 is already in history

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

Change-Id: I90a2f0aa5ceb7b1e6c6968ab0a8c1024a363538f
2021-10-06 22:09:15 +00:00
Wei Wang
c53d794ca8 task_profiles: add ServicePerformance to legacy device policy
Since we are adding SCHED_SP_SYSTEM into framework, the policy is needed
on older releases as well.

Bug: 201428466
Test: Build
Signed-off-by: Wei Wang <wvw@google.com>
Change-Id: I0784820bfec84fd8ef98f2feb2caee084d0a14a2
2021-10-06 15:08:42 -07:00
Elliott Hughes
386a77844d Merge "strerror: incl enum name" am: 79de514910 am: 3afebabf1b am: b2f6764992
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1835931

Change-Id: Ib417243c4347af4a2afc6216bb8cbf9f6d654118
2021-10-06 20:30:14 +00:00
Elliott Hughes
b2f6764992 Merge "strerror: incl enum name" am: 79de514910 am: 3afebabf1b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1835931

Change-Id: I5c7ab55a7a175c4c763685ae1905bc2c6ae20db9
2021-10-06 20:09:05 +00:00
Wei Wang
c39d60d114 libutils: use system_background for low prio tasks in framework
Bug: 201428466
Test: Build and boot check system_server's sched group
Signed-off-by: Wei Wang <wvw@google.com>
Change-Id: Iffc47fdaf3ef8fba6eb01a12cf534a0393e3e91c
2021-10-06 13:04:22 -07:00
Elliott Hughes
3afebabf1b Merge "strerror: incl enum name" am: 79de514910
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1835931

Change-Id: I6c3beb288ae8733ef65723d8ae5bc820a65f17c2
2021-10-06 19:53:46 +00:00
Elliott Hughes
79de514910 Merge "strerror: incl enum name" 2021-10-06 19:35:51 +00:00
TreeHugger Robot
5378663ae6 [automerger skipped] Merge "Restrict creation of bootreceiver tracing instance to 64-bit systems." into sc-qpr1-dev am: b0cd5f87e8 -s ours
am skip reason: Merged-In Icaf762715fed7a282b1ad738c10bcb45dc848f4d with SHA-1 ec37ba8359 is already in history

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

Change-Id: I40d52a2762a4abd6fe69a25a6b1cefda351c76eb
2021-10-06 18:19:05 +00:00
Alexander Potapenko
f876b8a002 [automerger skipped] init: introduce ro.kernel.version property am: e69aea9256 -s ours
am skip reason: Merged-In Icec640b8a7150b344d9aa3bc0bdbcdae050c7c45 with SHA-1 1e966fa9f1 is already in history

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

Change-Id: I7b4f9c60e9e8fc21266b8c2f64952740797cb72b
2021-10-06 18:19:04 +00:00
Alexander Potapenko
4edda28b92 init.rc: disable creation of bootreceiver tracing instance for kernels >=4.9 and <= 5.4
The tracing instance takes extra RAM and is not needed on devices running older kernels.

Bug: 194156700
Test: manual on a Pixel device

Signed-off-by: Alexander Potapenko <glider@google.com>
Merged-In: I794062741688ebea0e4bc500723a966f8f646ee1
Change-Id: Ie8614e67a89cea67bed88427820fefdf110713c9
2021-10-06 18:12:46 +00:00
TreeHugger Robot
b0cd5f87e8 Merge "Restrict creation of bootreceiver tracing instance to 64-bit systems." into sc-qpr1-dev 2021-10-06 18:06:20 +00:00
Alexander Potapenko
b5f93dfa5d Restrict creation of bootreceiver tracing instance to 64-bit systems.
The main users of this instance are KFENCE and MTE-aided KASAN, which are only supported on arm64.
Skip creation of this tracing instance on 32-bit systems to save ~6Mb memory on low-end devices.

Bug: 195089948
Bug: 194719088
Bug: 194156700
Test: manual on Pixel device
Merged-In: Icaf762715fed7a282b1ad738c10bcb45dc848f4d
Change-Id: I61694ce174fa745ef9fd50ca7464b5a9e1d1e011
2021-10-06 16:13:06 +00:00
Alexander Potapenko
e69aea9256 init: introduce ro.kernel.version property
This property will hold the major.minor part of the kernel version (e.g. "5.4"), allowing init scripts to act depending on that version, enabling and disabling certain features.

Bug: 194156700
Test: manual on a Pixel device
Signed-off-by: Alexander Potapenko <glider@google.com>
Merged-In: Icec640b8a7150b344d9aa3bc0bdbcdae050c7c45
Change-Id: I5af411e39da600e5e0f6703f3a2a4930d509e29d
2021-10-06 16:12:41 +00:00
Stephen Crane
4227dc39d5 [automerger skipped] storageproxyd: Retry RPMB request on UNIT ATTENTION am: ab2257ee48 -s ours am: 857115b1ef -s ours
am skip reason: Merged-In Ib970e779365bb396756c114684c7f6e56a737ab1 with SHA-1 d1a212e0d8 is already in history

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

Change-Id: I9cad08a33895c097986a42b05a9acc6fe2b4ce22
2021-10-05 19:36:28 +00:00
Stephen Crane
2b6fa666c4 [automerger skipped] storageproxyd: Fix inverted conditional in error checking am: 237679cfca -s ours am: 122048f24c -s ours
am skip reason: Merged-In I3b84188aabe58345a83d2fd57bb8103e730cf365 with SHA-1 dcdac24306 is already in history

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

Change-Id: Id12ac9ef2bed7433832c3abbce22ec3abd8350fa
2021-10-05 19:36:28 +00:00
Stephen Crane
e92bd09bdf [automerger skipped] [storageproxyd] Dump binary buffers to log instead of stderr am: 77e2af18be -s ours am: c898d12eda -s ours
am skip reason: Merged-In Iecc0d4680420bb92c94be628789093888a2f1941 with SHA-1 f647221827 is already in history

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

Change-Id: I4b06cacc8c9cb48eec5d7cc81644a9bdd1eaa60c
2021-10-05 19:36:27 +00:00
Stephen Crane
2f565558ff [automerger skipped] storageproxyd: Add logging of failed RPMB transactions am: bf6e22a318 -s ours am: a2613eace1 -s ours
am skip reason: Merged-In I928ddebcb65aa6c305d3dcab7c64bd19d11a50fa with SHA-1 642d977bc8 is already in history

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

Change-Id: Ia848574d5f152d5931a8efb1bf4179cc53e1a72c
2021-10-05 19:36:27 +00:00
Stephen Crane
4263e985aa [automerger skipped] storageproxyd: Add file handle param to debug buffer print am: 4ee811ee46 -s ours am: d10e28fc29 -s ours
am skip reason: Merged-In Iade322a21312a676b3599bddafdfc43b599617ea with SHA-1 3bb483b196 is already in history

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

Change-Id: Ifb5468539080a141a84a90907545e32cc43a43a4
2021-10-05 19:36:26 +00:00
Stephen Crane
358945feec [automerger skipped] storageproxyd: Retry RPMB request on UNIT ATTENTION am: ab2257ee48 -s ours am: 8d2f577b11 -s ours
am skip reason: Merged-In Ib970e779365bb396756c114684c7f6e56a737ab1 with SHA-1 a9085181af is already in history

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

Change-Id: I13cdb71e3002fe174cf88e138ff9a4aeaadfa5fc
2021-10-05 19:36:08 +00:00
Stephen Crane
038a4a118c [automerger skipped] storageproxyd: Fix inverted conditional in error checking am: 237679cfca -s ours am: e231f9a5af -s ours
am skip reason: Merged-In I3b84188aabe58345a83d2fd57bb8103e730cf365 with SHA-1 bdb2eba4a4 is already in history

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

Change-Id: I70380b60a01b436cbbb01c533219d2a330aa2307
2021-10-05 19:36:07 +00:00
Stephen Crane
4822637088 [automerger skipped] [storageproxyd] Dump binary buffers to log instead of stderr am: 77e2af18be -s ours am: a03d5a289a -s ours
am skip reason: Merged-In Iecc0d4680420bb92c94be628789093888a2f1941 with SHA-1 38003165b2 is already in history

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

Change-Id: Ifd5a2fe78375cbbc223101c7d73530d0e649c109
2021-10-05 19:36:07 +00:00
Stephen Crane
ce2a6a64d5 [automerger skipped] storageproxyd: Add logging of failed RPMB transactions am: bf6e22a318 -s ours am: fc0011062e -s ours
am skip reason: Merged-In I928ddebcb65aa6c305d3dcab7c64bd19d11a50fa with SHA-1 310d805d96 is already in history

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

Change-Id: I02ac4dd124bb3607b9fd850f2dadaad19c6f6573
2021-10-05 19:36:06 +00:00
Stephen Crane
5e14b503c4 [automerger skipped] storageproxyd: Add file handle param to debug buffer print am: 4ee811ee46 -s ours am: a9f5baad24 -s ours
am skip reason: Merged-In Iade322a21312a676b3599bddafdfc43b599617ea with SHA-1 dd3f7b867d is already in history

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

Change-Id: I9a9fe711ddeea862deefb8f5da6d97c1bd8e413f
2021-10-05 19:36:05 +00:00
Stephen Crane
857115b1ef [automerger skipped] storageproxyd: Retry RPMB request on UNIT ATTENTION am: ab2257ee48 -s ours
am skip reason: Merged-In Ib970e779365bb396756c114684c7f6e56a737ab1 with SHA-1 d1a212e0d8 is already in history

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

Change-Id: I665ffb3d37b5fa4c1eeb61b5ddf249f2c754f27a
2021-10-05 19:22:00 +00:00
Stephen Crane
122048f24c [automerger skipped] storageproxyd: Fix inverted conditional in error checking am: 237679cfca -s ours
am skip reason: Merged-In I3b84188aabe58345a83d2fd57bb8103e730cf365 with SHA-1 dcdac24306 is already in history

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

Change-Id: I7b4344764e66de4a2848dec9319c6e3abc89751e
2021-10-05 19:21:59 +00:00
Stephen Crane
c898d12eda [automerger skipped] [storageproxyd] Dump binary buffers to log instead of stderr am: 77e2af18be -s ours
am skip reason: Merged-In Iecc0d4680420bb92c94be628789093888a2f1941 with SHA-1 f647221827 is already in history

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

Change-Id: I55e606476410febd80dbad2662f6f75c3521d239
2021-10-05 19:21:59 +00:00
Stephen Crane
a2613eace1 [automerger skipped] storageproxyd: Add logging of failed RPMB transactions am: bf6e22a318 -s ours
am skip reason: Merged-In I928ddebcb65aa6c305d3dcab7c64bd19d11a50fa with SHA-1 642d977bc8 is already in history

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

Change-Id: Ifa30cff385ebaf558bde531b0bbc2777f9fbdd4b
2021-10-05 19:21:58 +00:00
Stephen Crane
d10e28fc29 [automerger skipped] storageproxyd: Add file handle param to debug buffer print am: 4ee811ee46 -s ours
am skip reason: Merged-In Iade322a21312a676b3599bddafdfc43b599617ea with SHA-1 3bb483b196 is already in history

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

Change-Id: I3e4dc6d20f02fcfcb5118adc7c21caa1fde4df06
2021-10-05 19:21:58 +00:00
Stephen Crane
8d2f577b11 [automerger skipped] storageproxyd: Retry RPMB request on UNIT ATTENTION am: ab2257ee48 -s ours
am skip reason: Merged-In Ib970e779365bb396756c114684c7f6e56a737ab1 with SHA-1 a9085181af is already in history

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

Change-Id: I91c8474d17e8757a8b76ad25048789ff85135330
2021-10-05 19:21:04 +00:00
Stephen Crane
e231f9a5af [automerger skipped] storageproxyd: Fix inverted conditional in error checking am: 237679cfca -s ours
am skip reason: Merged-In I3b84188aabe58345a83d2fd57bb8103e730cf365 with SHA-1 bdb2eba4a4 is already in history

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

Change-Id: I62d9ad5047bf3b5dd133bc71cb7976ea82fad23f
2021-10-05 19:21:04 +00:00
Stephen Crane
a03d5a289a [automerger skipped] [storageproxyd] Dump binary buffers to log instead of stderr am: 77e2af18be -s ours
am skip reason: Merged-In Iecc0d4680420bb92c94be628789093888a2f1941 with SHA-1 38003165b2 is already in history

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

Change-Id: I5d3dea68dd0f589f48b9d1ae396eb795b835487d
2021-10-05 19:21:03 +00:00
Stephen Crane
fc0011062e [automerger skipped] storageproxyd: Add logging of failed RPMB transactions am: bf6e22a318 -s ours
am skip reason: Merged-In I928ddebcb65aa6c305d3dcab7c64bd19d11a50fa with SHA-1 310d805d96 is already in history

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

Change-Id: Ia265047b4965aa7daa129c2c33e7831c806563ba
2021-10-05 19:21:03 +00:00
Stephen Crane
a9f5baad24 [automerger skipped] storageproxyd: Add file handle param to debug buffer print am: 4ee811ee46 -s ours
am skip reason: Merged-In Iade322a21312a676b3599bddafdfc43b599617ea with SHA-1 dd3f7b867d is already in history

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

Change-Id: I6fe4cc1fc015f3c656dae88a05edd844d6e06bde
2021-10-05 19:21:01 +00:00
Stephen Crane
ab2257ee48 storageproxyd: Retry RPMB request on UNIT ATTENTION
Attempts a retry of the intial write or read when an RPMB command
triggers a UNIT ATTENTION condition. This causes the UA status to be
reset and hopefully result in a successful command. This runs the risk
of retrying a successful write, but we wouldn't have been able to get
the RPMB response after that write anyway due to the UA condition.

Test: m storageproxyd
Bug: 194712579
Change-Id: Ib970e779365bb396756c114684c7f6e56a737ab1
Merged-In: Ib970e779365bb396756c114684c7f6e56a737ab1
(cherry picked from commit a9085181af)
2021-10-05 09:56:43 -07:00
Stephen Crane
237679cfca storageproxyd: Fix inverted conditional in error checking
check_scci_sense (now renamed unexpected_scsi_sense) was supposed to
return false iff the sense data was valid and did not contain an error.
This return value was inverted. Invert the return values and rename the
function to clarify its role.

Test: m storageproxyd
Bug: 195544379
Change-Id: I3b84188aabe58345a83d2fd57bb8103e730cf365
Merged-In: I3b84188aabe58345a83d2fd57bb8103e730cf365
2021-10-05 09:56:34 -07:00
Stephen Crane
77e2af18be [storageproxyd] Dump binary buffers to log instead of stderr
Rewrites the buffer logging to print to the Android log instead of
stderr. The storageproxyd service is started by init and stderr is not
logged anywhere. Because we want to log sense data errors under normal
operation, we need to log to logcat instead of stderr.

Test: Define RPMB_DEBUG, build for qemu-trusty, run, inspect logcat
Bug: 195544379
Change-Id: Iecc0d4680420bb92c94be628789093888a2f1941
Merged-In: Iecc0d4680420bb92c94be628789093888a2f1941
2021-10-05 09:55:10 -07:00
Stephen Crane
bf6e22a318 storageproxyd: Add logging of failed RPMB transactions
Adds parsing and logging of SCSI errors from SG_IO calls for RPMB. Does
not alter behavior of the RPMB proxy in response to these errors.

Test: m storageproxyd
Bug: 195544379
Change-Id: I928ddebcb65aa6c305d3dcab7c64bd19d11a50fa
Merged-In: I928ddebcb65aa6c305d3dcab7c64bd19d11a50fa
2021-10-05 09:55:03 -07:00