OSDN Git Service

android-x86/system-vold.git
4 years agoMerge "Handle virtio in private fs mapping" am: e471d11d46
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

4 years agoMerge "Handle virtio in private fs mapping"
Treehugger Robot [Wed, 20 May 2020 06:32:43 +0000 (06:32 +0000)]
Merge "Handle virtio in private fs mapping"

4 years agoHandle virtio in private fs mapping
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

4 years agoMerge "Expand virtio_block check to other virtual devices" am: ff9975c04f
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

4 years agoMerge "Expand virtio_block check to other virtual devices"
Treehugger Robot [Sat, 16 May 2020 04:51:28 +0000 (04:51 +0000)]
Merge "Expand virtio_block check to other virtual devices"

4 years agoExpand virtio_block check to other virtual devices
Alistair Delva [Thu, 14 May 2020 23:35:03 +0000 (16:35 -0700)]
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

4 years agoMerge "Revert "ARC++ swap for AppFuseUtil"" am: b6e2c14ed1
Treehugger Robot [Tue, 12 May 2020 12:46:32 +0000 (12:46 +0000)]
Merge "Revert "ARC++ swap for AppFuseUtil"" am: b6e2c14ed1

Change-Id: I3545346238ddaaec8c1a947f00aaeadd12dfd63b

4 years agoMerge "Revert "ARC++ swap for AppFuseUtil""
Treehugger Robot [Tue, 12 May 2020 12:30:16 +0000 (12:30 +0000)]
Merge "Revert "ARC++ swap for AppFuseUtil""

4 years agoRevert "ARC++ swap for AppFuseUtil"
Satoshi Niwa [Fri, 8 May 2020 04:50:34 +0000 (04:50 +0000)]
Revert "ARC++ swap for AppFuseUtil"

This reverts commit dcbd4fcad2b90a6e9376bfe2593ab941966db346.

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

Change-Id: Ifd0bf92a79c0ff25d782bea44dd593f9502f1959

4 years agoMerge "Acknowledge the 'nofail' fs_mgr flag and skip the expected failure." am: e8acc...
Treehugger Robot [Wed, 6 May 2020 17:22:38 +0000 (17:22 +0000)]
Merge "Acknowledge the 'nofail' fs_mgr flag and skip the expected failure." am: e8acc83d25

Change-Id: I1fb2dbb0de98e3e2deadce25183aa37f2bc7c4ba

4 years agoMerge "Acknowledge the 'nofail' fs_mgr flag and skip the expected failure."
Treehugger Robot [Wed, 6 May 2020 17:02:43 +0000 (17:02 +0000)]
Merge "Acknowledge the 'nofail' fs_mgr flag and skip the expected failure."

4 years agoAcknowledge the 'nofail' fs_mgr flag and skip the expected failure.
P.Adarsh Reddy [Thu, 16 Apr 2020 16:16:08 +0000 (21:46 +0530)]
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

4 years agoMerge "vold: fix missing has.adoptable" am: 9e2053e185
Treehugger Robot [Thu, 23 Apr 2020 22:36:56 +0000 (22:36 +0000)]
Merge "vold: fix missing has.adoptable" am: 9e2053e185

Change-Id: I3f87b104678fb57c627165fcd5faea846e25d343

4 years agoMerge "vold: fix missing has.adoptable"
Treehugger Robot [Thu, 23 Apr 2020 22:15:38 +0000 (22:15 +0000)]
Merge "vold: fix missing has.adoptable"

4 years agovold: fix missing has.adoptable
Jaegeuk Kim [Thu, 23 Apr 2020 20:43:12 +0000 (13:43 -0700)]
vold: fix missing has.adoptable

This patch fixes missing entry in the below commit.

Fixes: c52f6724edd6 ("vold: clean up configuration set")
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: Ia39a427d4747b29a7af42633f34daab63204bbf9

4 years agoMerge "Introduce ro.crypto.uses_fs_ioc_add_encryption_key property" am: 83c78a2bb1
Treehugger Robot [Tue, 21 Apr 2020 16:07:15 +0000 (16:07 +0000)]
Merge "Introduce ro.crypto.uses_fs_ioc_add_encryption_key property" am: 83c78a2bb1

Change-Id: Icfcf0222bd97d52d6fed2eeef3c3fca335d8b93e

4 years agoMerge "Introduce ro.crypto.uses_fs_ioc_add_encryption_key property"
Treehugger Robot [Tue, 21 Apr 2020 15:51:20 +0000 (15:51 +0000)]
Merge "Introduce ro.crypto.uses_fs_ioc_add_encryption_key property"

