Commit graph

71938 commits

Author SHA1 Message Date
David Anderson
05fbdcd3eb libsnapshot: Fix missing source partitions when adding a new partition. am: 0a6f250242
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/15670247

Change-Id: Ieda77c5fc8cf867cb62054e0a38321fdf528e311
2021-08-27 19:36:47 +00:00
David Anderson
0a6f250242 libsnapshot: Fix missing source partitions when adding a new partition.
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-25 00:02:39 +00:00
Bart Van Assche
f54487b6c3 Reduce the queue depth of loop devices used by the zram driver am: 1a9cad816d am: d5a663fde4
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/15584614

Change-Id: I268f8e7799c66accbd293e7d331175eeff933872
2021-08-18 20:18:41 +00:00
Bart Van Assche
d5a663fde4 Reduce the queue depth of loop devices used by the zram driver am: 1a9cad816d
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/15584614

Change-Id: Id0a6c5b0e7c9cb118df02a9be768b3f68dde43a9
2021-08-18 20:04:09 +00:00
Bart Van Assche
1a9cad816d Reduce the queue depth of loop devices used by the zram driver
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-18 11:00:31 -07:00
TreeHugger Robot
4dfc8528d8 Merge "libdm: Export ExtractBlockDeviceName()" into sc-dev am: de0cc6cc59 am: b155a9a8a1
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/15584613

Change-Id: Ib5046e3855f5c4249eed9676022a77aa93a1adce
2021-08-17 06:07:17 +00:00
TreeHugger Robot
b9f40f83eb Merge "libdm: Make ExtractBlockDeviceName() return its result" into sc-dev am: 232ec664b1 am: 10e14c95bc
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/15584612

Change-Id: I3b11fd3d20d34a9440ddb74e96a75922877534c7
2021-08-17 06:07:10 +00:00
TreeHugger Robot
9e6087a88e Merge "Rename two local variables" into sc-dev am: d95943088e am: caef6def08
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/15584611

Change-Id: I5080775507f23eb67293aadc3e2ce4e7f42e3fd1
2021-08-17 06:07:02 +00:00
TreeHugger Robot
b155a9a8a1 Merge "libdm: Export ExtractBlockDeviceName()" into sc-dev am: de0cc6cc59
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/15584613

Change-Id: I1221648f11e6fd2ccae40b1ad5d335c31ff8efa1
2021-08-17 05:52:31 +00:00
TreeHugger Robot
10e14c95bc Merge "libdm: Make ExtractBlockDeviceName() return its result" into sc-dev am: 232ec664b1
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/15584612

Change-Id: I687f47d10a8aa8c955aab5e3c630f2c735e82c19
2021-08-17 05:52:19 +00:00
TreeHugger Robot
caef6def08 Merge "Rename two local variables" into sc-dev am: d95943088e
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/15584611

Change-Id: I1a7057d9dd955d425446985cf2ab16955efaa8ce
2021-08-17 05:52:07 +00:00
TreeHugger Robot
de0cc6cc59 Merge "libdm: Export ExtractBlockDeviceName()" into sc-dev 2021-08-17 05:38:11 +00:00
TreeHugger Robot
232ec664b1 Merge "libdm: Make ExtractBlockDeviceName() return its result" into sc-dev 2021-08-17 05:38:09 +00:00
TreeHugger Robot
d95943088e Merge "Rename two local variables" into sc-dev 2021-08-17 05:38:07 +00:00
TreeHugger Robot
e9aa841c95 Merge "Handle long responses by keymint IPC." into sc-dev am: a707c28937 am: ec759fe14d
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/15515450

Change-Id: Iab05aa4155a10ff9c0fcfcfbb1bd1a7e3dbf25b0
2021-08-16 20:37:19 +00:00
TreeHugger Robot
ec759fe14d Merge "Handle long responses by keymint IPC." into sc-dev am: a707c28937
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/15515450

