Commit graph

5560 commits

Author SHA1 Message Date
Xin Li
891a5f7c8d Empty merge of sc-v2-dev-plus-aosp-without-vendor@8084891
Bug: 214455710
Merged-In: I012cfb9b01e5d21ec71700c3c52ac9c096cd1a90
Change-Id: I67f80ee94d0f1f273ef49aa45ea0e4674311892b
2022-02-11 06:17:38 +00:00
Eric Biggers
6070f6f0f9 Merge "Remove HardwareAuthToken parameters from binder interface" 2022-02-08 05:08:08 +00:00
Presubmit Automerger Backend
e9aba35079 [automerger skipped] [automerged blank] Fix the incorrect parameter quota when userdata is formatted with EXT4 2p: 681c629a9e am: 8c67ceb8cd -s ours
am skip reason: Merged-In Ibff10e8e67b4e6ffabea97f534ff6551aed91963 with SHA-1 3101ac01ac is already in history

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

Change-Id: I1a438fecd86b449d5e5ca500c043378c690c9d09
2022-02-07 21:25:53 +00:00
Eric Biggers
5bb9faab49 Remove HardwareAuthToken parameters from binder interface
These are no longer used.

Test: atest com.android.server.locksettings
Bug: 184723544
Ignore-AOSP-First: prerequisite changes in frameworks/base have merge
                   conflicts between AOSP and internal master
Change-Id: I6160d30deb138a5366532de84cbf6f02cbc69b8c
2022-02-05 03:21:20 +00:00
Shikha Malhotra
f7bc4958c4 Enable ProjectID for the file systems by default.
This is in conjunction with enabling the project id for internal directories. The check whether project ids should be used or not, is done in installd process. If they cannot be used, then the installd process falls back to previous approaches.

Bug: b/215154615
Test: atest installd/StorageHostTest
Test: atest installd/installd_service_test.cpp
Change-Id: I2c6672640295ebbc5ec78075290fc8e8703384ef
2022-02-04 15:32:31 +00:00
Presubmit Automerger Backend
8c67ceb8cd [automerged blank] Fix the incorrect parameter quota when userdata is formatted with EXT4 2p: 681c629a9e
Blank merge reason: Change-Id Ibff10e8e67b4e6ffabea97f534ff6551aed91963 with SHA-1 3101ac01ac is in history

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

Bug: 199802158
Bug: 211847181
Change-Id: I37d3c5f354c7d03ddcb9c7169a75cdcb916419e0
2022-02-03 00:31:25 +00:00
lin.gui
681c629a9e Fix the incorrect parameter quota when userdata is formatted with EXT4
The userdata will be formatted by VOLD during bootup when the userdata
is not completed file system(EXT4 or F2FS).
For EXT4 on userdata and quota feature is enabled. the parameter quota
is incorrect in ext4::Format(). Change the parameter from
quotatype=prjquota to quotatype=usrquota:grpquota:prjquota.

Bug: 199802158
Bug: 211847181
Test: run cts-on-gsi -m CtsAppSecurityHostTestCases -t
      android.appsecurity.cts.StorageHostTest

Change-Id: Ibff10e8e67b4e6ffabea97f534ff6551aed91963
Merged-In: Ibff10e8e67b4e6ffabea97f534ff6551aed91963
(cherry picked from commit 3101ac01ac)
(cherry picked from commit 344cd3337903c3b5da35df3dc3f15d4badc253a4)
2022-02-03 00:31:14 +00:00
Treehugger Robot
0d7121aea9 [automerger skipped] Merge "[vold] Check incremental paths before mounting" am: 537b76cd98 am: 98fc484581 am: 718d74d66d -s ours am: 756d3f3bcd -s ours
am skip reason: Merged-In I6035447f94ef44c4ae3294c3ae47de2d7210683a with SHA-1 40389820e2 is already in history

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

Change-Id: I8fb4500ff02312f9dc54eb66c662728891874aea
2022-02-01 02:32:11 +00:00
Treehugger Robot
756d3f3bcd [automerger skipped] Merge "[vold] Check incremental paths before mounting" am: 537b76cd98 am: 98fc484581 am: 718d74d66d -s ours
am skip reason: Merged-In I6035447f94ef44c4ae3294c3ae47de2d7210683a with SHA-1 40389820e2 is already in history

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

Change-Id: I40f1b579fdf117f062dbd34f7edb02caea186a90
2022-02-01 02:17:58 +00:00
Treehugger Robot
718d74d66d Merge "[vold] Check incremental paths before mounting" am: 537b76cd98 am: 98fc484581
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1966063