4 years agoIntroduce ro.crypto.uses_fs_ioc_add_encryption_key property
Nikita Ioffe [Mon, 20 Apr 2020 21:21:49 +0000 (22:21 +0100)]
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 78f806198f85ca37abb617235c89abaca7d1c19c)

4 years agoMerge "Rename casefold/projectid properties." am: 9d0508a854
Martijn Coenen [Thu, 16 Apr 2020 08:21:00 +0000 (08:21 +0000)]
Merge "Rename casefold/projectid properties." am: 9d0508a854

Change-Id: If27cbdd3df8bb53b8e27a772be9b0826a8fce4e4

4 years agoMerge "Rename casefold/projectid properties."
Martijn Coenen [Thu, 16 Apr 2020 08:06:53 +0000 (08:06 +0000)]
Merge "Rename casefold/projectid properties."

4 years agoRename casefold/projectid properties.
Martijn Coenen [Wed, 15 Apr 2020 09:42:47 +0000 (11:42 +0200)]
Rename casefold/projectid properties.

According to property naming guidelines.

Bug: 152170470
Bug: 153525566
Test: N/A
Change-Id: Iaebff2a835288839a2faf0edbe0e47ceb96b4458

4 years agoMerge changes from topic "fscompression" am: 7f4a71c2ff
Jaegeuk Kim [Tue, 14 Apr 2020 15:58:32 +0000 (15:58 +0000)]
Merge changes from topic "fscompression" am: 7f4a71c2ff

Change-Id: I42086b7abde79ae1edb177f3668c73b1c7972295

4 years agovold: support F2FS compression am: f64d30aa82
Jaegeuk Kim [Tue, 14 Apr 2020 15:58:30 +0000 (15:58 +0000)]
vold: support F2FS compression am: f64d30aa82

Change-Id: I03d6c574c922f08c67a662e483a1ed05ea7c4351

4 years agoMerge changes from topic "fscompression"
Jaegeuk Kim [Tue, 14 Apr 2020 15:54:18 +0000 (15:54 +0000)]
Merge changes from topic "fscompression"

* changes:
  vold: clean up configuration set
  vold: support F2FS compression

4 years agovold: clean up configuration set
Jaegeuk Kim [Mon, 6 Apr 2020 22:58:41 +0000 (15:58 -0700)]
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

4 years agoDO NOT MERGE - Empty merge qt-qpr1-dev-plus-aosp into stag-aosp-master
Xin Li [Fri, 10 Apr 2020 00:51:30 +0000 (17:51 -0700)]
DO NOT MERGE - Empty merge qt-qpr1-dev-plus-aosp into stag-aosp-master

Bug: 151763422
Change-Id: I04b8a113f3194fc4de80da1f4c0f9551115e6529

4 years agoMerge "Send earlyBootEnded notice to all Keymasters" am: 0e9fbe4a3e
Treehugger Robot [Thu, 9 Apr 2020 22:31:09 +0000 (22:31 +0000)]
Merge "Send earlyBootEnded notice to all Keymasters" am: 0e9fbe4a3e

Change-Id: Ia8f5e55336e3a4d0a71d353b2f28553cf6196bd6

4 years agoMerge "Send earlyBootEnded notice to all Keymasters"
Treehugger Robot [Thu, 9 Apr 2020 22:07:40 +0000 (22:07 +0000)]
Merge "Send earlyBootEnded notice to all Keymasters"

4 years agoSend earlyBootEnded notice to all Keymasters
Shawn Willden [Wed, 1 Apr 2020 16:02:16 +0000 (10:02 -0600)]
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

4 years agoMerge "Choose options format using property" am: 479588c68e am: 30c1b0225e
Paul Crowley [Tue, 7 Apr 2020 04:08:32 +0000 (04:08 +0000)]
Merge "Choose options format using property" am: 479588c68e am: 30c1b0225e

Change-Id: Id82ce73849059e7792422023afc66cba13833ecc

4 years agoMerge "Choose options format using property" am: 479588c68e
Paul Crowley [Tue, 7 Apr 2020 03:48:07 +0000 (03:48 +0000)]
Merge "Choose options format using property" am: 479588c68e

Change-Id: I67523617a54957da6a3fae7cd9233ff47627578d

4 years agoMerge "Choose options format using property"
Paul Crowley [Tue, 7 Apr 2020 03:23:57 +0000 (03:23 +0000)]
Merge "Choose options format using property"

4 years agoChoose options format using property
Paul Crowley [Sun, 22 Mar 2020 15:02:06 +0000 (08:02 -0700)]
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

4 years agovold: support F2FS compression
Jaegeuk Kim [Tue, 14 Jan 2020 19:22:26 +0000 (11:22 -0800)]
vold: support F2FS compression