Change-Id: I87baacb3d5ac3854d648cecea3a615132e0d36db
2021-08-16 20:24:24 +00:00
TreeHugger Robot
a707c28937 Merge "Handle long responses by keymint IPC." into sc-dev 2021-08-16 20:07:15 +00:00
Bart Van Assche
9e54a90e54 libdm: Export ExtractBlockDeviceName()
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-16 11:04:40 -07:00
Bart Van Assche
96b21cc589 libdm: Make ExtractBlockDeviceName() return its result
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-16 11:04:35 -07:00
Bart Van Assche
c554240e64 Rename two local variables
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-16 11:04:18 -07:00
Max Bires
ab96ce997a Merge "Make RemoteProvisioner required for KeyMint cc_bin" into sc-dev am: 98f87ca8a7 am: a19f6e3940
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/15481660

Change-Id: I6cee24f3f1bc7d5ad7c41d726d2a505b9ef5bd13
2021-08-15 18:27:05 +00:00
Max Bires
a19f6e3940 Merge "Make RemoteProvisioner required for KeyMint cc_bin" into sc-dev am: 98f87ca8a7
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/15481660

Change-Id: Ifdee480b05d57c18f488365c7329b78417eb2774
2021-08-15 18:09:28 +00:00
Max Bires
98f87ca8a7 Merge "Make RemoteProvisioner required for KeyMint cc_bin" into sc-dev 2021-08-15 17:55:48 +00:00
Xin Li
ba6fff6d8a [automerger skipped] Merge stage-aosp-sc-ts-dev before making it an upstream am: dc9e8e5084 -s ours am: 78993f1baf -s ours
am skip reason: Merged-In I3735e0752a6e502536000bd3102abda30cbd58fe with SHA-1 84b4353790 is already in history

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

Change-Id: Ieca4545d31f830b896c014e64e5026ada2cb8604
2021-08-13 21:20:26 +00:00
Xin Li
78993f1baf [automerger skipped] Merge stage-aosp-sc-ts-dev before making it an upstream am: dc9e8e5084 -s ours
am skip reason: Merged-In I3735e0752a6e502536000bd3102abda30cbd58fe with SHA-1 84b4353790 is already in history

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

Change-Id: If7b98731765d23bafcf1299c4be89eb09e050771
2021-08-13 20:53:29 +00:00
The Android Open Source Project
938071b497 [automerger skipped] Merge ab/7633965 am: 65335e200f -s ours
am skip reason: Merged-In I7afea72a15b1a2a7aa676bddd12ea4a2dd896f81 with SHA-1 bbedda71e1 is already in history

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

Change-Id: I376a4b7daf86c6b881ea91ffecd61a13f7310793
2021-08-13 19:33:43 +00:00
Xin Li
dc9e8e5084 Merge stage-aosp-sc-ts-dev before making it an upstream
Bug: 169893837
Merged-In: I3735e0752a6e502536000bd3102abda30cbd58fe
Change-Id: I0e78f7e9c3f27e44d1c04bbd138e840829a3dc84
2021-08-13 18:27:12 +00:00
The Android Open Source Project
65335e200f Merge ab/7633965
Bug: 169893837
Merged-In: I7afea72a15b1a2a7aa676bddd12ea4a2dd896f81
Change-Id: Id30ca5943b34b6fffc1f203667b5a59a79950f67
2021-08-12 22:27:46 +00:00
Eric Biggers
577e7667d2 Merge "fs_mgr: Look for fstab file in /system/etc" into sc-qpr1-dev am: 1312688506
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/15522163

Change-Id: I2c3b74e114c212a941a38131026dbd2e1aad2114
2021-08-12 21:32:53 +00:00
Eric Biggers
1312688506 Merge "fs_mgr: Look for fstab file in /system/etc" into sc-qpr1-dev 2021-08-12 21:15:37 +00:00
David Anderson
6b1da7ba5b Merge "fastbootd: Delete all VAB partitions during "flashall"." into sc-qpr1-dev am: d92cd94d81
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/15523335

