Commit graph

6377 commits

Author SHA1 Message Date
Pig
3a710043d3 vold: Bring in more wrapped key changes
Conflicts:
	KeyStorage.cpp
	KeyUtil.cpp

[wight554: Apply changes from CAF 12]

Change-Id: I44e81afaec78c567a0bf2eed30a79eb737e2a867
Signed-off-by: Volodymyr Zhdanov <wight554@gmail.com>
Signed-off-by: zlewchan <zlewchan@icloud.com>
2024-09-07 23:38:19 +02:00
Neeraj Soni
e955745ae2 vold: Enable legacy support for wrapped key
Legacy wrapped key support was dropped while merging changes
to support multiple versions of dm-default key driver in kernel.
Fix this by calling legacy API to check wrapped key support for
metadata encryption.

CRs-Fixed: 2678344
Change-Id: I7d9efec09ddf7169cf0b1114b4e16b9fe38cad4b
Signed-off-by: Neeraj Soni <neersoni@codeaurora.org>
2024-09-07 23:36:49 +02:00
Neeraj Soni
21091bbe41 system: vold: Use wrapped key for metadata encryption
Wrapped key feature is needed for better security of encryption keys and to
ensure data integrity when crypto key cache is cleared during reset operation
of storage/crypto hardware.

Original patch: https://source.codeaurora.org/quic/la/platform/system/vold/commit/?h=LA.QSSI.11.0.r1-05600-qssi.0&id=c480f913e6abc2757c0d79afba5a3df1c4adc731
[Pig]: Clean up all deprecated codes that were removed during latter
merge.

CRs-Fixed: 2367150
Change-Id: I83d14861bf81e102151fa3417d84008c214a9ac0
Signed-off-by: zlewchan <zlewchan@icloud.com>
2024-09-07 23:36:33 +02:00
Android Build Coastguard Worker
a10f878c78 Snap for 11926388 from d815f1afdb to 24Q3-release
Change-Id: I3e787d4890095fff80e9b35b571278ac41c1603e
2024-06-05 00:21:49 +00:00
Elliott Hughes
d815f1afdb Merge "libc++fs is part of libc++ now." into main am: 94c82c1a5b am: 59cb8b37d0
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/3113943

Change-Id: Ic6ddb8005cf03beff0f78aef29d90a9ffca38b12
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-04 20:57:52 +00:00
Elliott Hughes
59cb8b37d0 Merge "libc++fs is part of libc++ now." into main am: 94c82c1a5b
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/3113943

Change-Id: I18bb3866041514e1635b7f20e0e6701a546c08ce
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-04 20:41:13 +00:00
Elliott Hughes
94c82c1a5b Merge "libc++fs is part of libc++ now." into main 2024-06-04 20:24:39 +00:00
Elliott Hughes
f447bd5a51 libc++fs is part of libc++ now.
Change-Id: I1351be9a62852c2e8d045db55ecda46b06fd60d9
2024-06-04 16:52:58 +00:00
Android Build Coastguard Worker
80f627a45c Snap for 11889377 from c24c5ae8e3 to 24Q3-release
Change-Id: I584294ec2d5d83db1929bd1f15a661b76379e52f
2024-05-25 03:25:10 +00:00
Treehugger Robot
c24c5ae8e3 Merge "Fix build with ToT libc++" into main am: c059d435e2 am: c2625d4f36
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/3101798

Change-Id: I7d61e57133213c64038dcf2a710ee216fb339d93
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-24 08:38:14 +00:00
Treehugger Robot
c2625d4f36 Merge "Fix build with ToT libc++" into main am: c059d435e2
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/3101798

Change-Id: I8a4867da9f5940ae36aca528d1d1fbd1399b9ebc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-24 08:06:22 +00:00
Treehugger Robot
c059d435e2 Merge "Fix build with ToT libc++" into main 2024-05-24 07:49:17 +00:00
Yi Kong
b8345b6e9c Fix build with ToT libc++
system/vold/fs/F2fs.h:33:28: error: no template named 'vector' in namespace 'std'
   33 |                 const std::vector<std::string>& user_devices);
      |

Test: Build with ToT libc++
Change-Id: Iab5f3fc06ce780ae81e96df7fd091a28407c1422
2024-05-24 14:16:59 +09:00
Android Build Coastguard Worker
68a4ec973a Snap for 11860797 from ddc47913e6 to 24Q3-release
Change-Id: I85b6a1059a92a41d184343c7984b38146f83aca0
2024-05-18 23:25:46 +00:00
Daniel Rosenberg
ddc47913e6 Merge "Fix vfat retry fsck logic" into main am: ad609263e8 am: a23793bee6
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/3083815

Change-Id: I582b964ae9cfc005dfe80e36ffe1937bd9bd6d1e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-18 00:33:17 +00:00
Daniel Rosenberg
a23793bee6 Merge "Fix vfat retry fsck logic" into main am: ad609263e8
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/3083815