Bug: 134580167
Change-Id: Iadd001dc5ce0f91a4337f5b27ea8cc54f9760b0d
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
4 years agoMerge "[vold] update with incfs_ndk.h" am: 29ee196fb5 am: e296f9cbf6
Yurii Zubrytskyi [Fri, 3 Apr 2020 18:10:50 +0000 (18:10 +0000)]
Merge "[vold] update with incfs_ndk.h" am: 29ee196fb5 am: e296f9cbf6

Change-Id: I0173898669ca7d4b3a03449d2488f69cddb0ba3f

4 years agoMerge "[vold] update with incfs_ndk.h" am: 29ee196fb5
Yurii Zubrytskyi [Fri, 3 Apr 2020 17:49:01 +0000 (17:49 +0000)]
Merge "[vold] update with incfs_ndk.h" am: 29ee196fb5

Change-Id: If51dfb7c76c6593ecf31c2b42712c4ac114d2b83

4 years agoMerge "[vold] update with incfs_ndk.h"
Yurii Zubrytskyi [Fri, 3 Apr 2020 17:25:05 +0000 (17:25 +0000)]
Merge "[vold] update with incfs_ndk.h"

4 years ago[vold] update with incfs_ndk.h
Songchun Fan [Wed, 4 Mar 2020 01:58:20 +0000 (17:58 -0800)]
[vold] update with incfs_ndk.h

BUG: 150470163
Test: atest PackageManagerShellCommandIncrementalTest
Change-Id: I5166c49cf48f353dab35e385571ada517cb751ac
Merged-In: I5166c49cf48f353dab35e385571ada517cb751ac

4 years ago[automerger skipped] Block and wait for /dev/block/loop<N> to appear in case it was...
David Anderson [Mon, 30 Mar 2020 09:00:10 +0000 (09:00 +0000)]
[automerger skipped] Block and wait for /dev/block/loop<N> to appear in case it was created asynchronously. am: 5ba8aeaa80 -s ours

am skip reason: Change-Id Id8616804bba622226ca21b8eff0d3eb577b4b7e0 with SHA-1 1dd5c4f787 is in history

Change-Id: I30e748f7983e661ba2abd9bbd2ec12dc453b1eb1

4 years agoBlock and wait for /dev/block/loop<N> to appear in case it was created asynchronously.
David Anderson [Tue, 11 Jun 2019 21:51:25 +0000 (14:51 -0700)]
Block and wait for /dev/block/loop<N> to appear in case it was created asynchronously.

Bug: 134711825
Bug: 149462396
Test: StorageManagerTest
Change-Id: Id8616804bba622226ca21b8eff0d3eb577b4b7e0
Merged-In: Id8616804bba622226ca21b8eff0d3eb577b4b7e0

4 years agoMerge changes from topic "merge-incremental-vold" am: 10a372f1d2 am: 41c1c40afc
Yurii Zubrytskyi [Thu, 26 Mar 2020 07:59:46 +0000 (07:59 +0000)]
Merge changes from topic "merge-incremental-vold" am: 10a372f1d2 am: 41c1c40afc

Change-Id: I542b7a48e7d94b78bf3fb01e44263e2b161df60f

4 years agoExpose new IncFS interface through Vold am: d05bcc8070 am: 636da65360
Yurii Zubrytskyi [Thu, 26 Mar 2020 07:59:44 +0000 (07:59 +0000)]
Expose new IncFS interface through Vold am: d05bcc8070 am: 636da65360

Change-Id: I349002a3eb80d962c86b24f89816c4ce76d5d65e

4 years agoMerge changes from topic "merge-incremental-vold" am: 10a372f1d2
Yurii Zubrytskyi [Thu, 26 Mar 2020 07:33:58 +0000 (07:33 +0000)]
Merge changes from topic "merge-incremental-vold" am: 10a372f1d2

Change-Id: Id6fe791310761aa715fdf0e37760052a1534a4f0

4 years agoExpose new IncFS interface through Vold am: d05bcc8070
Yurii Zubrytskyi [Thu, 26 Mar 2020 07:33:56 +0000 (07:33 +0000)]
Expose new IncFS interface through Vold am: d05bcc8070

Change-Id: Icbdb9f233850e70e8ca7c458fd30c4bea93a9923

4 years agoMerge changes from topic "merge-incremental-vold"
Yurii Zubrytskyi [Thu, 26 Mar 2020 07:23:11 +0000 (07:23 +0000)]
Merge changes from topic "merge-incremental-vold"

* changes:
  [vold] Add argument verification to IncFS methods
  Expose new IncFS interface through Vold

