Commit graph

3343 commits

Author SHA1 Message Date
Eric Biggers
2d9777bfbf Merge "vold: remove checkEncryption" 2020-07-16 20:30:35 +00:00
Treehugger Robot
6e6fc6b8d3 Merge "Revert "[Vold] Conditional dependency to ARC++ ObbVolume"" 2020-07-16 11:04:04 +00:00
Eric Biggers
b7a14053c3 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
2020-07-15 11:21:33 -07:00
Satoshi Niwa
7ebcc2bcfd Revert "[Vold] Conditional dependency to ARC++ ObbVolume"
This reverts commit aedae617fe.

Reason for revert: ArcObbVolume is not needed by ARCVM R and above.

Bug: 157885448
Test: trybot
Change-Id: I16395ac8b6902cedea263f51e306b297d719043f
2020-07-13 05:07:18 +00:00
Eric Biggers
428ae6e90a Merge "vold: only allow emmc_optimized on eMMC storage" 2020-07-07 17:07:58 +00:00
Eric Biggers
eb566d0a7c 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
2020-07-06 19:11:43 -07:00
Paul Lawrence
1bb7e8a928 Merge "Don't call block checkpoint functions above dm-default-key" 2020-06-18 21:56:10 +00:00
David Anderson
b50480bb96 Merge "Add an isCheckpointing() binder call for adb remount." 2020-06-18 21:45:21 +00:00
Paul Lawrence
3fe931109c 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
2020-06-12 09:13:42 -07:00
David Anderson
23850d30f6 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
2020-06-10 23:52:25 -07:00
Treehugger Robot
d49f8c9eb7 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
2020-06-02 19:20:44 +00:00
Treehugger Robot
f20a16575f Merge "Record use of metadata encryption in property" 2020-06-02 19:04:12 +00:00
Paul Crowley
7fbd8d4474 Record use of metadata encryption in property
Bug: 152150018
Test: Cuttlefish with and without keydirectory option
Cherry-Picked-From: 94abae03a9
Merged-In: I400873ec207cb63f0407fefc83962bb3a927e294
Change-Id: I400873ec207cb63f0407fefc83962bb3a927e294
2020-06-02 11:16:55 -07:00
Treehugger Robot
d625abfda2 Merge "Handle virtio in private fs mapping" am: e471d11d46
Change-Id: If088b875ff4cbca66fe9c6f9224b437edc85dae8
2020-05-20 07:08:04 +00:00
Treehugger Robot
e471d11d46 Merge "Handle virtio in private fs mapping" 2020-05-20 06:32:43 +00:00
Alistair Delva
ea97154183 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
2020-05-20 00:45:02 +00:00
Treehugger Robot
edb596fc36 Merge "Expand virtio_block check to other virtual devices" am: ff9975c04f
Change-Id: Ic604273ddef8ac356e1e23fba050da7d68a24871
2020-05-16 05:13:11 +00:00
Treehugger Robot
ff9975c04f Merge "Expand virtio_block check to other virtual devices" 2020-05-16 04:51:28 +00:00
Alistair Delva
d3c230b5c9 Expand virtio_block check to other virtual devices
The Android Emulator isn't the only virtual device the virtio-block
detection code is useful for, and those platforms might not set any
discriminating properties to indicate that they are virtual.

Rework the virtio-block major detection to use /proc/devices instead
of hardcoding the assumption that any virtual platform can have
virtio-block at any experimental major; the new code permits only the
exact experimental major assigned to virtio-block.

The new code runs everywhere, but it will only run once and could be
expanded later to detect dynamic or experimental majors.

Bug: 156286088
Change-Id: Ieae805d08fddd0124a397636f04d99194a9ef7e5
Merged-In: Ieae805d08fddd0124a397636f04d99194a9ef7e5
2020-05-16 00:02:21 +00:00
Treehugger Robot
4cf8ddeed2 Merge "Revert "ARC++ swap for AppFuseUtil"" am: b6e2c14ed1
Change-Id: I3545346238ddaaec8c1a947f00aaeadd12dfd63b
2020-05-12 12:46:32 +00:00
Treehugger Robot
b6e2c14ed1 Merge "Revert "ARC++ swap for AppFuseUtil"" 2020-05-12 12:30:16 +00:00
Satoshi Niwa
601e7bd4e2 Revert "ARC++ swap for AppFuseUtil"
This reverts commit dcbd4fcad2.

