OSDN Git Service
Alan Stokes [Mon, 5 Oct 2020 08:23:08 +0000 (08:23 +0000)]
Merge "Enable vold to set level from user."
Alan Stokes [Fri, 7 Feb 2020 09:29:38 +0000 (09:29 +0000)]
Enable vold to set level from user.
We want various per-user directories to have their SELinux MLS level
set to restrict access from other users, as an improvement to user
isolation.
We extend vold_prepare_subdirs to implement this if a flag is
set. vold itself then sets the flag based on a new property,
ro.vold.level_from_user. This is to allow testing of further
incremental work to ensure system apps correctly handle the new
restriction on different devices rather than causing immediate
breakage. Eventually this will go away and the restriction will apply
everywhere.
Bug:
141677108
Test: Manual, with and without propery set.
Change-Id: I8e2207bd94b487bdcc09fd4d80b031027dfea1e3
Treehugger Robot [Thu, 24 Sep 2020 16:06:58 +0000 (16:06 +0000)]
Merge "vold: remove unused stop() methods"
Eric Biggers [Wed, 23 Sep 2020 17:00:40 +0000 (10:00 -0700)]
vold: remove unused stop() methods
NetlinkManager::stop() and VolumeManager::stop() are never called, so
remove them.
Change-Id: I868aa2ad24066d2830816984afcc10000cbabad1
Treehugger Robot [Mon, 21 Sep 2020 09:44:03 +0000 (09:44 +0000)]
Merge "bench: Add fail-fast error path to inodeop_bench"
Stefano Duo [Fri, 18 Sep 2020 09:00:42 +0000 (09:00 +0000)]
bench: Add fail-fast error path to inodeop_bench
If one of the repeated operations specified by a command fails, report
the error to the user and don't export its metric.
Test: Manual run on physical device
Bug:
165903680
Signed-off-by: Stefano Duo <stefanoduo@google.com>
Change-Id: I3a8caeb6d878b004d89e425bc166c8505fda938a
Treehugger Robot [Wed, 16 Sep 2020 01:24:16 +0000 (01:24 +0000)]
Merge "vold: remove unused code for CONFIG_HW_DISK_ENCRYPTION"
Eric Biggers [Tue, 15 Sep 2020 18:55:40 +0000 (11:55 -0700)]
vold: remove unused code for CONFIG_HW_DISK_ENCRYPTION
Nothing defines CONFIG_HW_DISK_ENCRYPTION, so remove the unused code
that's conditional on it being defined.
Change-Id: Ie435e138686eb4eac47d9aa762ae06f1645a117f
Daeho Jeong [Mon, 14 Sep 2020 23:50:17 +0000 (23:50 +0000)]
Merge "secdiscard: use F2FS_IOC_SEC_TRIM_FILE for secure discard"
Daeho Jeong [Tue, 8 Sep 2020 03:59:28 +0000 (12:59 +0900)]
secdiscard: use F2FS_IOC_SEC_TRIM_FILE for secure discard
A new interface, F2FS_IOC_SEC_TRIM_FILE, has been added to F2FS
filesystem to send secure discard command to a specific file,
not to block device. We can use this interface for better discard
command handling on a file basis.
[how to use F2FS_IOC_SEC_TRIM_FILE]
start: start offset in byte (should be aligned with 4096)
len: length in byte (should be aligned with 4096, except designating EOF)
-1 also means till EOF.
flags: F2FS_TRIM_FILE_DISCARD - sending secure discard command. If the
device doesn't support it, send normal
discard.
F2FS_TRIM_FILE_ZEROOUT - overwrite zero data in the file.
Bug:
140759142
Test: execute "secdiscard -- <file_path>" and check the content of file
Signed-off-by: Daeho Jeong <daehojeong@google.com>
Change-Id: I6ee44a047d291274c9d70ae5e4ccccfc06a52f89
Treehugger Robot [Fri, 11 Sep 2020 08:19:44 +0000 (08:19 +0000)]
Merge "Add '-unstable' to solve ODR violation"
Jeongik Cha [Fri, 14 Aug 2020 14:51:36 +0000 (23:51 +0900)]
Add '-unstable' to solve ODR violation
The interface which is imported by an unstable interface is 'unstable'
as well. Until now, the ODR violation checker in aidl has omitted an
interface imported, but it will be checked, accordingly, fix the current
problem
Bug:
146436251
Test: m nothing
Change-Id: Id3c4bbc9149ba7c3e0a0d728026f02f60cb17424
Merged-In: Id3c4bbc9149ba7c3e0a0d728026f02f60cb17424
Exempt-From-Owner-Approval: cp from internal
Xin Li [Thu, 10 Sep 2020 17:22:31 +0000 (17:22 +0000)]
Merge "Merge Android R"
Xin Li [Thu, 10 Sep 2020 03:21:28 +0000 (20:21 -0700)]
Merge Android R
Bug:
168057903
Merged-In: I477d2dfba05718c829fdb2099248a8baba1125ab
Change-Id: Ib60b99425dc79ca4c5b23772f32036f4e17ad11f
Treehugger Robot [Wed, 9 Sep 2020 13:34:41 +0000 (13:34 +0000)]
Merge "bench: Add inodeop_bench benchmark" am:
e804806d79
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/
1421048
Change-Id: I477d2dfba05718c829fdb2099248a8baba1125ab
Treehugger Robot [Wed, 9 Sep 2020 13:03:12 +0000 (13:03 +0000)]
Merge "bench: Add inodeop_bench benchmark"
Stefano Duo [Mon, 7 Sep 2020 16:30:49 +0000 (16:30 +0000)]
bench: Add inodeop_bench benchmark
Add new benchmark capable of generating specific inode operations
workloads. Currently, it supports create, delete, move, hardlink and
symlink.
Test: Manual run on cuttlefish and physical device
Bug:
165903680
Signed-off-by: Stefano Duo <stefanoduo@google.com>
Change-Id: Ia47f259b7ccea5fe1665b272c3cbc9ec1bf2eb56
Xin Li [Thu, 27 Aug 2020 17:17:42 +0000 (10:17 -0700)]
Merge Android R (rvc-dev-plus-aosp-without-vendor@
6692709)
Bug:
166295507
Merged-In: Id417587a550b0f4abf5a6a3e4b4535011b21f627
Change-Id: Ibb5e8cf5f36dad408cf047dd0498aba24249b695
Treehugger Robot [Tue, 11 Aug 2020 10:56:15 +0000 (10:56 +0000)]
Merge "Add maco@ to vold OWNERS." am:
157a08bb92
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/
1396467
Change-Id: I0d0a8048465e190105f03dfe76fbf5c8393a4198
Treehugger Robot [Tue, 11 Aug 2020 10:34:17 +0000 (10:34 +0000)]
Merge "Add maco@ to vold OWNERS."
Martijn Coenen [Tue, 11 Aug 2020 07:13:27 +0000 (09:13 +0200)]
Add maco@ to vold OWNERS.
Bug: N/A
Test: N/A
Change-Id: Ib00991eccbd33e719a64d55da932f7f2bfab7b71
Eric Biggers [Mon, 10 Aug 2020 22:53:51 +0000 (22:53 +0000)]
Merge "vold: use __ANDROID_API_Q__ instead of pre_gki_level" am:
ee1a70c129
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/
1395128
Change-Id: Iacb41f3dba6c2a57943f766b749d87efe6f4e4b3
Eric Biggers [Mon, 10 Aug 2020 22:35:21 +0000 (22:35 +0000)]
Merge "vold: use __ANDROID_API_Q__ instead of pre_gki_level"
Eric Biggers [Mon, 10 Aug 2020 17:55:56 +0000 (10:55 -0700)]
vold: use __ANDROID_API_Q__ instead of pre_gki_level
The name "pre_gki_level" is causing some confusion because not all
devices launching with Android R are subject to the GKI requirement.
(See b/
161563110#comment11.) E.g., devices that use a 4.14-based kernel
are exempt from GKI. However, the encryption requirements still apply.
Just use __ANDROID_API_Q__ directly instead.
No change in behavior.
Change-Id: Id02ae1140845ac1ae7cf78be4e57fe34da028abf
Eric Biggers [Mon, 10 Aug 2020 18:04:57 +0000 (18:04 +0000)]
Merge "EncryptInPlace: ensure that backup superblocks get encrypted" am:
213dbe30a1
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/
1385029
Change-Id: I29e6eab9571d4556883594049f4abc33d9ffa674
Eric Biggers [Mon, 10 Aug 2020 17:52:39 +0000 (17:52 +0000)]
Merge "EncryptInPlace: ensure that backup superblocks get encrypted"
Will Shiu [Wed, 29 Jul 2020 09:03:17 +0000 (17:03 +0800)]
EncryptInPlace: ensure that backup superblocks get encrypted
Block groups with EXT4_BG_BLOCK_UNINIT still have backup superblocks
(and backup block group descriptors). Fix EncryptInPlace to encrypt
these backup superblocks rather than leave them unencrypted.
Previously leaving the backup superblocks unencrypted didn't cause any
problems, but due to system/core commit
72abd7b246f7 ("Try to recover
corrupted ext4 /data with backup superblock") it is causing problems.
Bug:
162479411
Bug:
161871210
Change-Id: Ic090bf4e88193b289b04c5254ddf661ef40b037e
Treehugger Robot [Fri, 17 Jul 2020 19:02:45 +0000 (19:02 +0000)]
Merge "vold: restore -D__ANDROID_DEBUGGABLE__" am:
5de675c93b am:
bb92ff6591
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/
1365586
Change-Id: Id417587a550b0f4abf5a6a3e4b4535011b21f627
Treehugger Robot [Fri, 17 Jul 2020 18:38:05 +0000 (18:38 +0000)]
Merge "vold: restore -D__ANDROID_DEBUGGABLE__" am:
5de675c93b
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/
1365586
Change-Id: Ibb6947f1fad7a31cf2a42c3604c76fcf45a7082a
Treehugger Robot [Fri, 17 Jul 2020 18:24:51 +0000 (18:24 +0000)]
Merge "vold: restore -D__ANDROID_DEBUGGABLE__"
Mark Salyzyn [Fri, 17 Jul 2020 15:17:50 +0000 (08:17 -0700)]
vold: restore -D__ANDROID_DEBUGGABLE__
Regression introduced by
commit
7ebcc2bcfde2cf6713e2975224034b06ba0943d8
("Revert "[Vold] Conditional dependency to ARC++ ObbVolume"")
errantly removed the product_variables support for
-D__ANDROID_DEBUGGABLE__ when built for userdebug builds.
Restore stanza.
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug:
161454607
Test: adb-remount-test no longer reports a problem
Change-Id: Ia7e55d1174fa7fac2d934d4aac06d15e8be388af
Eric Biggers [Fri, 17 Jul 2020 01:50:24 +0000 (01:50 +0000)]
Merge "KeyUtil: use static local variable in isFsKeyringSupported()" am:
256b23b1c5 am:
350b5ae900
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/
1365220
Change-Id: Ia7fca6e61c58317002271c8338bb01a12e8223a5
Eric Biggers [Fri, 17 Jul 2020 01:50:07 +0000 (01:50 +0000)]
Merge "vold: drop local fscrypt UAPI definitions" am:
47425d05a9 am:
83a3eecc03
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/
1365221
Change-Id: Iffa50e4c549469de6425134369e609856f1d7813
Eric Biggers [Fri, 17 Jul 2020 01:38:51 +0000 (01:38 +0000)]
Merge "KeyUtil: use static local variable in isFsKeyringSupported()" am:
256b23b1c5
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/
1365220
Change-Id: I94b778955b2ee5cd8c462050e94c39ce05c96179
Eric Biggers [Fri, 17 Jul 2020 01:38:44 +0000 (01:38 +0000)]
Merge "vold: drop local fscrypt UAPI definitions" am:
47425d05a9
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/
1365221
Change-Id: If47e4ced3b37e44772d802fb8ebe2d9ad51c03e2
Eric Biggers [Fri, 17 Jul 2020 01:20:43 +0000 (01:20 +0000)]
Merge "KeyUtil: use static local variable in isFsKeyringSupported()"
Eric Biggers [Fri, 17 Jul 2020 01:19:39 +0000 (01:19 +0000)]
Merge "vold: drop local fscrypt UAPI definitions"
Eric Biggers [Thu, 16 Jul 2020 23:31:00 +0000 (16:31 -0700)]
vold: drop local fscrypt UAPI definitions
Now that Bionic's copy of <linux/fscrypt.h> has been updated, there's no
need for vold to carry its own fscrypt_uapi.h.
Test: build
Change-Id: I61581ac74f7cf77bc8a835e64d96553a9d0c517a
Eric Biggers [Thu, 16 Jul 2020 21:29:59 +0000 (14:29 -0700)]
KeyUtil: use static local variable in isFsKeyringSupported()
Use C++'s built-in mechanism for one-time initialization rather than
implement it ourselves in a way that isn't thread-safe.
(It doesn't *actually* need to be thread-safe, since all callers of this
run under ACQUIRE_CRYPT_LOCK. But that's not easy to verify.)
Test: booted Cuttlefish and checked log for the one-time message
"Detected support for FS_IOC_ADD_ENCRYPTION_KEY"
Change-Id: I6ca5b143ca305fa95144e388efc9657e3507bf05
Eric Biggers [Thu, 16 Jul 2020 21:00:33 +0000 (21:00 +0000)]
Merge "vold: remove checkEncryption" am:
2d9777bfbf am:
15c0d3e5d0
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/
1363339
Change-Id: I23b9a01632b61a92896ae83e2152fa047dd85c48
Eric Biggers [Thu, 16 Jul 2020 20:45:57 +0000 (20:45 +0000)]
Merge "vold: remove checkEncryption" am:
2d9777bfbf
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/
1363339
Change-Id: I4ffa4a351292c18dce51247d926ffe7efdbd5bea
Eric Biggers [Thu, 16 Jul 2020 20:30:35 +0000 (20:30 +0000)]
Merge "vold: remove checkEncryption"
Treehugger Robot [Thu, 16 Jul 2020 12:03:40 +0000 (12:03 +0000)]
Merge "Revert "[Vold] Conditional dependency to ARC++ ObbVolume"" am:
6e6fc6b8d3 am:
11757842a3
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/
1320919
Change-Id: Iec0c1190443f1366a0f105bb3eba3967635ff544
Treehugger Robot [Thu, 16 Jul 2020 11:51:01 +0000 (11:51 +0000)]
Merge "Revert "[Vold] Conditional dependency to ARC++ ObbVolume"" am:
6e6fc6b8d3
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/
1320919
Change-Id: I6fb0ca30c54791549923099c1acf74667e06ae5b
Treehugger Robot [Thu, 16 Jul 2020 11:04:04 +0000 (11:04 +0000)]
Merge "Revert "[Vold] Conditional dependency to ARC++ ObbVolume""
Eric Biggers [Wed, 15 Jul 2020 18:06:02 +0000 (11:06 -0700)]
vold: remove checkEncryption
The testing-only "checkEncryption" command has been replaced with
VtsKernelEncryptionTest [1]. In particular, the metadata encryption
documentation [2] no longer mentions checkEncryption but rather
recommends running VtsKernelEncryptionTest. Also, checkEncryption
hasn't really been maintained, and it has some known bugs; it's unclear
that many people ever really used it.
So, just remove it.
[1] https://android.googlesource.com/platform/test/vts-testcase/kernel/+/refs/heads/master/encryption/
[2] https://source.android.com/security/encryption/metadata#tests
Bug:
155037012
Change-Id: I258829c60768fd11aafdf2faad956cecc1ae9826
Satoshi Niwa [Mon, 1 Jun 2020 12:03:36 +0000 (21:03 +0900)]
Revert "[Vold] Conditional dependency to ARC++ ObbVolume"
This reverts commit
aedae617fec702add64201534a2f514fa31c5965.
Reason for revert: ArcObbVolume is not needed by ARCVM R and above.
Bug:
157885448
Test: trybot
Change-Id: I16395ac8b6902cedea263f51e306b297d719043f
Eric Biggers [Wed, 8 Jul 2020 00:22:58 +0000 (00:22 +0000)]
[automerger skipped] vold: only allow emmc_optimized on eMMC storage am:
006eed8e3a -s ours
am skip reason: Change-Id Ie27b80658db53b1a4207b3cbb4e309d05130812e with SHA-1
eb566d0a7c is in history
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/vold/+/
12098822
Change-Id: Id8c90f1833a171c12936a5f4aa2bf80574f5cb64
Eric Biggers [Tue, 7 Jul 2020 17:37:34 +0000 (17:37 +0000)]
Merge "vold: only allow emmc_optimized on eMMC storage" am:
428ae6e90a am:
7a1c4ccb96
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/
1356175
Change-Id: Ie124c2cec8e4235ae999463d5c03615880e0c01e
Eric Biggers [Tue, 7 Jul 2020 17:24:35 +0000 (17:24 +0000)]
Merge "vold: only allow emmc_optimized on eMMC storage" am:
428ae6e90a
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/
1356175
Change-Id: I95f471e6a2a96929b1ff854cac195b68e86309f3
Eric Biggers [Mon, 6 Jul 2020 20:46:38 +0000 (13:46 -0700)]
vold: only allow emmc_optimized on eMMC storage
The emmc_optimized encryption flag is specifically designed for the
limitations of inline encryption hardware that follows the eMMC
standard. It isn't appropriate to use on other types of storage.
So, make vold enforce that it's not used on other types of storage.
Bug:
160639344
Test:
- Enabled emmc_optimized on Cuttlefish and verified it no longer boots
- Using a modified version of this change, verified that
IsEmmcStorage() works as expected on various devices including
Cuttlefish, Cuttlefish booted in GSI image mode, a device with eMMC
storage, and a device with UFS storage.
- Verified that VtsKernelEncryptionTest still passes
Change-Id: Ie27b80658db53b1a4207b3cbb4e309d05130812e
Merged-In: Ie27b80658db53b1a4207b3cbb4e309d05130812e
Eric Biggers [Tue, 7 Jul 2020 17:07:58 +0000 (17:07 +0000)]
Merge "vold: only allow emmc_optimized on eMMC storage"
Eric Biggers [Mon, 6 Jul 2020 20:46:38 +0000 (13:46 -0700)]
vold: only allow emmc_optimized on eMMC storage
The emmc_optimized encryption flag is specifically designed for the
limitations of inline encryption hardware that follows the eMMC
standard. It isn't appropriate to use on other types of storage.
So, make vold enforce that it's not used on other types of storage.
Bug:
160639344
Test:
- Enabled emmc_optimized on Cuttlefish and verified it no longer boots
- Using a modified version of this change, verified that
IsEmmcStorage() works as expected on various devices including
Cuttlefish, Cuttlefish booted in GSI image mode, a device with eMMC
storage, and a device with UFS storage.
- Verified that VtsKernelEncryptionTest still passes
Change-Id: Ie27b80658db53b1a4207b3cbb4e309d05130812e
Martijn Coenen [Tue, 30 Jun 2020 09:57:21 +0000 (09:57 +0000)]
Configure backing device max_ratio for FUSE filesystems. am:
a485006ab1
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/vold/+/
12024019
Change-Id: I5cd116bfb01b0fe98dfdcd7d4b8005819ccfeb11
Martijn Coenen [Mon, 29 Jun 2020 09:53:34 +0000 (11:53 +0200)]
Configure backing device max_ratio for FUSE filesystems.
By default FUSE filesystems have a max_ratio of 1%, meaning only 1% of
dirty pages on the system can belong to a FUSE filesystem before we
start writing back pages (and throttling, if writeback can't keep up).
This limit is useful for untrusted filesystems, but in our case, we
trust the FUSE filesystem. Since FUSE writes result in writes to the
lower filesystem, FUSE should take at most 50%. Let's start with
changing max_ratio to 40%, to avoid needless throttling.
Bug:
159254170
Bug:
159770752
Test: inspect /sys/class/bdi manually after boot
Change-Id: I467e3770fc4afba0a08fa480c0b86aa054c8b875
Zim [Mon, 22 Jun 2020 16:53:26 +0000 (16:53 +0000)]
Unmount public volume if FUSE mount fails am:
f71707916f
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/vold/+/
11900947
Change-Id: Ie390d39ede3dbd63012b0c5acdbcac57e0143145
Zim [Wed, 17 Jun 2020 13:56:10 +0000 (14:56 +0100)]
Unmount public volume if FUSE mount fails
Sometimes, during early boot, a public volume may be created before
the user is unlocked and the mount may fail. This mount failure does
not revert the lower fs mounts (sdcardfs and vfat). Subsequent
mount attempts will then fail because we'd attempt to mount vfat on
already mounted /mnt/media_rw/<volname>
Bug:
158489548
Test: Resilient to an artificial sleep in
StorageManagerService#completeUnlockUser to
delay user unlock longer than public volume mount
Change-Id: I9a1574596434a2eb6b2553c0c9220c2118c7e4fd
David Anderson [Fri, 19 Jun 2020 20:21:48 +0000 (20:21 +0000)]
[automerger skipped] Merge "Add an isCheckpointing() binder call for adb remount." into rvc-dev am:
f87198e025 -s ours
am skip reason: Change-Id I33a691da3b99343acfc1e8ddf68a14504c3bfbe1 with SHA-1
23850d30f6 is in history
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/vold/+/
11917729
Change-Id: I324e156e155f361491f963518f69a956ac23dd7f
David Anderson [Fri, 19 Jun 2020 20:04:54 +0000 (20:04 +0000)]
Merge "Add an isCheckpointing() binder call for adb remount." into rvc-dev
David Anderson [Thu, 11 Jun 2020 06:51:17 +0000 (23:51 -0700)]
Add an isCheckpointing() binder call for adb remount.
This is needed so "adb remount" can avoid writing to /data during a
checkpoint.
Bug:
157540389
Test: manual test
Change-Id: I33a691da3b99343acfc1e8ddf68a14504c3bfbe1
Merged-In: I33a691da3b99343acfc1e8ddf68a14504c3bfbe1
TreeHugger Robot [Thu, 18 Jun 2020 22:36:16 +0000 (22:36 +0000)]
[automerger skipped] Merge "Don't call block checkpoint functions above dm-default-key" into rvc-dev am:
14d4e7c7df -s ours
am skip reason: Change-Id Ic15fadc67d306463dd0b554f679306d8f9081451 with SHA-1
3fe931109c is in history
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/vold/+/
11886461
Change-Id: I4559e77b9ea60cf49f4824dc93a6a6141b9fb94b
TreeHugger Robot [Thu, 18 Jun 2020 22:22:58 +0000 (22:22 +0000)]
Merge "Don't call block checkpoint functions above dm-default-key" into rvc-dev
Paul Lawrence [Thu, 18 Jun 2020 22:16:14 +0000 (22:16 +0000)]
Merge "Don't call block checkpoint functions above dm-default-key" am:
1bb7e8a928 am:
53f1d07339
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/
1330879
Change-Id: I54fdd3098c52dcb53cee0956f4dd1e43e09f5800
David Anderson [Thu, 18 Jun 2020 22:15:56 +0000 (22:15 +0000)]
Merge "Add an isCheckpointing() binder call for adb remount." am:
b50480bb96 am:
60e41b7084
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/
1330854
Change-Id: I0aa0536cfd33f189525115efa07e49930f53b79a
Paul Lawrence [Thu, 18 Jun 2020 22:00:47 +0000 (22:00 +0000)]
Merge "Don't call block checkpoint functions above dm-default-key" am:
1bb7e8a928
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/
1330879
Change-Id: Ifa48af749baa5d50c7459dbb5bda1573d847b622
David Anderson [Thu, 18 Jun 2020 22:00:37 +0000 (22:00 +0000)]
Merge "Add an isCheckpointing() binder call for adb remount." am:
b50480bb96
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/
1330854
Change-Id: I14674da2b3cf86c09179b94e28e76fec30378e12
Paul Lawrence [Fri, 12 Jun 2020 15:12:48 +0000 (08:12 -0700)]
Don't call block checkpoint functions above dm-default-key
Bug:
156225476
Test: Build for f2fs and ext4 device, make sure checkpoints roll back
and commit
Merged-In: Ic15fadc67d306463dd0b554f679306d8f9081451
Change-Id: Ic15fadc67d306463dd0b554f679306d8f9081451
Paul Lawrence [Thu, 18 Jun 2020 21:56:10 +0000 (21:56 +0000)]
Merge "Don't call block checkpoint functions above dm-default-key"
David Anderson [Thu, 18 Jun 2020 21:45:21 +0000 (21:45 +0000)]
Merge "Add an isCheckpointing() binder call for adb remount."
Nikita Ioffe [Wed, 17 Jun 2020 16:53:30 +0000 (16:53 +0000)]
Merge "Configure read ahead for fuse mounts" into rvc-dev am:
bcd7d5e7ce
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/vold/+/
11837171
Change-Id: I90e3ab660ddb356bd7c0212e188b997f6bfa07d4
Nikita Ioffe [Wed, 17 Jun 2020 16:37:37 +0000 (16:37 +0000)]
Merge "Configure read ahead for fuse mounts" into rvc-dev
Nikita Ioffe [Fri, 12 Jun 2020 11:59:45 +0000 (12:59 +0100)]
Configure read ahead for fuse mounts
For fuse read ahead can be configured by writing a value to the
/sys/class/bdi/{MAJOR}:{MINOR}/read_ahead_kb file.
There are several different ways of getting {MAJOR}:{MINOR} values of
the filesystem:
* Look at st_dev of stat("/mnt/user/0/emulated").
* Parse /proc/self/mountinfo.
Stat'ing approach is used since it's easier to implement.
Bug:
157982297
Test: atest vold_tests
Test: adb shell cat /proc/self/mountinfo to get MAJOR:MINOR
Test: adb shell cat /sys/class/bdi/{MAJOR}:{MINOR}/read_ahead_kb
Test: created public volume, checked it's read_ahead_kb is also 256
Change-Id: Id0c149c4af1ceabf3afc33b4100563a512b38316
Martijn Coenen [Wed, 17 Jun 2020 07:01:58 +0000 (07:01 +0000)]
Add app's own UID to the default ACL. am:
1129b81071
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/vold/+/
11871333
Change-Id: Icbff1ee04a5f79582e92d5fa8ed8913260cc417f
Martijn Coenen [Tue, 16 Jun 2020 12:58:52 +0000 (14:58 +0200)]
Add app's own UID to the default ACL.
On devices without sdcardfs, /Android/data/com.foo and
/Android/obb/com.foo can be written by other processes (eg installers);
in those cases, file ownership may be wrong. To ensure that the original
app always has access to the files contained in this directory, add a
group to the default ACL that matches the UID of the app. Since all apps
have their own UID also as their group ID, this ensures that things keep
working correctly.
Bug:
157530951
Test: atest
android.appsecurity.cts.ExternalStorageHostTest#testExternalStorageUnsharedObb
Change-Id: I829a2a7c7b578a8328643f38681e68796adcd6b2
Change-Id: Ibbc333fb395507363830dfcf5dc6f1cfd55f008d
Paul Lawrence [Fri, 12 Jun 2020 15:12:48 +0000 (08:12 -0700)]
Don't call block checkpoint functions above dm-default-key
Bug:
156225476
Test: Build for f2fs and ext4 device, make sure checkpoints roll back
and commit
Change-Id: Ic15fadc67d306463dd0b554f679306d8f9081451
David Anderson [Thu, 11 Jun 2020 06:51:17 +0000 (23:51 -0700)]
Add an isCheckpointing() binder call for adb remount.
This is needed so "adb remount" can avoid writing to /data during a
checkpoint.
Bug:
157540389
Test: manual test
Change-Id: I33a691da3b99343acfc1e8ddf68a14504c3bfbe1
Treehugger Robot [Tue, 2 Jun 2020 19:33:43 +0000 (19:33 +0000)]
[automerger skipped] Merge "Record use of metadata encryption in property" am:
f20a16575f am:
d49f8c9eb7 -s ours
am skip reason: Change-Id I400873ec207cb63f0407fefc83962bb3a927e294 with SHA-1
94abae03a9 is in history
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/
1322598
Change-Id: Idf38f57a2370789e069846b6dc3e4b36cb80d9e4
Treehugger Robot [Tue, 2 Jun 2020 19:20:44 +0000 (19:20 +0000)]
Merge "Record use of metadata encryption in property" am:
f20a16575f
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/
1322598
Change-Id: I7b102707853ea2556c5a24858ae43ea5c2717616
Treehugger Robot [Tue, 2 Jun 2020 19:04:12 +0000 (19:04 +0000)]
Merge "Record use of metadata encryption in property"
Paul Crowley [Mon, 23 Mar 2020 15:59:12 +0000 (08:59 -0700)]
Record use of metadata encryption in property
Bug:
152150018
Test: Cuttlefish with and without keydirectory option
Cherry-Picked-From:
94abae03a97bf67bc2cd04b6a74e07ed08bf30a0
Merged-In: I400873ec207cb63f0407fefc83962bb3a927e294
Change-Id: I400873ec207cb63f0407fefc83962bb3a927e294
Martijn Coenen [Fri, 29 May 2020 16:00:05 +0000 (16:00 +0000)]
Merge "vold: Support aborting FUSE connections." into rvc-dev am:
cbb69e548a
Change-Id: I9f3435a686e76f9fbc8b8ec8cae33f5538a94ec5
Martijn Coenen [Fri, 29 May 2020 15:47:05 +0000 (15:47 +0000)]
Merge "vold: Support aborting FUSE connections." into rvc-dev
Abhijeet Kaur [Fri, 29 May 2020 15:07:04 +0000 (15:07 +0000)]
FuseDaemonHostTest is migrated to CTS and renamed. am:
de83802e41
Change-Id: I1e26192d3ae181bc3fd9bcb3f7bf56db0f073328
Abhijeet Kaur [Thu, 28 May 2020 17:12:40 +0000 (18:12 +0100)]
FuseDaemonHostTest is migrated to CTS and renamed.
FuseDaemonHostTest is migrated to CTS and renamed to
CtsScopedStorageHostTest.
Bug:
142926859
Test: atest --test-mapping
Change-Id: I24c74e20909ccf8868d1487e1cc93f6f2c0108fc
Martijn Coenen [Wed, 29 Apr 2020 05:49:41 +0000 (07:49 +0200)]
vold: Support aborting FUSE connections.
This can be done through binder as well as vdc, using 'vdc volume
abort_fuse'.
Bug:
153411204
Test: adb shell vdc volume abort_fuse
Change-Id: I93e46dc1cd361729cc1162c63520cf73152ea409
Daniel Rosenberg [Thu, 21 May 2020 08:41:14 +0000 (08:41 +0000)]
Move enabling sdcardfs behind a property am:
f36bdddc7e
Change-Id: I8bf90ef649975d182787757d73f9e2b46389483f
Treehugger Robot [Wed, 20 May 2020 07:26:02 +0000 (07:26 +0000)]
[automerger skipped] Merge "Handle virtio in private fs mapping" am:
e471d11d46 am:
d625abfda2 -s ours
am skip reason: Change-Id I0b41670d5f76b2506dad437917c2276f8e0aaccf with SHA-1
c671731075 is in history
Change-Id: Id73de89d4b905212935da4286ee50789b47695e6
Treehugger Robot [Wed, 20 May 2020 07:08:04 +0000 (07:08 +0000)]
Merge "Handle virtio in private fs mapping" am:
e471d11d46
Change-Id: If088b875ff4cbca66fe9c6f9224b437edc85dae8
Treehugger Robot [Wed, 20 May 2020 06:32:43 +0000 (06:32 +0000)]
Merge "Handle virtio in private fs mapping"
Daniel Rosenberg [Tue, 12 May 2020 05:58:42 +0000 (22:58 -0700)]
Move enabling sdcardfs behind a property
This allows devices that have sdcardfs enabled in the kernel to not use
it. When external_storage.sdcardfs.enabled=0, sdcardfs will not be
mounted. This is treated as default true to not affect upgrading
devices. It does not use the old ro.sys.sdcardfs as that has been
repurposed over time and no longer can be relied on to turn off
sdcardfs. This is included within emulated_storage.mk
Bug:
155222498
Test: mount|grep "type sdcardfs" should find nothing after boot complete
if external_storage.sdcardfs.enabled=0
Change-Id: I23d75fb1225aeabbcb1a035ad62fd042b6b3c7b5
TreeHugger Robot [Wed, 20 May 2020 04:44:06 +0000 (04:44 +0000)]
Merge "Handle virtio in private fs mapping" into rvc-dev am:
0d1fcb90d6
Change-Id: Idfa020f7211187ddc9c530482de9a53d14ef315a
TreeHugger Robot [Wed, 20 May 2020 04:28:31 +0000 (04:28 +0000)]
Merge "Handle virtio in private fs mapping" into rvc-dev
Alistair Delva [Tue, 19 May 2020 22:49:26 +0000 (15:49 -0700)]
Handle virtio in private fs mapping
When the vold core decides if a device is SD or USB, it checks for MMC
or virtio, however when the filesystem type is decided, it does not
check for virtio, only MMC. This causes virtio SD cards to be formatted
with ext4 unconditionally.
This fix is independently correct, but it incidentally gets adopted
storage working on cuttlefish (and Android Emulator) because f2fs can
support fscrypt and casefolding at the same time; ext4 currently cannot.
Bug:
156286088
Change-Id: I0b41670d5f76b2506dad437917c2276f8e0aaccf
Merged-In: I0b41670d5f76b2506dad437917c2276f8e0aaccf
Alistair Delva [Tue, 19 May 2020 22:49:26 +0000 (15:49 -0700)]
Handle virtio in private fs mapping
When the vold core decides if a device is SD or USB, it checks for MMC
or virtio, however when the filesystem type is decided, it does not
check for virtio, only MMC. This causes virtio SD cards to be formatted
with ext4 unconditionally.
This fix is independently correct, but it incidentally gets adopted
storage working on cuttlefish (and Android Emulator) because f2fs can
support fscrypt and casefolding at the same time; ext4 currently cannot.
Bug:
156286088
Change-Id: I0b41670d5f76b2506dad437917c2276f8e0aaccf
Paul Crowley [Tue, 19 May 2020 23:12:25 +0000 (23:12 +0000)]
Merge "Record use of metadata encryption in property" into rvc-dev am:
09ff429e2a
Change-Id: I2e39a3e24ea8bf488ffb8e901fa6449175673b5c
Paul Crowley [Tue, 19 May 2020 22:59:13 +0000 (22:59 +0000)]
Merge "Record use of metadata encryption in property" into rvc-dev
Treehugger Robot [Sat, 16 May 2020 05:27:30 +0000 (05:27 +0000)]
[automerger skipped] Merge "Expand virtio_block check to other virtual devices" am:
ff9975c04f am:
edb596fc36 -s ours
am skip reason: Change-Id Ieae805d08fddd0124a397636f04d99194a9ef7e5 with SHA-1
ff1fc9bc41 is in history
Change-Id: I8e4c5e3a044f8305dd29820709e073687991e559
Treehugger Robot [Sat, 16 May 2020 05:13:11 +0000 (05:13 +0000)]
Merge "Expand virtio_block check to other virtual devices" am:
ff9975c04f
Change-Id: Ic604273ddef8ac356e1e23fba050da7d68a24871
Treehugger Robot [Sat, 16 May 2020 04:51:28 +0000 (04:51 +0000)]
Merge "Expand virtio_block check to other virtual devices"
Alistair Delva [Sat, 16 May 2020 01:48:06 +0000 (01:48 +0000)]
Expand virtio_block check to other virtual devices am:
ff1fc9bc41
Change-Id: I679b9ab19d470a14e2708afd9078f2cff599b3b6