4 years ago[vold] Add argument verification to IncFS methods
Yurii Zubrytskyi [Tue, 24 Mar 2020 23:23:51 +0000 (16:23 -0700)]
[vold] Add argument verification to IncFS methods

+ Get rid of an extra string copy in path validation function

Bug: 152349257
Test: atest vold_tests
Change-Id: I03a8cab0dd6abd7d5c9dcbbc2acb651e818e6cd8
Merged-In: I03a8cab0dd6abd7d5c9dcbbc2acb651e818e6cd8

4 years agoExpose new IncFS interface through Vold
Yurii Zubrytskyi [Fri, 10 Jan 2020 19:54:06 +0000 (11:54 -0800)]
Expose new IncFS interface through Vold

CL is a part of multi-repository topic and will be merged
to AOSP

Bug: 146080380
Test: manual

Change-Id: I09b33a34ff1ac7f6e415b7bd090c22e7df24d72d
Merged-In: I09b33a34ff1ac7f6e415b7bd090c22e7df24d72d

4 years agoDO NOT MERGE - Empty merge qt-qpr1-dev-plus-aosp@6304901 into stag-aosp-master am...
Xin Li [Thu, 19 Mar 2020 04:22:43 +0000 (04:22 +0000)]
DO NOT MERGE - Empty merge qt-qpr1-dev-plus-aosp@6304901 into stag-aosp-master am: 4e13a60b8d

Change-Id: Ic6e88b868f1e8de04713198d892411caab957906

4 years agoDO NOT MERGE - Empty merge qt-qpr1-dev-plus-aosp@6304901 into stag-aosp-master
Xin Li [Thu, 19 Mar 2020 02:40:59 +0000 (19:40 -0700)]
DO NOT MERGE - Empty merge qt-qpr1-dev-plus-aosp@6304901 into stag-aosp-master

Bug: 151763422
Change-Id: I3f26efbcf61365bfac87aa83a0bc8a5dbb2d0a65

4 years agoMerge "fskeyring & userspace reboot: support CE keys" am: eaa3443ad8 am: 91ba0c8fa4
Automerger Merge Worker [Wed, 11 Mar 2020 20:31:30 +0000 (20:31 +0000)]
Merge "fskeyring & userspace reboot: support CE keys" am: eaa3443ad8 am: 91ba0c8fa4

Change-Id: I393e9464b2579cfd9b59596a70ca8c3881e0582d

4 years agoMerge "fskeyring & userspace reboot: support CE keys" am: eaa3443ad8
Automerger Merge Worker [Wed, 11 Mar 2020 20:12:14 +0000 (20:12 +0000)]
Merge "fskeyring & userspace reboot: support CE keys" am: eaa3443ad8

Change-Id: Ib22499ed549567b9ad12cd0f9c0ef5197724fee0

4 years agoMerge "fskeyring & userspace reboot: support CE keys"
Nikita Ioffe [Wed, 11 Mar 2020 16:10:35 +0000 (16:10 +0000)]
Merge "fskeyring & userspace reboot: support CE keys"

4 years agofskeyring & userspace reboot: support CE keys
Nikita Ioffe [Fri, 28 Feb 2020 19:50:31 +0000 (19:50 +0000)]
fskeyring & userspace reboot: support CE keys

During userspace reboot /data might be unmounted & remounted, meaning
that CE keys stored in fs-level keyring will be lost. In order to be
able to restore them, when installing new key to fs-level keyring, it's
also added to session-level keyring with type "fscrypt-provisioning".

Then when init_user0 is called during userspace reboot, vold will try to
load CE keys from the session-level keyring back into fs-level keyring
for all the users that were unlocked before the reboot.

If for any user vold fails to install the key, init_user0 will fail and
fallback to hard reboot will be triggered.

Test: set a pin pattern
Test: adb shell setprop sys.init.userdata_remount.force_umount 1
Test: adb shell svc power reboot userspace
Test: atest CtsUserspaceRebootHostSideTestCases
Bug: 143970043
Change-Id: I37603dc136c7ededc7b0381e4d730cb0ffd912b4
Merged-In: I37603dc136c7ededc7b0381e4d730cb0ffd912b4
(cherry picked from commit 1ee35cf002de9f6aaa6f33e67d882cdbbaa35cc2)

4 years agoMerge "Use the blk_device supplied by vdc encryptFstab" am: 3b3a13a81a am: eeb005eb7d
Automerger Merge Worker [Thu, 5 Mar 2020 16:32:43 +0000 (16:32 +0000)]
Merge "Use the blk_device supplied by vdc encryptFstab" am: 3b3a13a81a am: eeb005eb7d