Change-Id: I2e107c8e0c9c70476924c44a1a500536e00c44e7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-18 00:02:13 +00:00
Daniel Rosenberg
ad609263e8 Merge "Fix vfat retry fsck logic" into main 2024-05-17 23:45:32 +00:00
Daniel Rosenberg
92d0c2eeeb Fix vfat retry fsck logic
On case 4 (filesystem modified), we attempt to recheck the filesystem,
but due to the while(0), this immediately returns 0, resulting in
mounting a filesystem with unfixed errors. This corrects that.

Bug: 340128961
Test: Ensure case 4 leads to retries
Change-Id: Ida2840538ad88c8de5341b0d71d3712d93b0cab1
2024-05-13 15:13:58 -07:00
Android Build Coastguard Worker
e06c822b3a Snap for 11800966 from 21fa64ef91 to 24Q3-release
Change-Id: I1a5bfddcdf7b892aafa88db0f8b8af6073cf6114
2024-05-04 01:25:31 +00:00
Treehugger Robot
21fa64ef91 Merge "Support multiple partition for /data" into main am: d38aa9fa0a am: 1b1417034b
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/3061524

Change-Id: I910be638399e19ede25c366759d46c08f2e31865
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-02 20:51:25 +00:00
Treehugger Robot
1b1417034b Merge "Support multiple partition for /data" into main am: d38aa9fa0a
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/3061524

Change-Id: Iad3592ed0addf199493f4520d1d476b6310f6e89
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-02 20:30:26 +00:00
Treehugger Robot
d38aa9fa0a Merge "Support multiple partition for /data" into main 2024-05-02 20:11:52 +00:00
Jaegeuk Kim
2091c878fd Support multiple partition for /data
Bug: 336319772
Change-Id: I92eca566063b7d8ad74a15c7b74d809b452ace72
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2024-05-01 18:20:12 +00:00
Android Build Coastguard Worker
38f08d5193 Snap for 11784291 from 1a442c2606 to 24Q3-release
Change-Id: Ia55e4cc1d420de1709d90e94fe45aa36a817e689
2024-04-30 23:27:57 +00:00
Xin Li
1a442c2606 [automerger skipped] Empty merge of Android 24Q2 Release (ab/11526283) to aosp-main-future am: c7d7f9c7aa -s ours
am skip reason: Merged-In Ic082f8803bfddf523f6016d4924dbcf9abc036ae with SHA-1 f7c7ae7801 is already in history

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

Change-Id: I5971fc8247ec65ec71e7b1d68020577f346e93be
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-29 23:45:54 +00:00
Xin Li
c7d7f9c7aa Empty merge of Android 24Q2 Release (ab/11526283) to aosp-main-future
Bug: 337098550
Merged-In: Ic082f8803bfddf523f6016d4924dbcf9abc036ae
Change-Id: I341e01a7cf1e8e7b5278f54812b69a0706473d70
2024-04-29 11:53:39 -07:00
Android Build Coastguard Worker
e1f7dabaa4 Snap for 11766482 from f66981924d to 24Q3-release
Change-Id: I065b0de0a8bb002c3d31dff96f4b17cd2acea5dd
2024-04-25 23:25:19 +00:00
Kelvin Zhang
f66981924d Merge "Get the correct fstab entry if there are more than one" into main am: 41d3e8d1e5 am: f7c7ae7801
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/3059764

Change-Id: I889793158393d4de3546218916312e9488ae980d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-25 17:46:00 +00:00
Kelvin Zhang
f7c7ae7801 Merge "Get the correct fstab entry if there are more than one" into main am: 41d3e8d1e5
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/3059764

Change-Id: Ic082f8803bfddf523f6016d4924dbcf9abc036ae
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-25 17:24:51 +00:00
Kelvin Zhang
41d3e8d1e5 Merge "Get the correct fstab entry if there are more than one" into main 2024-04-25 16:48:37 +00:00
Kelvin Zhang
fd5eb260c4 Get the correct fstab entry if there are more than one
vold currently uses the first fstab entry for moun point /data .
However, if there are multiple fstab entries for /data and the
first one isn't the entry actually being used, checkpoint may fail.

Test: boot a device with ext4 entry placed after f2fs
Bug: 293313353
Change-Id: Id374c622c53fd61047d62743555234d36bd038ec
2024-04-24 14:15:06 -07:00
Android Build Coastguard Worker
a71672ebe0 Snap for 11746631 from 50f7ba2315 to 24Q3-release
Change-Id: I9edaf8db10e21e71a2dfbeeabca8f47bbc0adaa3
2024-04-22 23:25:01 +00:00
Treehugger Robot
50f7ba2315 Merge "Migrate Test Targets to New Android Ownership Model" into main am: 7c7fb49a3c am: 52c41d7e46
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2946232

Change-Id: I34cdfb7cb5a096c34bb90e947be247c30e7bbec2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-22 18:02:19 +00:00
Treehugger Robot
52c41d7e46 Merge "Migrate Test Targets to New Android Ownership Model" into main am: 7c7fb49a3c
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2946232

