Commit graph

5528 commits

Author SHA1 Message Date
Florian Mayer
11d45326d9 Add vold to hwasan-postsubmit
Test: Run tests under HWASan.
Bug: 193568145
Change-Id: I03e7506f932cb42a91261bd1c28f3d7f60dd5f1e
2022-03-18 14:25:02 -07:00
Daeho Jeong
7c788fc3e9 vold: add gc period in setGCUrgentPace
To make gc period changable, added a new gcPeriod parameter to
setGCUrgentPace.

Test: adb shell device_config put storage_native_boot smart_idle_maint_period 10
Bug: 202283480
Bug: 181079477
Signed-off-by: Daeho Jeong <daehojeong@google.com>
Change-Id: I4e44a80ea5b51d9a7cde69d25e129dd0673b271f
2022-03-18 12:56:17 -07:00
Mohammad Samiul Islam
e833630eb7 Create misc_ce and misc_de directories on /mnt/expand
We want to store sdk data on the same volume as app data. Since sdk data
is stored in misc_ce and misc_de directory, we need to ensure they exist
on adopted storage mounted at /mnt/expand/<volume-uuid>.

This CL creates `/mnt/expand/<volume-uuid>/misc_{ce,de}` directories
when disk is mouted and then when user storage is prepared, the sdk root
directory is created.

By having these directories, we can now move the sdk data to other
volume when app data is moved.

Bug: b/222034645
Test: atest SdkSandboxStorageHostTest (see ag/17120883)
Ignore-AOSP-First: End to end test added which exists in internal branch
    only. Will cherry-pick this CL to aosp standalone once it is safely
    merged to internal branch.
Change-Id: I0e73d9ce105abec4b77c378cde58aa7365258f01
Merged-In: I0e73d9ce105abec4b77c378cde58aa7365258f01
(cherry picked from commit b459591fd1)
2022-03-18 11:11:22 +00:00
Eric Biggers
41d7843513 Rename FstabEntry::metadata_encryption to metadata_encryption_options
There have been two bugs where people use !metadata_encryption.empty()
to check whether metadata encryption is enabled.  It should actually be
!metadata_key_dir.empty(), since 'metadata_encryption' is the encryption
options, which can be empty if the defaults are sufficient.

Rename the field in FstabEntry appropriately.

To avoid breaking fstab files, don't rename the flag in the fstab file
itself.  So, now the fstab flags map to FstabEntry fields as follows:

    keydirectory => metadata_key_dir
    metadata_encryption => metadata_encryption_options

Change-Id: I3b5e28c273950bcf13bfd433aaaa49d1e92e177c
2022-03-17 23:21:16 +00:00
Eric Biggers
f14f8627bb Fix check for whether metadata encryption is enabled
metadata_key_dir controls whether metadata encryption is enabled, not
metadata_encryption which is just the encryption options and can be
empty if the default options are sufficient.

Bug: 198405417
Fixes: 156d9d2293 ("Pre-create userdata metadata encryption device.")
Change-Id: I98ee253c7e5e738ee087ec07ed60f4a376ca7cee
2022-03-17 23:17:33 +00:00
Eric Biggers
3aa35ee431 Replace an outdated TODO in Keystore::exportKey
The bug this TODO references has been closed, so replace the TODO with
an explanation of why the code is correct.

Bug: 185811713
Change-Id: I8f4230ab3e290f8ffa8ca25aaa188e8d7156cf8e
2022-03-17 22:39:19 +00:00
Daeho Jeong
3733dc7edf Merge "vold: switch f2fs gc_urgent_high to gc_urgent_mid" am: 119b9ae8a5 am: a1f5053ea0 am: 7e17081e8c
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2027903

Change-Id: Ie61999ecf40e10e9c9c7efc2b88b03ece4118399
2022-03-16 22:22:58 +00:00
Daeho Jeong
7e17081e8c Merge "vold: switch f2fs gc_urgent_high to gc_urgent_mid" am: 119b9ae8a5 am: a1f5053ea0
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2027903

Change-Id: I2e6b56b633570fa5ecb1b402e8d7f7b12b7e9f60
2022-03-16 22:05:12 +00:00
Daeho Jeong
a1f5053ea0 Merge "vold: switch f2fs gc_urgent_high to gc_urgent_mid" am: 119b9ae8a5
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2027903