Change-Id: I656c80873cbae20a1d85e3e66c9793202b1a1197
2022-02-01 02:02:24 +00:00
Treehugger Robot
98fc484581 Merge "[vold] Check incremental paths before mounting" am: 537b76cd98
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1966063

Change-Id: I6b3a1e77b153ea5d5180cd1210bfdb4e91d9aaf2
2022-02-01 01:45:30 +00:00
Treehugger Robot
537b76cd98 Merge "[vold] Check incremental paths before mounting" 2022-02-01 01:29:12 +00:00
Yurii Zubrytskyi
18eb877246 [vold] Check incremental paths before mounting
Vold was trusting system_server too much and allowed for pretty
much any path in mount()/bindMount() calls for incremental.
This CL adds validation to make sure it's only accessing own
directories. This includes enforcing no symlinks in the paths

Bug: 198657657
Bug: 216722132
Test: manual
Change-Id: I6035447f94ef44c4ae3294c3ae47de2d7210683a
Merged-In: I6035447f94ef44c4ae3294c3ae47de2d7210683a
2022-01-31 22:13:14 +00:00
Treehugger Robot
277ba83bfa Merge "Add timeout for fsck on untrusted media" am: 313e8556a6 am: d00aa3ec08 am: da54b106a8 am: d6f405cd8d
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1826726

Change-Id: I65c8c3daab439926cc92cd92694608345bcef033
2022-01-26 10:06:56 +00:00
Treehugger Robot
d6f405cd8d Merge "Add timeout for fsck on untrusted media" am: 313e8556a6 am: d00aa3ec08 am: da54b106a8
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1826726

Change-Id: Iae46a17c1754a0807627ea6110993f0154aeeda3
2022-01-26 09:42:00 +00:00
Treehugger Robot
da54b106a8 Merge "Add timeout for fsck on untrusted media" am: 313e8556a6 am: d00aa3ec08
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1826726

Change-Id: I3a8de5dee8ea4fe9fec2e2234434743e7d96c169
2022-01-26 09:32:15 +00:00
Treehugger Robot
d00aa3ec08 Merge "Add timeout for fsck on untrusted media" am: 313e8556a6
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1826726

Change-Id: I9786e6da7d4f3926c7a9f329db73eacec48645d5
2022-01-26 09:14:10 +00:00
Treehugger Robot
313e8556a6 Merge "Add timeout for fsck on untrusted media" 2022-01-26 08:55:08 +00:00
Tao Wu
48c9ee18d6 Merge "Don't abort fuse connections for virtiofs." am: 09997fe28a am: a6e700b054 am: b99a9e4f21 am: 62a0bbbc08
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1437953

Change-Id: I2c7ce12cffd90b4ab952158f0e268fcf616afe51
2022-01-19 05:09:37 +00:00
Tao Wu
62a0bbbc08 Merge "Don't abort fuse connections for virtiofs." am: 09997fe28a am: a6e700b054 am: b99a9e4f21
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1437953

Change-Id: Ia2b11923b952b107c720dbeaca7aabd7facc6bde
2022-01-19 04:48:03 +00:00
Tao Wu
b99a9e4f21 Merge "Don't abort fuse connections for virtiofs." am: 09997fe28a am: a6e700b054
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1437953

Change-Id: Ib1b19a472d1808104c19015265c2137648101b35
2022-01-19 04:31:27 +00:00
Tao Wu
a6e700b054 Merge "Don't abort fuse connections for virtiofs." am: 09997fe28a
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1437953

Change-Id: I25bbea84a3be7d6ae3b74ecfbb076d6520354671
2022-01-19 04:13:37 +00:00
Tao Wu
09997fe28a Merge "Don't abort fuse connections for virtiofs." 2022-01-19 03:57:44 +00:00
Tao Wu
3d98962269 Don't abort fuse connections for virtiofs.
Android should only abort fuse connections for fuse fs. It shouldn't
touch fuse connections for virtiofs.

Bug: 162284193
Test: manual - Restart zygote, no 'Transport endpoint is not connected' error.
Change-Id: Ie3536734531404e98ad1b6594ab3c52e919b22b7
2022-01-18 18:33:52 -08:00
Daeho Jeong
e4de71d689 Merge "Add interfaces required by smart idle maintenance service" am: 6845e06ab9 am: c0c12f5706 am: 73876a2c28 am: 25c4ccbb3b
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1936286