Change-Id: If29abc839cb196072cccc7024b499ef5d54a0f45

4 years agoMerge "Use the blk_device supplied by vdc encryptFstab" am: 3b3a13a81a
Automerger Merge Worker [Thu, 5 Mar 2020 16:18:03 +0000 (16:18 +0000)]
Merge "Use the blk_device supplied by vdc encryptFstab" am: 3b3a13a81a

Change-Id: I7967532a151eb373b878e7723e73df67cce1061f

4 years agoMerge "Use the blk_device supplied by vdc encryptFstab"
Paul Crowley [Thu, 5 Mar 2020 15:59:18 +0000 (15:59 +0000)]
Merge "Use the blk_device supplied by vdc encryptFstab"

4 years agoMerge "fskeyring & userspace reboot: support DE keys" am: 3b719ed32e am: ac589ee784
Automerger Merge Worker [Wed, 4 Mar 2020 15:33:10 +0000 (15:33 +0000)]
Merge "fskeyring & userspace reboot: support DE keys" am: 3b719ed32e am: ac589ee784

Change-Id: I50a54e3ac6a873930d2c3b0ee62ca389100b0787

4 years agoMerge "fskeyring & userspace reboot: support DE keys" am: 3b719ed32e
Automerger Merge Worker [Wed, 4 Mar 2020 15:19:40 +0000 (15:19 +0000)]
Merge "fskeyring & userspace reboot: support DE keys" am: 3b719ed32e

Change-Id: I23ff1535eacf875561c6fef250b431fe17b6dc14

4 years agoMerge "fskeyring & userspace reboot: support DE keys"
Nikita Ioffe [Wed, 4 Mar 2020 15:02:23 +0000 (15:02 +0000)]
Merge "fskeyring & userspace reboot: support DE keys"

4 years agofskeyring & userspace reboot: support DE keys
Nikita Ioffe [Thu, 27 Feb 2020 18:21:55 +0000 (18:21 +0000)]
fskeyring & userspace reboot: support DE keys

During userspace reboot /data might be unmounted, which means that if
device supports filesystem keyring, DE keys will be lost and are needed
to be re-installed.

Test: adb shell setprop sys.init.userdata_remount.force_umount 1
Test: adb shell svc power reboot userspace
Test: atest CtsUserspaceRebootHostSideTestCases
Bug: 143970043
Change-Id: I153caa1d7c373b3c906a34f1184c681e52854a9d
Merged-In: I153caa1d7c373b3c906a34f1184c681e52854a9d
(cherry picked from commit 1eaea5a6a21a2eb9ec0debb69a8718861e13b4d7)

4 years agoMerge "umount /data/user/0 before umount /data" am: 3a0fd35b62 am: 20f9f29d53
Automerger Merge Worker [Wed, 4 Mar 2020 05:09:52 +0000 (05:09 +0000)]
Merge "umount /data/user/0 before umount /data" am: 3a0fd35b62 am: 20f9f29d53

Change-Id: If73d45b2048ef3031f1f38180735ab542b7dbdfd

4 years agoMerge "umount /data/user/0 before umount /data" am: 3a0fd35b62
Automerger Merge Worker [Wed, 4 Mar 2020 04:53:16 +0000 (04:53 +0000)]
Merge "umount /data/user/0 before umount /data" am: 3a0fd35b62

Change-Id: Ibb3aa685585e8dab22f504a7f862cad5e551ca96

4 years agoMerge "umount /data/user/0 before umount /data"
Treehugger Robot [Wed, 4 Mar 2020 04:34:46 +0000 (04:34 +0000)]
Merge "umount /data/user/0 before umount /data"

4 years agoumount /data/user/0 before umount /data
Hyangseok Chae [Thu, 27 Feb 2020 09:21:50 +0000 (18:21 +0900)]
umount /data/user/0 before umount /data

FDE device has shut down and restart the framework.
But restart is not triggered due to umount fail.
umount /data fail with "device is busy"
It is because bind mount /data/data to /data/user/0

We need umount /data/user/0 before umount /data

Bug: 148004718
Test: Flash GSI and check boot with FDE and FBE device.
Change-Id: I919f9e31a9d2d745b297a7ab99b399aa9b293b39

4 years agoUse the blk_device supplied by vdc encryptFstab
Paul Crowley [Mon, 2 Mar 2020 20:57:58 +0000 (12:57 -0800)]
Use the blk_device supplied by vdc encryptFstab

fs_mgr may put other dm devices on top of the raw disk, such as for
checkpointing, and it hands metadata encryption the uppermost device in
vdc. That's what should be encrypted, not the raw disk.