Change-Id: I8d1583db7acfe8fc8e97392f45ec9c85962f0c37
2022-03-16 21:47:44 +00:00
Daeho Jeong
119b9ae8a5 Merge "vold: switch f2fs gc_urgent_high to gc_urgent_mid" 2022-03-16 21:33:23 +00:00
Daeho Jeong
5e879421a3 vold: switch f2fs gc_urgent_high to gc_urgent_mid
We need to reduce F2FS GC intensity for smart idle maintenance service
not to interfere with other I/O activities.

Test: check smart idle maintenance log every hour
Bug: 202283480
Bug: 181079477
Signed-off-by: Daeho Jeong <daehojeong@google.com>
Change-Id: Ideb1641a1539a23828bc8b00d9739c8128a984c0
2022-03-15 21:42:55 -07:00
Eric Biggers
b69451c28d [automerger skipped] Merge "Remove HardwareAuthToken parameters from binder interface" am: e7dbc48584 am: d469281f35 am: fd3bca3778 -s ours
am skip reason: Merged-In I6160d30deb138a5366532de84cbf6f02cbc69b8c with SHA-1 5bb9faab49 is already in history

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

Change-Id: I8bf0c2b8fec07db587b29102cb5acacbcd9cb055
2022-03-15 23:05:46 +00:00
Eric Biggers
fd3bca3778 Merge "Remove HardwareAuthToken parameters from binder interface" am: e7dbc48584 am: d469281f35
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2021638

Change-Id: I6b449dd42f25d57cfc126f3975e9aac54f922740
2022-03-15 22:41:02 +00:00
Eric Biggers
d469281f35 Merge "Remove HardwareAuthToken parameters from binder interface" am: e7dbc48584
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2021638

Change-Id: Ibee6bf73524768d619132261c382c6b96665d913
2022-03-15 22:12:00 +00:00
Eric Biggers
e7dbc48584 Merge "Remove HardwareAuthToken parameters from binder interface" 2022-03-15 21:33:26 +00:00
Treehugger Robot
7e551d8d0c [automerger skipped] Merge "Disable fuse-bpf" am: 1faebba8c9 am: 1dfd477133 am: 3e282df417 -s ours
am skip reason: Merged-In I423d05d24809b097d02ca5845ab16283edc953b0 with SHA-1 1269ae8d68 is already in history

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

Change-Id: Icc0cbcae4a4e14f0f0a40a29379c56d1ce373f79
2022-03-15 17:09:40 +00:00
Treehugger Robot
3e282df417 Merge "Disable fuse-bpf" am: 1faebba8c9 am: 1dfd477133
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2022395

Change-Id: I6d660af532c57c65fae646a58ccff3775e627974
2022-03-15 16:43:55 +00:00
Treehugger Robot
1dfd477133 Merge "Disable fuse-bpf" am: 1faebba8c9
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2022395

Change-Id: If6e828f9b2367ba3874faef168cbcd33cae48085
2022-03-15 16:16:06 +00:00
Treehugger Robot
1faebba8c9 Merge "Disable fuse-bpf" 2022-03-15 15:40:11 +00:00
Eric Biggers
90a305232e Remove HardwareAuthToken parameters from binder interface
These are no longer used.

Test: atest com.android.server.locksettings
Bug: 184723544
Change-Id: I6160d30deb138a5366532de84cbf6f02cbc69b8c
(cherry picked from commit 5bb9faab49)
Merged-In: I6160d30deb138a5366532de84cbf6f02cbc69b8c
2022-03-15 01:26:08 +00:00
Paul Lawrence
1269ae8d68 Disable fuse-bpf
ag/17002484 does not disable fuse-bpf as hoped when the device has once
booted with fuse-bpf enabled, since the persistent property persists

Change name of property as read to disable feature regardless of current
state

Bug: 221892618
Ignore-AOSP-First: This change has topic dependencies. aosp/2022395 will
  be merged right after this one.
Test: fuse-bpf is disabled even if persist.sys.fuse.bpf.enable is true
Change-Id: I423d05d24809b097d02ca5845ab16283edc953b0
2022-03-14 13:51:23 +00:00
Paul Lawrence
d88e4682e3 Disable fuse-bpf
ag/17002484 does not disable fuse-bpf as hoped when the device has once
booted with fuse-bpf enabled, since the persistent property persists

Change name of property as read to disable feature regardless of current
state