Change-Id: Ib67ad308ec3ebf42df9db1520ff76b2d81c55245
2022-01-13 17:32:25 +00:00
Daeho Jeong
25c4ccbb3b Merge "Add interfaces required by smart idle maintenance service" am: 6845e06ab9 am: c0c12f5706 am: 73876a2c28
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1936286

Change-Id: Ia340061d36de6521795e96e0305f3a7cfe7a1d32
2022-01-13 17:20:04 +00:00
Daeho Jeong
73876a2c28 Merge "Add interfaces required by smart idle maintenance service" am: 6845e06ab9 am: c0c12f5706
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1936286

Change-Id: I3a12512cc122ee472445652518e7454a7fbfb8ef
2022-01-13 17:09:13 +00:00
Daeho Jeong
c0c12f5706 Merge "Add interfaces required by smart idle maintenance service" am: 6845e06ab9
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1936286

Change-Id: Ib432dfc545cc95fc0c0063b84343b3899df259b6
2022-01-13 16:53:25 +00:00
Daeho Jeong
6845e06ab9 Merge "Add interfaces required by smart idle maintenance service" 2022-01-13 16:38:04 +00:00
Daeho Jeong
999fceb07c Add interfaces required by smart idle maintenance service
Added interfaces required by smart idle maintenance service in
StorageManagerService, whose goal is to determine when to trigger
filesystem defragmentation while keeping the best user experience
as long as possible, and avoiding hurting UFS lifetime.

Test: check smart idle maintenance log every hour
Bug: 202283480
Bug: 181079477
Signed-off-by: Daeho Jeong <daehojeong@google.com>
Change-Id: I012cfb9b01e5d21ec71700c3c52ac9c096cd1a90
2022-01-12 10:54:37 -08:00
Treehugger Robot
5c035b40b9 Merge "MetadataCrypt: fix timeout due to missing userdata dm device" am: df2bc1025b am: 1b2cac19c8 am: 28d183be21 am: 53ae3cb110
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1932822

Change-Id: I5198eef84d4de782ccf02e9cf753ec41b5960e54
2021-12-24 01:50:11 +00:00
Treehugger Robot
53ae3cb110 Merge "MetadataCrypt: fix timeout due to missing userdata dm device" am: df2bc1025b am: 1b2cac19c8 am: 28d183be21
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1932822

Change-Id: I5c63dfad6008a066c3fb222f5eb3c19fd32f962c
2021-12-24 01:37:21 +00:00
Treehugger Robot
28d183be21 Merge "MetadataCrypt: fix timeout due to missing userdata dm device" am: df2bc1025b am: 1b2cac19c8
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1932822

Change-Id: I4483bf1f085da11bd8220eee51805a37a911f079
2021-12-24 01:09:34 +00:00
Treehugger Robot
1b2cac19c8 Merge "MetadataCrypt: fix timeout due to missing userdata dm device" am: df2bc1025b
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1932822