Reason for revert: ARC is migrating to ARCVM on R, which doesn't use AppFuse any more.

Change-Id: Ifd0bf92a79c0ff25d782bea44dd593f9502f1959
2020-05-08 04:50:34 +00:00
Treehugger Robot
3a149b6735 Merge "Acknowledge the 'nofail' fs_mgr flag and skip the expected failure." am: e8acc83d25
Change-Id: I1fb2dbb0de98e3e2deadce25183aa37f2bc7c4ba
2020-05-06 17:22:38 +00:00
Treehugger Robot
e8acc83d25 Merge "Acknowledge the 'nofail' fs_mgr flag and skip the expected failure." 2020-05-06 17:02:43 +00:00
P.Adarsh Reddy
167c2a658a Acknowledge the 'nofail' fs_mgr flag and skip the expected failure.
fs_mgr supports 'nofail' flag, which is used if we do not want to
error-out incase the mounting/setup fails for a partition tagged with
nofail flag in fstab.

Recently added code in vold misses this handling, i.e. it aborts even
for a nofail partition upon encountering an expected failure.

Test: Add a non-existing logical partition fstab entry with 'nofail'
      flag. Init's first stage mount acks this and doesn't crash.
      Vold aborts (as it doesn't handle it), and device doesn't boot.
      With this change, device boots up.

Change-Id: I2b1904a9c648c31bcc05b2e7e77480db236ff66e
2020-05-06 16:45:23 +00:00
Treehugger Robot
d4e75c211d Merge "vold: fix missing has.adoptable" am: 9e2053e185
Change-Id: I3f87b104678fb57c627165fcd5faea846e25d343
2020-04-23 22:36:56 +00:00
Treehugger Robot
9e2053e185 Merge "vold: fix missing has.adoptable" 2020-04-23 22:15:38 +00:00
Jaegeuk Kim
4ea573aca7 vold: fix missing has.adoptable
This patch fixes missing entry in the below commit.

Fixes: c52f6724ed ("vold: clean up configuration set")
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: Ia39a427d4747b29a7af42633f34daab63204bbf9
2020-04-23 13:43:12 -07:00
Treehugger Robot
ebcd59d19b Merge "Introduce ro.crypto.uses_fs_ioc_add_encryption_key property" am: 83c78a2bb1
Change-Id: Icfcf0222bd97d52d6fed2eeef3c3fca335d8b93e
2020-04-21 16:07:15 +00:00
Treehugger Robot
83c78a2bb1 Merge "Introduce ro.crypto.uses_fs_ioc_add_encryption_key property" 2020-04-21 15:51:20 +00:00
Nikita Ioffe
eea8bd39a2 Introduce ro.crypto.uses_fs_ioc_add_encryption_key property
Bug: 154327249
Test: adb shell getprop ro.crypto.uses_fs_ioc_add_encryption_key
Test: adb bugreport && checked content contains new property
Change-Id: I562df49deffdccdb2cfd657130fc05b24d40a6a6
Merged-In: I562df49deffdccdb2cfd657130fc05b24d40a6a6
(cherry picked from commit 78f806198f)
2020-04-21 15:28:41 +01:00
Martijn Coenen
5901d6f492 Merge "Rename casefold/projectid properties." am: 9d0508a854
Change-Id: If27cbdd3df8bb53b8e27a772be9b0826a8fce4e4
2020-04-16 08:21:00 +00:00
Martijn Coenen
9d0508a854 Merge "Rename casefold/projectid properties." 2020-04-16 08:06:53 +00:00
Martijn Coenen
97ff0845e2 Rename casefold/projectid properties.
According to property naming guidelines.

Bug: 152170470
Bug: 153525566
Test: N/A
Change-Id: Iaebff2a835288839a2faf0edbe0e47ceb96b4458
2020-04-15 17:29:21 +02:00
Jaegeuk Kim
0f5df6477d Merge changes from topic "fscompression" am: 7f4a71c2ff
Change-Id: I42086b7abde79ae1edb177f3668c73b1c7972295
2020-04-14 15:58:32 +00:00
Jaegeuk Kim
0770085201 vold: support F2FS compression am: f64d30aa82
Change-Id: I03d6c574c922f08c67a662e483a1ed05ea7c4351
2020-04-14 15:58:30 +00:00
Jaegeuk Kim
7f4a71c2ff Merge changes from topic "fscompression"
* changes:
  vold: clean up configuration set
  vold: support F2FS compression
2020-04-14 15:54:18 +00:00
Jaegeuk Kim
c52f6724ed vold: clean up configuration set
This patch introduces a structure to manipulate many configuration flags.

Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: Ib15d2b6e251741160d2febe695132a37f9dde23c
2020-04-13 13:14:14 -07:00
Xin Li
b4a3c55026 DO NOT MERGE - Empty merge qt-qpr1-dev-plus-aosp into stag-aosp-master
Bug: 151763422
Change-Id: I04b8a113f3194fc4de80da1f4c0f9551115e6529
2020-04-09 17:51:30 -07:00
Treehugger Robot
483de9f5fd Merge "Send earlyBootEnded notice to all Keymasters" am: 0e9fbe4a3e
Change-Id: Ia8f5e55336e3a4d0a71d353b2f28553cf6196bd6
2020-04-09 22:31:09 +00:00
Treehugger Robot
0e9fbe4a3e Merge "Send earlyBootEnded notice to all Keymasters" 2020-04-09 22:07:40 +00:00
Shawn Willden
28eddbd2ef Send earlyBootEnded notice to all Keymasters
Vold incorrectly sends the earlyBootEnded signal only to the Keymaster
instance used for device encryption, but all of them need it.

Bug: 152932559
Test: VtsHalKeymasterV4_1TargetTest
Merged-In: Id8f01a1dc7d2398395f369c3ea74656a82888829
Change-Id: Id8f01a1dc7d2398395f369c3ea74656a82888829
2020-04-09 15:22:43 -06:00
Paul Crowley
cd5936e264 Merge "Choose options format using property" am: 479588c68e am: 30c1b0225e
Change-Id: Id82ce73849059e7792422023afc66cba13833ecc
2020-04-07 04:08:32 +00:00
Paul Crowley
30c1b0225e Merge "Choose options format using property" am: 479588c68e
Change-Id: I67523617a54957da6a3fae7cd9233ff47627578d
2020-04-07 03:48:07 +00:00
Paul Crowley
479588c68e Merge "Choose options format using property" 2020-04-07 03:23:57 +00:00
Paul Crowley
f56d553bab Choose options format using property
To make it easier to support disk formats created using old versions
of dm-default-key with new kernels, choose the disk format to use
based on options_format_version and first_api_version properties
instead of checking the version number of the kernel module.

Bug: 150761030
Test: crosshatch and cuttlefish boot normally; cuttlefish
    fails with "default-key: Not enough arguments" as expected when
    option is set to 1
Change-Id: Ib51071b7c316ce074de72439741087b18335048c
2020-04-06 08:45:32 -07:00
Jaegeuk Kim
f64d30aa82 vold: support F2FS compression
Bug: 134580167
Change-Id: Iadd001dc5ce0f91a4337f5b27ea8cc54f9760b0d
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2020-04-03 14:02:14 -07:00
Yurii Zubrytskyi
0c0ed9d6b5 Merge "[vold] update with incfs_ndk.h" am: 29ee196fb5 am: e296f9cbf6
Change-Id: I0173898669ca7d4b3a03449d2488f69cddb0ba3f
2020-04-03 18:10:50 +00:00
Yurii Zubrytskyi
e296f9cbf6 Merge "[vold] update with incfs_ndk.h" am: 29ee196fb5
Change-Id: If51dfb7c76c6593ecf31c2b42712c4ac114d2b83
2020-04-03 17:49:01 +00:00
Yurii Zubrytskyi
29ee196fb5 Merge "[vold] update with incfs_ndk.h" 2020-04-03 17:25:05 +00:00