Change-Id: I33e1ea6d6235e5028f278bbe0ea21e14dc3c3416
2021-08-12 18:17:02 +00:00
David Anderson
d92cd94d81 Merge "fastbootd: Delete all VAB partitions during "flashall"." into sc-qpr1-dev 2021-08-12 18:00:22 +00:00
Tri Vo
2f153a4a8f Merge "trusty: storage: Allow starting without /data mounted" into sc-dev am: c87ea84d20 am: aa51f69d7a
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/15479651

Change-Id: I3522901062c52f91e08be7b432e696a9881c222a
2021-08-11 16:22:00 +00:00
Tri Vo
aa51f69d7a Merge "trusty: storage: Allow starting without /data mounted" into sc-dev am: c87ea84d20
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/15479651

Change-Id: I47de7199ac5226fdd20ca39e0f29d2aa0237b91f
2021-08-11 16:09:19 +00:00
Tri Vo
c87ea84d20 Merge "trusty: storage: Allow starting without /data mounted" into sc-dev 2021-08-11 16:02:35 +00:00
David Anderson
340e78d0f6 fastbootd: Delete all VAB partitions during "flashall".
With VAB we encourage a smaller super partition, so make sure we delete
"other" slot partitions during flashing. Otherwise, we may not have
enough space in super.

Bug: 195930130
Test: set_active, flashall, ensure other slot is deleted
Change-Id: Ic6a4f60e8f4c7abb8af7b38228753ad8ed85eedf
Merged-In: Ic6a4f60e8f4c7abb8af7b38228753ad8ed85eedf
2021-08-11 00:29:07 +00:00
Janis Danisevskis
5f4770944a Handle long responses by keymint IPC.
The KeyMint TA may send responses that are longer thant the 8K buffer
that the KeyMint HAL holds. This patch introduces
trusty_keymaster_call_2 which can grow the receive buffer on demand.

Ignore-AOSP-First: No mergepath from AOSP.

Bug: 195622501
Test: VTS and CTS test for regression testing.
Change-Id: Ia06e590e547e649ca81cda9a71851f334970788f
2021-08-10 15:08:20 -07:00
David Anderson
4b30ee6a6a Use std::shared_ptr in Epoll's callback list. am: 2cf268ab9f am: 81c5a30224 am: bbedda71e1 am: 4905ce5086
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/15128087

Change-Id: I0a9321f57e57ab9e6cdfcd7aca62f94c101e9f8f
2021-08-10 22:05:23 +00:00
David Anderson
8fe5dbd779 Use std::shared_ptr in Epoll's callback list. am: 2cf268ab9f am: 5e66f7148b am: 6fa3c6a94a am: 5ca4715fcd
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/15128087

Change-Id: I548e1a74906071703007415a73345f02b550f354
2021-08-10 22:05:15 +00:00
Eric Biggers
4056ccc2e5 fs_mgr: Look for fstab file in /system/etc
Look for the fstab file in /system/etc as an alternative to /, in order
to allow fstab files to be installed using the "prebuilt_etc" Soong
module.

This new path is meant to be used by the vendor ramdisk only. As before,
fstabs should *not* be placed in /system/etc on the system partition.

In more detail: sometimes, multiple nearly-identical fstabs need to be
installed to a device, with the correct one being selected at boot time
(b/191417025 as well as other cases that partners have run into).  To
avoid error-prone duplication of configuration files, these fstabs
should be generated from a template by the build system instead of being
duplicated in the source tree.  But if this is done, the usual way of
installing fstabs (PRODUCT_COPY_FILES) can't be used; they need to be
made into real build system modules instead.

Currently, the "prebuilt_etc" Soong module can't correctly install the
vendor_ramdisk copy of the fstab(s), since it will install it into the
/system/etc directory whereas Android currently requires that the
vendor_ramdisk copy of the fstab(s) be placed in the root directory.