Change-Id: I2f5462c5590d26c43135537f083d3af9e54fe307
2021-12-24 00:57:15 +00:00
Treehugger Robot
df2bc1025b Merge "MetadataCrypt: fix timeout due to missing userdata dm device" 2021-12-24 00:42:51 +00:00
Will McVicker
b910e7e325 MetadataCrypt: fix timeout due to missing userdata dm device
We need to load the partition table before we can wait on the userdata
dm device because the kernel (as of [1] doesn't send the KOBJ_ADD uevent
until after the partition table is loaded. The new flow needs to be:

  CreateDevice() -> ioctl(DM_DEV_CREATE)
  LoadTableAndActivate() -> ioctl(DM_TABLE_LOAD)
  WaitForDevice()

This patch updates create_crypto_blk_dev() to first call
LoadTableAndActivate() before WaitForDevice().

[1] https://lore.kernel.org/all/20210804094147.459763-8-hch@lst.de/

Fixes: 156d9d2293 ("Pre-create userdata metadata encryption device.")
Bug: 210737958
Test: manually test booting raven with android13-5.15
Change-Id: Iab2214a62d44ba7e53b57f2cf0f08ac06c77b4fd
2021-12-23 20:36:44 +00:00
Xin Li
bf5a0f7877 [automerger skipped] Merge "Merge Android 12 QPR1" am: 235d1d65f8 -s ours am: 8f933c71e0 -s ours am: 76ff4f2267 -s ours am: dd850f5d4c -s ours
am skip reason: Merged-In Id6edfe90aadae4db1b23c5bc0de4981170ba42f2 with SHA-1 344c737ba0 is already in history

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

Change-Id: If5a40b4b1baaa94a28659032aa3aa5aa303d5ef5
2021-12-14 22:18:41 +00:00
Xin Li
dd850f5d4c [automerger skipped] Merge "Merge Android 12 QPR1" am: 235d1d65f8 -s ours am: 8f933c71e0 -s ours am: 76ff4f2267 -s ours
am skip reason: Merged-In Id6edfe90aadae4db1b23c5bc0de4981170ba42f2 with SHA-1 344c737ba0 is already in history

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

Change-Id: I1c13c602c77eac48d8c77490d6088de1d44a4f0d
2021-12-14 21:50:53 +00:00
Xin Li
76ff4f2267 [automerger skipped] Merge "Merge Android 12 QPR1" am: 235d1d65f8 -s ours am: 8f933c71e0 -s ours
am skip reason: Merged-In Id6edfe90aadae4db1b23c5bc0de4981170ba42f2 with SHA-1 344c737ba0 is already in history

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

Change-Id: Ib3e921b8916d37ff10d7cf9adfd40ab2981d7a10
2021-12-14 21:23:59 +00:00
Xin Li
8f933c71e0 [automerger skipped] Merge "Merge Android 12 QPR1" am: 235d1d65f8 -s ours
am skip reason: Merged-In Id6edfe90aadae4db1b23c5bc0de4981170ba42f2 with SHA-1 344c737ba0 is already in history

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

Change-Id: Ica0e7ec4c9d28da3832d587604d0ff5a097050f2
2021-12-14 21:00:09 +00:00
Xin Li
235d1d65f8 Merge "Merge Android 12 QPR1" 2021-12-14 20:25:23 +00:00
Xin Li
721a879cfe Merge Android 12 QPR1
Bug: 210511427
Merged-In: Id6edfe90aadae4db1b23c5bc0de4981170ba42f2
Change-Id: Ic9e9149ae767b55c33b100586dfcb5790c862bbf
2021-12-14 08:39:19 -08:00
Treehugger Robot
95436f8eb7 Merge "Remove StubVolume disks upon vold reset events" am: e8d0e486a3 am: 344c737ba0 am: 7e3abf6c3e am: c9bb1e5290
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1902674

Change-Id: I9e857de9fd50435df21ffcce7074a7fcb959c98c
2021-12-08 09:27:39 +00:00
Treehugger Robot
c9bb1e5290 Merge "Remove StubVolume disks upon vold reset events" am: e8d0e486a3 am: 344c737ba0 am: 7e3abf6c3e
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1902674

Change-Id: I945518919facfb1aec58f297feaedef816062ecc
2021-12-08 09:08:46 +00:00
Treehugger Robot
7e3abf6c3e Merge "Remove StubVolume disks upon vold reset events" am: e8d0e486a3 am: 344c737ba0
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1902674

Change-Id: I0c076a1a44b605585feeb5781ed87f755ebdcd68
2021-12-08 08:58:01 +00:00
Treehugger Robot
344c737ba0 Merge "Remove StubVolume disks upon vold reset events" am: e8d0e486a3
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1902674

Change-Id: Id6edfe90aadae4db1b23c5bc0de4981170ba42f2
2021-12-08 08:43:32 +00:00
Treehugger Robot
e8d0e486a3 Merge "Remove StubVolume disks upon vold reset events" 2021-12-08 08:25:46 +00:00
Youkichi Hosoi
dfaff1dc15 Remove StubVolume disks upon vold reset events
StubVolumes are managed from outside Android (e.g. from Chrome OS). So,
their disk recreation on vold reset events should also be handled from
outside by 1) listening to reset events, and 2) calling
createStubVolume() for existing StubVolumes on reset events.

Bug: 175281783
Test: m
Test: (Tested in R) Manually induce a vold reset event, and confirm that
Test: 1) vold does not crash, and 2) existing volumes are successfully
Test: mounted again (by calling createStubVolume() for StubVolumes).
Change-Id: I4628eabf809037a547aeef43faedf4dfa57529a6
2021-12-08 09:37:53 +09:00
Treehugger Robot
882773be3f Merge "Depend on Keystore2 AIDL via default" am: b9f8c322c7 am: 64a5600c83 am: 190b5fb47a am: 050a7ed6ec
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1906281

Change-Id: I81f9db78a95dfd5f80cb6de897e3b45698fa5ab4
2021-12-07 19:08:35 +00:00
Treehugger Robot
050a7ed6ec Merge "Depend on Keystore2 AIDL via default" am: b9f8c322c7 am: 64a5600c83 am: 190b5fb47a
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1906281

Change-Id: I3a986fe14e69b6f94f86962574198d6b3dc358da
2021-12-07 18:47:58 +00:00