Bug: 150354860
Test: Treehugger
Change-Id: I279f087b1b7aded40c5a62281154851ce970ba70

4 years agoMerge "Use optional for nullable types" am: deb7085453 am: c63694c6e1
Automerger Merge Worker [Thu, 27 Feb 2020 03:35:55 +0000 (03:35 +0000)]
Merge "Use optional for nullable types" am: deb7085453 am: c63694c6e1

Change-Id: I29d0ba8265692bc7234b4f72cd1c0fd0324c8834

4 years agoMerge "Use optional for nullable types" am: deb7085453
Automerger Merge Worker [Thu, 27 Feb 2020 03:22:54 +0000 (03:22 +0000)]
Merge "Use optional for nullable types" am: deb7085453

Change-Id: Iea4d8e042d65e2ed1befa6dc18c822f2982c41ab

4 years agoMerge "Use optional for nullable types"
Jooyung Han [Thu, 27 Feb 2020 03:06:14 +0000 (03:06 +0000)]
Merge "Use optional for nullable types"

4 years agoUse optional for nullable types
Jooyung Han [Thu, 23 Jan 2020 04:23:26 +0000 (13:23 +0900)]
Use optional for nullable types

AIDL generates optional<T> for nullable T types for C++, which is more
efficient and idomatic and easy to use.

Bug: 144773267
Test: build/flash/boot
Merged-In: I98549c8614c9152d5d45e2f1f33f2f3c31a9bbbf
Change-Id: I98549c8614c9152d5d45e2f1f33f2f3c31a9bbbf
(cherry picked from commit 0568fd287cfc0affc8e985f21da3793cdda286a3)

4 years agoMerge "Make CTS not HEH the default post Q" am: 39969f0288 am: 17d85205bd
Automerger Merge Worker [Wed, 19 Feb 2020 23:37:01 +0000 (23:37 +0000)]
Merge "Make CTS not HEH the default post Q" am: 39969f0288 am: 17d85205bd

Change-Id: I0c3114a77c37b30e542c45fc4d4d6ea592444b1a

4 years agoMerge "Make CTS not HEH the default post Q" am: 39969f0288
Automerger Merge Worker [Wed, 19 Feb 2020 23:20:59 +0000 (23:20 +0000)]
Merge "Make CTS not HEH the default post Q" am: 39969f0288

Change-Id: I0cb0430214ab69656c6e7f3116194b63eb54672b

4 years agoMerge "Make CTS not HEH the default post Q"
Treehugger Robot [Wed, 19 Feb 2020 23:04:37 +0000 (23:04 +0000)]
Merge "Make CTS not HEH the default post Q"

4 years agoMake CTS not HEH the default post Q
Paul Crowley [Tue, 18 Feb 2020 18:10:08 +0000 (10:10 -0800)]
Make CTS not HEH the default post Q

Making HEH the default was always a mistake and a giant foot-gun.
Let's make life easier for people by making the default depend on
first_api_level, so it's automatically set up right for new devices
without breaking old ones. Also use v2 fscrypt keys instead of v1 post
Q.

Bug: 147107322
Test: Various Cuttlefish configurations
Change-Id: I5432bdfd6fec6ed34e7f9ab7cdd32cdeb2a03472

4 years agoMerge "Fix unaligned access to auth token user_id" am: 21a17b091e am: 01759662fd
Automerger Merge Worker [Wed, 19 Feb 2020 00:06:04 +0000 (00:06 +0000)]
Merge "Fix unaligned access to auth token user_id" am: 21a17b091e am: 01759662fd

Change-Id: I224885ade242636a9806574c164f34494a8f377f

4 years agoMerge "Remove unused code in VoldUtil.h" am: e19189bd7f am: b6421644ec
Automerger Merge Worker [Wed, 19 Feb 2020 00:05:34 +0000 (00:05 +0000)]
Merge "Remove unused code in VoldUtil.h" am: e19189bd7f am: b6421644ec

Change-Id: If68c55c8e6f3db5e00e08f958845ceab8cf36f4e

4 years agoMerge changes from topics "metadata_wrapped_key_aosp", "volume_metadata" am: 36fd1ebf...
Automerger Merge Worker [Wed, 19 Feb 2020 00:05:22 +0000 (00:05 +0000)]
Merge changes from topics "metadata_wrapped_key_aosp", "volume_metadata" am: 36fd1ebfae am: 6891eb7e2d

Change-Id: I39904b704f983124afd8ff62cd3b863fd600e6a2

4 years agoMerge "Fix unaligned access to auth token user_id" am: 21a17b091e
Automerger Merge Worker [Tue, 18 Feb 2020 23:40:09 +0000 (23:40 +0000)]
Merge "Fix unaligned access to auth token user_id" am: 21a17b091e

