summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-10-15Snap for 7825665 from 98e7f427e898c1f7dfe597cc4e15032c6563bbae to ↵android-12.0.0_r32android-12.0.0_r29android-12.0.0_r27android-12.0.0_r21android-12.0.0_r20android-12.0.0_r19android-12.0.0_r18android12-qpr1-d-s3-releaseandroid12-qpr1-d-s2-releaseandroid12-qpr1-d-s1-releaseandroid12-qpr1-d-releaseAndroid Build Coastguard Worker
sc-qpr1-d-release Change-Id: Idc1bad9acca53cbbae8c02d1da45e9cd2e9effc0
2021-10-14Snap for 7821765 from 0e28aeb7861eaa4bae72494f8a3e6b152c889fc6 to ↵Android Build Coastguard Worker
sc-qpr1-d-release Change-Id: I0d73a1ea3eae10309d81685cc6c06cf2ee410049
2021-10-13storageproxyd: discard writes when checkpointing, if necessaryThurston Dang
If a checkpointing operation is in progress, discard any write operations that are flagged as STORAGE_MSG_FLAG_PRE_COMMIT_CHECKPOINT. In tandem with trusty-side changes that set the flag appropriately, this avoids the awkward case where the checkpoint is rolled back, which potentially leads to inconsistency between the data and the superblock. Based on Stephen's CL/1845477 "Add helper to check checkpoint state of mounts". Original change: https://android-review.googlesource.com/c/platform/system/core/+/1850058 Test: m storageproxyd Bug: 194313068 Change-Id: I0924084f7f0b20018cbb71f5153469c8a686e262 Merged-In: I0924084f7f0b20018cbb71f5153469c8a686e262 (cherry picked from commit 34404f4ab1326eb179f889201dcfd04eb6002d0e)
2021-10-13Revert "Revert "init.rc: disable creation of bootreceiver tracing instance ↵Alexander Potapenko
for kernels >=4.9 and <= 5.4"" This reverts commit 220f604ca5f5b844b842a30fe40ad07dc570030f. Reason for revert: from bug 202436407 it looks like the initial revert wasn't needed. Change-Id: I81dba47ee4bc55da2d4c5212dfc1b6200719b8be
2021-10-09Snap for 7808903 from ecaf9ef70a151d85ad548f8c1d789f5e562f67a8 to ↵Android Build Coastguard Worker
sc-qpr1-d-release Change-Id: I2ef0b303a9d1e9ad5e12ae63b88504b2beb5495c
2021-10-08Merge "libutils: use system_background for low prio tasks in framework" into ↵Wei Wang
sc-qpr1-dev
2021-10-08task_profiles: add ServicePerformance to legacy device policyWei Wang
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 Merged-In: I0784820bfec84fd8ef98f2feb2caee084d0a14a2
2021-10-08Revert "init.rc: disable creation of bootreceiver tracing instance for ↵Chiayu Pei
kernels >=4.9 and <= 5.4" This reverts commit 4edda28b92aab6a795241045bb088d25fb623ed1. Reason for revert: b/202436407 Change-Id: I4cdbdb756b9fc61bb6f5ff61335fec7d541ec6a2
2021-10-07libutils: use system_background for low prio tasks in frameworkWei Wang
Bug: 201428466 Test: Build and boot check system_server's sched group Signed-off-by: Wei Wang <wvw@google.com> Change-Id: Iffc47fdaf3ef8fba6eb01a12cf534a0393e3e91c Merged-In: Iffc47fdaf3ef8fba6eb01a12cf534a0393e3e91c
2021-10-07Snap for 7800528 from 4edda28b92aab6a795241045bb088d25fb623ed1 to ↵Android Build Coastguard Worker
sc-qpr1-d-release Change-Id: I0e8631290510b6a9ff5b14f59424c8fee34e81ca
2021-10-06init.rc: disable creation of bootreceiver tracing instance for kernels >=4.9 ↵Alexander Potapenko
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-06Merge "Restrict creation of bootreceiver tracing instance to 64-bit ↵TreeHugger Robot
systems." into sc-qpr1-dev
2021-10-06Restrict creation of bootreceiver tracing instance to 64-bit systems.Alexander Potapenko
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-06init: introduce ro.kernel.version propertyAlexander Potapenko
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-06Snap for 7796451 from 857115b1ef6a43a5150757182c8f337090c87008 to ↵Android Build Coastguard Worker
sc-qpr1-d-release Change-Id: I21ecffe751ec20ae3de57d0cf6b3502072a6dd1e
2021-10-05[automerger skipped] storageproxyd: Retry RPMB request on UNIT ATTENTION am: ↵Stephen Crane
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[automerger skipped] storageproxyd: Fix inverted conditional in error ↵Stephen Crane
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[automerger skipped] [storageproxyd] Dump binary buffers to log instead of ↵Stephen Crane
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[automerger skipped] storageproxyd: Add logging of failed RPMB transactions ↵Stephen Crane
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[automerger skipped] storageproxyd: Add file handle param to debug buffer ↵Stephen Crane
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-05storageproxyd: Retry RPMB request on UNIT ATTENTIONStephen Crane
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 a9085181afaa80ac8b4cfb82a6762e336b1e2500)
2021-10-05storageproxyd: Fix inverted conditional in error checkingStephen Crane
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[storageproxyd] Dump binary buffers to log instead of stderrStephen Crane
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-05storageproxyd: Add logging of failed RPMB transactionsStephen Crane
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-05storageproxyd: Add file handle param to debug buffer printStephen Crane
Adds a file handle parameter to the debug print_buf function to allow printing to either stdout or stderr. Test: m storageproxyd Bug: 195544379 Change-Id: Iade322a21312a676b3599bddafdfc43b599617ea Merged-In: Iade322a21312a676b3599bddafdfc43b599617ea (cherry picked from commit 3bb483b196678a9cae7237c9abad3e3c7ad3781f)
2021-10-04storageproxyd: Retry RPMB request on UNIT ATTENTIONStephen Crane
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 a9085181afaa80ac8b4cfb82a6762e336b1e2500)
2021-09-24storageproxyd: Fix inverted conditional in error checkingStephen Crane
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-09-17Merge changes Iecc0d468,I928ddebc,Iade322a2 into sc-qpr1-devStephen Crane
* changes: [storageproxyd] Dump binary buffers to log instead of stderr storageproxyd: Add logging of failed RPMB transactions storageproxyd: Add file handle param to debug buffer print
2021-09-17Merge changes I779184f1,I241ee11d into sc-qpr1-devAkilesh Kailash
* changes: libsnapshot: Error handling after QuerySnapshotStatus snapuserd: I/O request on sectors not mapping to any COW op
2021-09-17libsnapshot: Error handling after QuerySnapshotStatusAkilesh Kailash
QuerySnapshotStatus will capture the error codes from dm-snapshot if there are any snapshot related failure. Handle the error codes and fail the QuerySnapshotStatus call. Validate snapshot status in MapSnapshot(). If the mode is set to Persistent and snapshot status is in Merging state, then forcefully set the mode to Merge state. Bug: 198265278 Test: Full/incremental OTA Signed-off-by: Akilesh Kailash <akailash@google.com> Change-Id: I779184f1998b23edacd6e780acf2676442004340 Merged-In: I779184f1998b23edacd6e780acf2676442004340
2021-09-17snapuserd: I/O request on sectors not mapping to any COW opAkilesh Kailash
If there is an I/O request which doesn't map to any COW Operation in the vector mapping, then that request is an EOF request and should not be discarded with an I/O error. Bug: 198787355 Test: Incremental OTA Signed-off-by: Akilesh Kailash <akailash@google.com> Change-Id: I241ee11d7cf540854aa4a232bc1b18da43d41e05 Merged-In: I241ee11d7cf540854aa4a232bc1b18da43d41e05
2021-09-15[storageproxyd] Dump binary buffers to log instead of stderrStephen Crane
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-09-15storageproxyd: Add logging of failed RPMB transactionsStephen Crane
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-09-15storageproxyd: Add file handle param to debug buffer printStephen Crane
Adds a file handle parameter to the debug print_buf function to allow printing to either stdout or stderr. Test: m storageproxyd Bug: 195544379 Change-Id: Iade322a21312a676b3599bddafdfc43b599617ea Merged-In: Iade322a21312a676b3599bddafdfc43b599617ea
2021-09-15libsnapshot: Fix new partitions not transitioning in second-stage init.David Anderson
Bug: 196922070 Test: vts_libsnapshot_test Merged-In: If8a7afde218fd719e4426dc1dda41f53a4e6544b Change-Id: If8a7afde218fd719e4426dc1dda41f53a4e6544b
2021-08-25libsnapshot: Fix missing source partitions when adding a new partition.David Anderson
When adding a new partition, don't attempt to map a source partition during boot, because none exists. Instead use the base device. Bug: 196922070 Test: vts_libsnapshot_test Change-Id: Ice6015237b0a76a0210819994433e52159376393 Merged-In: Ice6015237b0a76a0210819994433e52159376393
2021-08-18Reduce the queue depth of loop devices used by the zram driver am: 1a9cad816dBart Van Assche
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/15584614 Change-Id: Id0a6c5b0e7c9cb118df02a9be768b3f68dde43a9
2021-08-18Reduce the queue depth of loop devices used by the zram driverBart Van Assche
Make the queue depth of loop devices identical to that of the underlying storage device. This patch reduces latency by lowering the queue depth. With this patch applied I see the following: # cat /sys/block/loop30/queue/nr_requests 32 Bug: 194450129 Test: Built Android images, installed these and verified that the queue depth of loop devices is 32 instead of 256. Merged-In: Ifa16084c7df3a54d9559c2388abc4a8392ff88c6 Change-Id: Icc89e1f88d2f0ade2805999afef556b15b7ff8eb Ignore-AOSP-First: Already in AOSP. Signed-off-by: Bart Van Assche <bvanassche@google.com>
2021-08-17Merge "libdm: Export ExtractBlockDeviceName()" into sc-dev am: de0cc6cc59TreeHugger Robot
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/15584613 Change-Id: I1221648f11e6fd2ccae40b1ad5d335c31ff8efa1
2021-08-17Merge "libdm: Make ExtractBlockDeviceName() return its result" into sc-dev ↵TreeHugger Robot
am: 232ec664b1 Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/15584612 Change-Id: I687f47d10a8aa8c955aab5e3c630f2c735e82c19
2021-08-17Merge "Rename two local variables" into sc-dev am: d95943088eTreeHugger Robot
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/15584611 Change-Id: I1a7057d9dd955d425446985cf2ab16955efaa8ce
2021-08-17Merge "libdm: Export ExtractBlockDeviceName()" into sc-devTreeHugger Robot
2021-08-17Merge "libdm: Make ExtractBlockDeviceName() return its result" into sc-devTreeHugger Robot
2021-08-17Merge "Rename two local variables" into sc-devTreeHugger Robot
2021-08-16Merge "Handle long responses by keymint IPC." into sc-dev am: a707c28937TreeHugger Robot
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/15515450 Change-Id: I87baacb3d5ac3854d648cecea3a615132e0d36db
2021-08-16Merge "Handle long responses by keymint IPC." into sc-devTreeHugger Robot
2021-08-16libdm: Export ExtractBlockDeviceName()Bart Van Assche
Make this function available to libdm users. A caller outside libdm will be added by a later patch. Bug: 194450129 Test: mm libfs_mgr libdm_test Merged-In: I3e3560f3cdef8978eac644d5b53cf3851209c0c2 Change-Id: Ic05cc84565952662178bb649ec97cad6f76dcf92 Ignore-AOSP-First: Already in AOSP. Signed-off-by: Bart Van Assche <bvanassche@google.com>
2021-08-16libdm: Make ExtractBlockDeviceName() return its resultBart Van Assche
From https://engdoc.corp.google.com/eng/doc/devguide/cpp/styleguide.md: "Prefer using return values over output parameters: they improve readability, and often provide the same or better performance (see the C++ Primer)." Implement this advice for ExtractBlockDeviceName(). This patch does not change any functionality. Bug: 194450129 Test: mm libfs_mgr libdm_test Merged-In: I6363781163eba08e6128507b403200f472f68a59 Change-Id: I7d340b33281ebccded0836cd0b5a293e941f4043 Ignore-AOSP-First: Already in AOSP. Signed-off-by: Bart Van Assche <bvanassche@google.com>
2021-08-16Rename two local variablesBart Van Assche
Improve code readability by renaming 'device' into 'loop_device' and 'device_fd' into 'loop_fd'. Bug: 194894000 Test: Built Android images and installed these on an Android device. Merged-In: Ia9c2d7a525e727f8706e66631b97fc4678c6a4d9 Change-Id: I3fa0c9ca53277b621bb5b81aca394a3079c6e0a3 Ignore-AOSP-First: Already in AOSP. Signed-off-by: Bart Van Assche <bvanassche@google.com>
2021-08-15Merge "Make RemoteProvisioner required for KeyMint cc_bin" into sc-dev am: ↵Max Bires
98f87ca8a7 Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/15481660 Change-Id: Ifdee480b05d57c18f488365c7329b78417eb2774