Earlier I proposed adding a "prebuilt_fstab" module to handle this quirk
(https://r.android.com/1744033).  However, it was requested to instead
always look for the fstabs in /etc too, in order to allow "prebuilt_etc"
to be used and because /etc is the appropriate place for this file.
This change implements that suggestion (but actually using /system/etc,
since that is where "prebuilt_etc" actually installs it).

Bug: 191417025
Test: Tested that a device boots both with this, both before and after
      http://ag/15075136 which uses the new location.
Change-Id: Id083070e51ae85959167e4615cd96b31a0b1bd6a
Merged-In: Id083070e51ae85959167e4615cd96b31a0b1bd6a
(cherry picked from commit e98afa2687)
2021-08-10 14:55:03 -07:00
David Anderson
4905ce5086 Use std::shared_ptr in Epoll's callback list. am: 2cf268ab9f am: 81c5a30224 am: bbedda71e1
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/15128087

Change-Id: I833f5fceb7db60dcebbdb49a0a8e5af0c55fea9c
2021-08-10 21:42:07 +00:00
David Anderson
5ca4715fcd Use std::shared_ptr in Epoll's callback list. am: 2cf268ab9f am: 5e66f7148b am: 6fa3c6a94a
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/15128087

Change-Id: Ia7e9b4e5e294c5633163359f1fe8835d67400495
2021-08-10 21:38:40 +00:00
David Anderson
bbedda71e1 Use std::shared_ptr in Epoll's callback list. am: 2cf268ab9f am: 81c5a30224
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/15128087

Change-Id: I7afea72a15b1a2a7aa676bddd12ea4a2dd896f81
2021-08-10 21:19:35 +00:00
David Anderson
6fa3c6a94a Use std::shared_ptr in Epoll's callback list. am: 2cf268ab9f am: 5e66f7148b
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/15128087

Change-Id: Ie32637ad0fc07205c9df915fdbcd5dc1a9154701
2021-08-10 21:18:25 +00:00
David Anderson
81c5a30224 Use std::shared_ptr in Epoll's callback list. am: 2cf268ab9f
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/15128087

Change-Id: I87c13501dddf402605de939f51fb894c53039943
2021-08-10 21:09:03 +00:00
David Anderson
5e66f7148b Use std::shared_ptr in Epoll's callback list. am: 2cf268ab9f
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/15128087

Change-Id: I57974f85be50fdea6ec6e10d9038a16061763f61
2021-08-10 21:08:21 +00:00
David Anderson
2cf268ab9f Use std::shared_ptr in Epoll's callback list.
Ignore-AOSP-First: Awaiting security triage
Bug: 187862380
Bug: 184569329
Test: CtsInitTestCases
Change-Id: Ibb34a6b8a5675dbc515b7f8a43d7eecf2084510c
(cherry picked from commit aea9781530)
2021-08-09 21:25:49 +00:00
Max Bires
58aa431069 Make RemoteProvisioner required for KeyMint cc_bin
This change adds the RPK apk back into the image for Trusty Keymint
devices, though the functionality will still be disabled by the
server check-in for now.

Ignore-AOSP-First: Will be CP'ed to AOSP
Bug: 194509629
Test: atest RemoteProvisionerUnitTests
Change-Id: Ic20ca119bd9c0614f7559b24ad60718c813a0cca
2021-08-06 05:58:24 -07:00
Tri Vo
84b4353790 trusty: storage: Allow starting without /data mounted
Bug: 187105270
Test: m
Change-Id: I3735e0752a6e502536000bd3102abda30cbd58fe
Merged-In: I3735e0752a6e502536000bd3102abda30cbd58fe
2021-08-06 05:38:27 +00:00
Akilesh Kailash
c2460a7ca0 Crash during OTA merge may lead to blocks with stale data am: 533c2f6d55
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/15413918

Change-Id: I09207d3a7d285d116be9b1fce86e62d5115124f5
2021-07-29 22:46:48 +00:00