Change-Id: If1b44823f6758c9428b5874b2629579f384399b7

4 years agoMerge "Remove unused code in VoldUtil.h" am: e19189bd7f
Automerger Merge Worker [Tue, 18 Feb 2020 23:40:04 +0000 (23:40 +0000)]
Merge "Remove unused code in VoldUtil.h" am: e19189bd7f

Change-Id: I52b8e04f85890a1a320c47a191bf1c0429e058a4

4 years agoMerge changes from topics "metadata_wrapped_key_aosp", "volume_metadata" am: 36fd1ebfae
Automerger Merge Worker [Tue, 18 Feb 2020 23:39:37 +0000 (23:39 +0000)]
Merge changes from topics "metadata_wrapped_key_aosp", "volume_metadata" am: 36fd1ebfae

Change-Id: Ieb478426e40feffcefd3a5e478e5e1c5d72539b7

4 years agoMerge "Fix unaligned access to auth token user_id"
Paul Crowley [Tue, 18 Feb 2020 23:18:46 +0000 (23:18 +0000)]
Merge "Fix unaligned access to auth token user_id"

4 years agoMerge "Remove unused code in VoldUtil.h"
Paul Crowley [Tue, 18 Feb 2020 23:18:30 +0000 (23:18 +0000)]
Merge "Remove unused code in VoldUtil.h"

4 years agoMerge changes from topics "metadata_wrapped_key_aosp", "volume_metadata"
Paul Crowley [Tue, 18 Feb 2020 23:17:07 +0000 (23:17 +0000)]
Merge changes from topics "metadata_wrapped_key_aosp", "volume_metadata"

* changes:
  On newer devices, use dm-default-key to encrypt SD cards
  vold: Wrapped key support for metadata encryption
  Refactor: make makeGen local

4 years agoOn newer devices, use dm-default-key to encrypt SD cards
Paul Crowley [Fri, 7 Feb 2020 20:51:56 +0000 (12:51 -0800)]
On newer devices, use dm-default-key to encrypt SD cards

The dm-crypt solution requires a kernel patch that won't be present in
the GKI kernel, while the new metadata encryption system in the GKI
kernel solves this problem in a much cleaner way.

Test: create private volume on Cuttlefish, setting property both ways.
Bug: 147814592
Change-Id: Ie02bd647c38d8101af2bbc47637f65845d312cea

4 years agovold: Wrapped key support for metadata encryption
Barani Muthukumaran [Fri, 7 Feb 2020 06:56:27 +0000 (22:56 -0800)]
vold: Wrapped key support for metadata encryption

metadata_encryption fstab option provides details on the cipher
and flags used for metadata encryption. wrappedkey_v0 is provided
to dm-default-key dm device when a wrapped key is used. The
inline encryption hardware unwraps the key and derives the
encryption key used to encrypt metadata without returning the key
in the clear to software.

Bug: 147733587
Test: FBE with metadata encryption using wrapped keys.
Change-Id: Ibf69bdc12bb18d2f0aef8208e65f3a8dececfd2a

4 years agoRefactor: make makeGen local
Paul Crowley [Fri, 7 Feb 2020 20:51:56 +0000 (12:51 -0800)]
Refactor: make makeGen local

No need for KeyUtil to know how to make a KeyGeneration, it's cleaner
if each module handles it separately. Also, create a CryptoOptions
structure to track metadata encryption options, and simplify legacy
cipher/option handling.

Test: Treehugger
Bug: 147814592
Change-Id: I740063882914097329ff72348d0c0855c26c7aab

4 years agoFix unaligned access to auth token user_id
Paul Crowley [Thu, 30 Aug 2018 22:25:19 +0000 (15:25 -0700)]
Fix unaligned access to auth token user_id

Bug: 65232288
Test: Set a pattern on cuttlefish, ensure we can unlock
Change-Id: I5ee09cf72ab7d3d636a25755134bfad6f88265f9

4 years agoRemove unused code in VoldUtil.h
Paul Crowley [Fri, 7 Feb 2020 23:08:12 +0000 (15:08 -0800)]
Remove unused code in VoldUtil.h

Test: Treehugger
Change-Id: I87585852af49ee49d63e3b1cde579114f855118b

4 years agoMerge "Refactor key generation to handle both normal and metadata encryption." am...
Paul Crowley [Sat, 15 Feb 2020 02:13:22 +0000 (02:13 +0000)]
Merge "Refactor key generation to handle both normal and metadata encryption." am: 8e0780cba2 am: 79b853551d