Bug: 221892618
Test: fuse-bpf is disabled even if persist.sys.fuse.bpf.enable is true
Change-Id: I423d05d24809b097d02ca5845ab16283edc953b0
Merged-In: I423d05d24809b097d02ca5845ab16283edc953b0
2022-03-14 11:12:49 +00:00
Treehugger Robot
67274bc7a3 Merge "vdc: remove FDE commands" am: c1b4ce01f8 am: 1d1c8a541c am: 22deab0815
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2021636

Change-Id: I466ef72bb0fae4fa4f10966c4f08982bd2592bb4
2022-03-11 01:10:55 +00:00
Treehugger Robot
22deab0815 Merge "vdc: remove FDE commands" am: c1b4ce01f8 am: 1d1c8a541c
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2021636

Change-Id: I85e1a9a082b2ea711841dff903dcc97bb19edbed
2022-03-11 00:49:45 +00:00
Treehugger Robot
1d1c8a541c Merge "vdc: remove FDE commands" am: c1b4ce01f8
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2021636

Change-Id: I828271995fb646b06beb8601940a074629ee32eb
2022-03-11 00:26:21 +00:00
Treehugger Robot
c1b4ce01f8 Merge "vdc: remove FDE commands" 2022-03-11 00:03:48 +00:00
Treehugger Robot
2e0e0f7878 Merge "Remove unused function UnmountTreeWithPrefix()" am: 536beac4bd am: 5fdc4c764d am: 6036321541
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2021355

Change-Id: I152aa95589c7bd1283c9449049ebaf0629eee769
2022-03-10 22:45:21 +00:00
Treehugger Robot
fc0115e14e Merge "Stop using -Wno-missing-field-initializers" am: a10ce5db7d am: afcb70bcef am: 14e5d77786
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2021316

Change-Id: I9fa44a0382373fcadc128d6031d9d0c5c52326bd
2022-03-10 22:45:12 +00:00
Treehugger Robot
5e34370230 Merge "Stop using -Wno-unused-variable" am: 8a73bf6710 am: e3a45f74b9 am: 8272eb8819
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2021315

Change-Id: I4934bde520993558d4f98fc81861f89647cd14fd
2022-03-10 22:44:50 +00:00
Eric Biggers
b140eba44d vdc: remove FDE commands
Remove the "enablecrypto" and "mountdefaultencrypted" commands, since
they aren't used anymore.  These were specific to FDE, for which support
has been removed.

Bug: 208476087
Change-Id: I2045488034dca46a97e50c5124182375691d09f9
2022-03-10 22:44:22 +00:00
Treehugger Robot
6036321541 Merge "Remove unused function UnmountTreeWithPrefix()" am: 536beac4bd am: 5fdc4c764d
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2021355

Change-Id: I569d68cd78324ca626763350ee0848c2cd31d8b4
2022-03-10 22:24:35 +00:00
Treehugger Robot
14e5d77786 Merge "Stop using -Wno-missing-field-initializers" am: a10ce5db7d am: afcb70bcef
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2021316

Change-Id: Ic50376fbb016b00fc37c9fcf9022c6864009e151
2022-03-10 22:24:18 +00:00
Treehugger Robot
8272eb8819 Merge "Stop using -Wno-unused-variable" am: 8a73bf6710 am: e3a45f74b9
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2021315

Change-Id: I27c8d91e93f38c87a077f8ccaeb4ce6826457c2b
2022-03-10 22:23:43 +00:00
Treehugger Robot
5fdc4c764d Merge "Remove unused function UnmountTreeWithPrefix()" am: 536beac4bd
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2021355

Change-Id: I2715ed537f1a62cf77b8392668df4092dda3221d
2022-03-10 22:00:59 +00:00
Treehugger Robot
536beac4bd Merge "Remove unused function UnmountTreeWithPrefix()" 2022-03-10 22:00:46 +00:00
Treehugger Robot
afcb70bcef Merge "Stop using -Wno-missing-field-initializers" am: a10ce5db7d
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2021316

Change-Id: Ic9269bc43e78dc7071cad0a509ccb642d1945c20
2022-03-10 22:00:34 +00:00
Treehugger Robot
e3a45f74b9 Merge "Stop using -Wno-unused-variable" am: 8a73bf6710
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2021315