Change-Id: I673e1a351916bdacab89d1ab207f6ce627fa17af
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-22 17:40:16 +00:00
Treehugger Robot
7c7fb49a3c Merge "Migrate Test Targets to New Android Ownership Model" into main 2024-04-22 17:15:08 +00:00
Android Build Coastguard Worker
cd9dda5d0d Snap for 11733120 from d5c2e27d86 to 24Q3-release
Change-Id: Ia1605808bc1ebc9a076ad3ffd887e0dc77d733e4
2024-04-18 23:24:45 +00:00
Ellen Arteca
d5c2e27d86 Merge "Replace string secret with a byte[] for CE storage in vold binder" into main am: a078ea365a am: 27ab1ed3ec
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/3025836

Change-Id: I8c279fcc487108facf8d5244c0e367693a3116c7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-18 03:46:02 +00:00
Ellen Arteca
27ab1ed3ec Merge "Replace string secret with a byte[] for CE storage in vold binder" into main am: a078ea365a
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/3025836

Change-Id: I3b07a07749b81cbf3eb0a294070b0bd27437c475
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-18 03:25:20 +00:00
Ellen Arteca
a078ea365a Merge "Replace string secret with a byte[] for CE storage in vold binder" into main 2024-04-18 03:04:25 +00:00
Android Build Coastguard Worker
6b1e589a46 Snap for 11728787 from 006d00bede to 24Q3-release
Change-Id: I05ac3c082dc1af55e5f3c0bdba5a501154d03c69
2024-04-17 23:26:03 +00:00
Ellen Arteca
5177ed2e50 Replace string secret with a byte[] for CE storage in vold binder
Replace the current `string secret` argument to the lock/unlock of
CE storage with a `byte[]`. This is part of an effort to remove
instances of the LSKF and LSKF-derived secrets that are available
in a RAMdump -- since the strings are passed from Java, they cannot
be cleared, but `byte[]` can be.

This CL is the described argument change, and the propagation of this
change to the various functions that are called by the vold binder
functions.

Bug: 320392352
Test: Manual upgrade test:
	1. Flash the device with a build not including these changes
	2. Rebuild with these changes
	3. Flash the device (but do not wipe) with the build including
	   these changes
	4. See if the device boots and works normally -- if the CE
	   storage cannot be unlocked it will not start up and be usable
	   when the user logs in.
Change-Id: Icd4c925f2fd79e7533fdf9027e16f6736dbe1ab3
2024-04-17 18:41:54 +00:00
Treehugger Robot
006d00bede Merge "Fix some special usb can't mount issue." into main am: 77f8b00c3d am: a3b07ee49d
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/3046093

Change-Id: I33b586ef09adfde29bd0c2699ce7e7aed28c5781
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-17 17:38:02 +00:00
Treehugger Robot
a3b07ee49d Merge "Fix some special usb can't mount issue." into main am: 77f8b00c3d
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/3046093

Change-Id: I2d60b5f786e4af218ac654b8ba9cdbcb720cbf5a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-17 16:40:42 +00:00
Treehugger Robot
77f8b00c3d Merge "Fix some special usb can't mount issue." into main 2024-04-17 16:22:37 +00:00
Xiuqin Wang
22fa53488a Fix some special usb can't mount issue.
[Description]
The usb has invalid partition table, but vold thinks it has partition.
So vold not to treat entire disk as partition.

Bug: 160433451

[Test Report]
Build pass.
The special usb can mount ok.

Change-Id: I0b0e761641f6961e69d7d7f7fbc58d33eeab3a08
2024-04-17 14:54:35 +08:00
Android Build Coastguard Worker
bf68cbc5e9 Snap for 11666018 from 8c903531b6 to 24Q3-release
Change-Id: I779abc3bbf114dd3e14c61c11c28ed3f15294853
2024-04-03 23:24:29 +00:00
Ellen Arteca
8c903531b6 Merge "Revert^2 "Add @SensitiveData tag to IVold"" into main am: e76fb7a810 am: 03e9ac8fd0
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/3020145

Change-Id: I93976efdee8fff390928a91dcecededad85c75df
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-02 23:09:24 +00:00
Ellen Arteca
03e9ac8fd0 Merge "Revert^2 "Add @SensitiveData tag to IVold"" into main am: e76fb7a810
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/3020145

Change-Id: I582453bea854f63486505a77977493febb9111e4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-02 22:54:51 +00:00
Ellen Arteca
e76fb7a810 Merge "Revert^2 "Add @SensitiveData tag to IVold"" into main 2024-04-02 22:34:27 +00:00
Ellen Arteca
3785afbdd3 Revert^2 "Add @SensitiveData tag to IVold"
This reverts commit 697c6a5217.
It is reapplying the change in I0439f63fd4739bf5a6c957695cc9c3003ec89eb0.

Reason for revert: Undoing the revert (putting the change back in); after looking at the 
performance bug, it seems impossible it was caused by the addition of the `@SensitiveData` 
tag on IVold.
Performance bug: 331045735

Bug: 320392352
Test: launch_cvd -daemon

Change-Id: I522f63836155ea404260e89fd2f209738f37d5b3
2024-03-29 21:32:40 +00:00