Change-Id: I644d55df9c5a5441ead5b6790efff159b292c957

4 years agoMerge "Refactor key generation to handle both normal and metadata encryption." am...
Paul Crowley [Sat, 15 Feb 2020 02:03:19 +0000 (02:03 +0000)]
Merge "Refactor key generation to handle both normal and metadata encryption." am: 8e0780cba2

Change-Id: I59510b64f6803f5e76fefa359abfcc9207420126

4 years agoMerge "Refactor key generation to handle both normal and metadata encryption."
Paul Crowley [Sat, 15 Feb 2020 01:40:26 +0000 (01:40 +0000)]
Merge "Refactor key generation to handle both normal and metadata encryption."

4 years agoRefactor key generation to handle both normal and metadata encryption.
Paul Crowley [Wed, 12 Feb 2020 19:04:05 +0000 (11:04 -0800)]
Refactor key generation to handle both normal and metadata encryption.

Bug: 147733587
Test: Treehugger
Change-Id: Iee176037dec2621c84da325c2627f988fcebbc8d
Merged-In: Iee176037dec2621c84da325c2627f988fcebbc8d

4 years agoMerge "Refactor MetadataCrypt.cpp to make create_crypto_blk_dev more general" am...
Paul Crowley [Fri, 14 Feb 2020 21:19:41 +0000 (21:19 +0000)]
Merge "Refactor MetadataCrypt.cpp to make create_crypto_blk_dev more general" am: 7566e467ab am: b272b21a0a

Change-Id: I6afc145de2a06a5d3bb9af516fa20cdeeb4f2c56

4 years agoMerge "Refactor MetadataCrypt.cpp to make create_crypto_blk_dev more general" am...
Paul Crowley [Fri, 14 Feb 2020 21:07:09 +0000 (21:07 +0000)]
Merge "Refactor MetadataCrypt.cpp to make create_crypto_blk_dev more general" am: 7566e467ab

Change-Id: Ib59c92bf516a171bfebc7c11be92502b37acf375

4 years agoMerge "Refactor MetadataCrypt.cpp to make create_crypto_blk_dev more general"
Paul Crowley [Fri, 14 Feb 2020 20:48:35 +0000 (20:48 +0000)]
Merge "Refactor MetadataCrypt.cpp to make create_crypto_blk_dev more general"

4 years agoMerge changes Ic3993c1f,I06645bb4 am: ac34e9aa3e am: b62afed286
Paul Crowley [Fri, 14 Feb 2020 18:45:55 +0000 (18:45 +0000)]
Merge changes Ic3993c1f,I06645bb4 am: ac34e9aa3e am: b62afed286

Change-Id: Id009631e1622d1534674332a1f146934fb4841a5

4 years agoMerge changes Ic3993c1f,I06645bb4 am: ac34e9aa3e
Paul Crowley [Fri, 14 Feb 2020 18:25:49 +0000 (18:25 +0000)]
Merge changes Ic3993c1f,I06645bb4 am: ac34e9aa3e

Change-Id: I4e11f42f1f302f8a08f60756cf08356aac8652cd

4 years agoMerge changes Ic3993c1f,I06645bb4
Paul Crowley [Fri, 14 Feb 2020 18:17:56 +0000 (18:17 +0000)]
Merge changes Ic3993c1f,I06645bb4

* changes:
  Generalize CryptoType infrastructure
  Refactor CryptoType to use better names, and size_t not uint32_t

4 years agoRefactor MetadataCrypt.cpp to make create_crypto_blk_dev more general
Paul Crowley [Fri, 14 Feb 2020 09:15:35 +0000 (01:15 -0800)]
Refactor MetadataCrypt.cpp to make create_crypto_blk_dev more general

Bug: 147814592
Test: Treehugger
Change-Id: I13c6f84d729f2953f78626493d6e6d34d578a013

4 years agoGeneralize CryptoType infrastructure
Paul Crowley [Fri, 7 Feb 2020 20:45:20 +0000 (12:45 -0800)]
Generalize CryptoType infrastructure

More consistency between MetadataCrypt and cryptfs, and steps towards
supporting Adiantum properly in MetadataCrypt.

Test: create private volume on Cuttlefish
Bug: 147814592
Change-Id: Ic3993c1fde11b4f5a9e6cc8ee588a7d92241c6ab

4 years agoRefactor CryptoType to use better names, and size_t not uint32_t
Paul Crowley [Wed, 12 Feb 2020 00:21:54 +0000 (16:21 -0800)]
Refactor CryptoType to use better names, and size_t not uint32_t

Test: treehugger
Bug: 147814592
Change-Id: I06645bb4941794797beebf05b817c4ac52e09cd7