Change-Id: I1dd9dd0b1af0da5c7a0ee4e37f1fb5d0ba072375
2022-03-10 21:59:48 +00:00
Treehugger Robot
a10ce5db7d Merge "Stop using -Wno-missing-field-initializers" 2022-03-10 21:45:31 +00:00
Treehugger Robot
8a73bf6710 Merge "Stop using -Wno-unused-variable" 2022-03-10 21:40:02 +00:00
Eric Biggers
b5f688aaeb Remove unused function UnmountTreeWithPrefix()
Change-Id: I6940498e4d6269dfcb78cab75bf56d1d545dd784
2022-03-10 20:31:51 +00:00
Eric Biggers
4e152c1c1d Stop using -Wno-missing-field-initializers
There aren't actually any instances of this warning, so just stop
disabling this warning.

Change-Id: I3e810ab2b478851e0651e71b9fda109be70c3cc7
2022-03-10 20:19:46 +00:00
Eric Biggers
0d12fd668d Stop using -Wno-unused-variable
This is a useful warning, so remove two unused variables and stop
disabling this warning.

Change-Id: I3efe0b300ea139ea11d645dec6fb2613acc0e51b
2022-03-10 20:17:23 +00:00
Samiul Islam
b86b08d260 Merge "Create misc_ce and misc_de directories on /mnt/expand" into tm-dev 2022-03-10 11:50:58 +00:00
Eric Biggers
696b8cf721 Merge "Remove progress property support from encrypt_inplace()" am: 8bf0d914df am: 65c5e339cb am: 764f097287
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2019199

Change-Id: Ib9a6e5c472840a6721728c6c523eb087f018973b
2022-03-09 23:51:39 +00:00
Eric Biggers
764f097287 Merge "Remove progress property support from encrypt_inplace()" am: 8bf0d914df am: 65c5e339cb
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2019199

Change-Id: I8c5c03a134339f2cc2ab4f6c648d1f1235e697c5
2022-03-09 23:28:43 +00:00
Eric Biggers
65c5e339cb Merge "Remove progress property support from encrypt_inplace()" am: 8bf0d914df
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2019199

Change-Id: I15768cb52cf0c160f06a1532688cb31bac6055dd
2022-03-09 23:03:19 +00:00
Eric Biggers
8bf0d914df Merge "Remove progress property support from encrypt_inplace()" 2022-03-09 22:39:37 +00:00
Eric Biggers
640a1a9f43 Remove progress property support from encrypt_inplace()
Now that FDE support has been removed, encrypt_inplace() is only used by
metadata encryption, which passes false for the set_progress_properties
parameter.  Therefore, remove the set_progress_properties parameter and
the associated code to update the "vold.encrypt_inplace" and
"vold.encrypt_time_remaining" system properties.

Note that encrypt_inplace() still keeps track of its progress to some
extent, for the purpose of printing log messages; that hasn't changed.

Bug: 208476087
Change-Id: If695db1c4e23f568ff865bccc9fc1b98148815be
2022-03-09 21:03:52 +00:00
Mohammad Samiul Islam
b459591fd1 Create misc_ce and misc_de directories on /mnt/expand
We want to store sdk data on the same volume as app data. Since sdk data
is stored in misc_ce and misc_de directory, we need to ensure they exist
on adopted storage mounted at /mnt/expand/<volume-uuid>.

This CL creates `/mnt/expand/<volume-uuid>/misc_{ce,de}` directories
when disk is mouted and then when user storage is prepared, the sdk root
directory is created.

By having these directories, we can now move the sdk data to other
volume when app data is moved.

Bug: b/222034645
Test: atest SdkSandboxStorageHostTest (see ag/17120883)
Ignore-AOSP-First: End to end test added which exists in internal branch
    only. Will cherry-pick this CL to aosp standalone once it is safely
    merged to internal branch.
Change-Id: I0e73d9ce105abec4b77c378cde58aa7365258f01
2022-03-08 10:37:31 +00:00
Samiul Islam
417b2f5ce7 [automerger skipped] Merge changes I72734267,I66ef7a72 am: 6ace0c8ba0 am: 1e1bade6ff am: 46ae434bff -s ours
am skip reason: Merged-In I727342675f6817d4dced431b4ef57e909c02eb5a with SHA-1 bad7cd0fd7 is already in history

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

Change-Id: I03ef260fa3d118692072d4b2048c7d42e8c883cf
2022-03-07 16:07:07 +00:00