OSDN Git Service
Jaegeuk Kim [Tue, 14 Apr 2020 15:58:30 +0000 (15:58 +0000)]
vold: support F2FS compression am:
f64d30aa82
Change-Id: I03d6c574c922f08c67a662e483a1ed05ea7c4351
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
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
Treehugger Robot [Thu, 9 Apr 2020 22:07:40 +0000 (22:07 +0000)]
Merge "Send 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
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
Paul Crowley [Tue, 7 Apr 2020 03:48:07 +0000 (03:48 +0000)]
Merge "Choose options format using property" am:
479588c68e
Change-Id: I67523617a54957da6a3fae7cd9233ff47627578d
Paul Crowley [Tue, 7 Apr 2020 03:23:57 +0000 (03:23 +0000)]
Merge "Choose 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
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>
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
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
Yurii Zubrytskyi [Fri, 3 Apr 2020 17:25:05 +0000 (17:25 +0000)]
Merge "[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
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
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
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
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
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
Yurii Zubrytskyi [Thu, 26 Mar 2020 07:33:56 +0000 (07:33 +0000)]
Expose new IncFS interface through Vold am:
d05bcc8070
Change-Id: Icbdb9f233850e70e8ca7c458fd30c4bea93a9923
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
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
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
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
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
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
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
Nikita Ioffe [Wed, 11 Mar 2020 16:10:35 +0000 (16:10 +0000)]
Merge "fskeyring & 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)
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
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
Paul Crowley [Thu, 5 Mar 2020 15:59:18 +0000 (15:59 +0000)]
Merge "Use the blk_device supplied by vdc encryptFstab"
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
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
Nikita Ioffe [Wed, 4 Mar 2020 15:02:23 +0000 (15:02 +0000)]
Merge "fskeyring & 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)
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
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
Treehugger Robot [Wed, 4 Mar 2020 04:34:46 +0000 (04:34 +0000)]
Merge "umount /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
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
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
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
Jooyung Han [Thu, 27 Feb 2020 03:06:14 +0000 (03:06 +0000)]
Merge "Use 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)
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
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
Treehugger Robot [Wed, 19 Feb 2020 23:04:37 +0000 (23:04 +0000)]
Merge "Make 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
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
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
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
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
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
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
Paul Crowley [Tue, 18 Feb 2020 23:18:46 +0000 (23:18 +0000)]
Merge "Fix unaligned access to auth token user_id"
Paul Crowley [Tue, 18 Feb 2020 23:18:30 +0000 (23:18 +0000)]
Merge "Remove unused code in VoldUtil.h"
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
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
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
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
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
Paul Crowley [Fri, 7 Feb 2020 23:08:12 +0000 (15:08 -0800)]
Remove unused code in VoldUtil.h
Test: Treehugger
Change-Id: I87585852af49ee49d63e3b1cde579114f855118b
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
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
Paul Crowley [Sat, 15 Feb 2020 01:40:26 +0000 (01:40 +0000)]
Merge "Refactor 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
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
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
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"
Paul Crowley [Fri, 14 Feb 2020 18:45:55 +0000 (18:45 +0000)]
Merge changes Ic3993c1f,I06645bb4 am:
ac34e9aa3e am:
b62afed286
Change-Id: Id009631e1622d1534674332a1f146934fb4841a5
Paul Crowley [Fri, 14 Feb 2020 18:25:49 +0000 (18:25 +0000)]
Merge changes Ic3993c1f,I06645bb4 am:
ac34e9aa3e
Change-Id: I4e11f42f1f302f8a08f60756cf08356aac8652cd
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
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
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
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
Automerger Merge Worker [Thu, 13 Feb 2020 18:59:58 +0000 (18:59 +0000)]
Merge "Use DM layer directly to manage private DM volumes" am:
dd12ea5bd2 am:
47aff8772d
Change-Id: Id3af32b4e83fbfc71492d9050b2215a04b7830a9
Automerger Merge Worker [Thu, 13 Feb 2020 18:43:57 +0000 (18:43 +0000)]
Merge "Use DM layer directly to manage private DM volumes" am:
dd12ea5bd2
Change-Id: Ifb77dd72e810e758ac3a6105e13f7ea4341dca36
Paul Crowley [Thu, 13 Feb 2020 18:35:26 +0000 (18:35 +0000)]
Merge "Use DM layer directly to manage private DM volumes"
Automerger Merge Worker [Thu, 13 Feb 2020 05:30:57 +0000 (05:30 +0000)]
Merge "Pass volume key as a KeyBuffer" am:
334a684557 am:
4d37b4f980
Change-Id: Ia5a1a2f96ba406987c60cc8fa4d94bea33b68644
Automerger Merge Worker [Thu, 13 Feb 2020 05:17:07 +0000 (05:17 +0000)]
Merge "Pass volume key as a KeyBuffer" am:
334a684557
Change-Id: I017400aa3ef988435914ef2770b20bd78a0c1c10
Treehugger Robot [Thu, 13 Feb 2020 05:10:31 +0000 (05:10 +0000)]
Merge "Pass volume key as a KeyBuffer"
Automerger Merge Worker [Wed, 12 Feb 2020 23:43:53 +0000 (23:43 +0000)]
Merge "vold: Support Storage keys for FBE" am:
8cfb530357 am:
aafbd4066a
Change-Id: I8beed2f9939aada8735df5b9c5d0deb9bb3eb5ce
Automerger Merge Worker [Wed, 12 Feb 2020 23:37:24 +0000 (23:37 +0000)]
Merge "vold: Support Storage keys for FBE" am:
8cfb530357
Change-Id: I933a31eefe57b8b06513ca3e7a2ee874a1b680a1
Treehugger Robot [Wed, 12 Feb 2020 23:32:29 +0000 (23:32 +0000)]
Merge "vold: Support Storage keys for FBE"
Paul Crowley [Fri, 7 Feb 2020 20:15:56 +0000 (12:15 -0800)]
Use DM layer directly to manage private DM volumes
Abolish cryptfs_revert_ext_volume, handle in caller. This allows us to
use DeleteDeviceIfExists, avoiding a spurious error message.
Test: create private volume on Cuttlefish, eject, check logs
Bug:
147814592
Change-Id: I836d8bd11b29e32da0863aaa75144543bb9cab9c
Paul Crowley [Fri, 7 Feb 2020 19:49:09 +0000 (11:49 -0800)]
Pass volume key as a KeyBuffer
Not for security, but for consistency with the way we handle other
keys, and to move the length check to where it belongs.
Test: create private volume on Cuttlefish
Bug:
147814592
Change-Id: I10fc4896183d050ce25ff174faf78f525cf62930
Barani Muthukumaran [Mon, 3 Feb 2020 21:06:45 +0000 (13:06 -0800)]
vold: Support Storage keys for FBE
To prevent keys from being compromised if an attacker
acquires read access to kernel memory, some inline
encryption hardware supports protecting the keys in
hardware without software having access to or the
ability to set the plaintext keys. Instead, software
only sees "wrapped keys", which may differ on every boot.
'wrappedkey_v0' fileencryption flag is used to denote
that the device supports inline encryption hardware that
supports this feature. On such devices keymaster is used
to generate keys with STORAGE_KEY tag and export a
per-boot ephemerally wrapped storage key to install it in
the kernel.
The wrapped key framework in the linux kernel ensures the
wrapped key is provided to the inline encryption hardware
where it is unwrapped and the file contents key is derived
to encrypt contents without revealing the plaintext key in
the clear.
Test: FBE validation with Fscrypt v2 + inline crypt + wrapped
key changes kernel.
Bug:
147733587
Change-Id: I1f0de61b56534ec1df9baef075acb74bacd00758
Automerger Merge Worker [Wed, 12 Feb 2020 04:35:10 +0000 (04:35 +0000)]
Merge "Have vold inform keymaster that early boot ended" am:
68b9fb10ae am:
fce0d92ce4
Change-Id: If58cc1911c477ac9bed03fc39952a573db71651e
Automerger Merge Worker [Wed, 12 Feb 2020 04:25:19 +0000 (04:25 +0000)]
Merge "Have vold inform keymaster that early boot ended" am:
68b9fb10ae
Change-Id: Ic113eea7d3282084f1eae308ae1b6df931bd7a8c
Treehugger Robot [Wed, 12 Feb 2020 04:07:43 +0000 (04:07 +0000)]
Merge "Have vold inform keymaster that early boot ended"
Automerger Merge Worker [Wed, 12 Feb 2020 01:11:28 +0000 (01:11 +0000)]
Merge "Update vold to use KM4.1" am:
6c5f302a90 am:
53f8e2df82
Change-Id: I808df576abeec8ce2dd5fc8ea9d4784f4c8b6b0d
Automerger Merge Worker [Wed, 12 Feb 2020 01:06:54 +0000 (01:06 +0000)]
Merge "Update vold to use KM4.1" am:
6c5f302a90
Change-Id: I5393adf2503586c87414a302fa24d381863bccbf
Treehugger Robot [Wed, 12 Feb 2020 00:56:18 +0000 (00:56 +0000)]
Merge "Update vold to use KM4.1"
Shawn Willden [Thu, 16 Jan 2020 21:08:36 +0000 (14:08 -0700)]
Have vold inform keymaster that early boot ended
Just before mounting partition(s) not verified by verified boot, vold
should notify keymaster that early boot has ended so it won't allow
EARLY_BOOT_ONLY keys to be created or used.
Test: VtsHalKeymasterV4_1TargetTest
Change-Id: I74ffec8d5b33f01e62f845a8fc824b3a3cad50f3
Merged-In: I74ffec8d5b33f01e62f845a8fc824b3a3cad50f3
Shawn Willden [Thu, 16 Jan 2020 20:21:42 +0000 (13:21 -0700)]
Update vold to use KM4.1
This CL updates vold to use the Keymaster 4.1 interface, but does not
yet call any of the new methods.
Test: Boot the device
Change-Id: I4574a2f6eead3b71d1e89488b496b734694620c7
Merged-In: I4574a2f6eead3b71d1e89488b496b734694620c7
Automerger Merge Worker [Tue, 11 Feb 2020 01:03:00 +0000 (01:03 +0000)]
Merge "Use std::string to return crypto device, not char *" am:
80731b0975 am:
2381810b99
Change-Id: Ic7683749f4974ccdf251b7351110a1e3663536b7
Automerger Merge Worker [Tue, 11 Feb 2020 00:49:53 +0000 (00:49 +0000)]
Merge "Use std::string to return crypto device, not char *" am:
80731b0975
Change-Id: I4cdc6e59713a945f9fc7b6e9d8c765e78c44b9cb
Paul Crowley [Tue, 11 Feb 2020 00:37:26 +0000 (00:37 +0000)]
Merge "Use std::string to return crypto device, not char *"
Automerger Merge Worker [Sat, 8 Feb 2020 02:15:04 +0000 (02:15 +0000)]
Merge "Refactor: make cryptfs.h smaller" am:
98c501d28e am:
645c2f40a0
Change-Id: I5fb7f528186b6a678a02febd9e866ca4ae467dd4