Commit graph

5485 commits

Author SHA1 Message Date
Eric Biggers
56e5978547 Merge "Allow IV_INO_LBLK_32 with virtio storage" am: 660f052858
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1899590

Change-Id: Iada10c8ad80a70a039354e8321153c0cad4bd785
2021-11-23 19:10:20 +00:00
Eric Biggers
660f052858 Merge "Allow IV_INO_LBLK_32 with virtio storage" 2021-11-23 18:48:11 +00:00
Eric Biggers
f9c6dfa8fd Allow IV_INO_LBLK_32 with virtio storage
This has to be allowed as a workaround until there is a way for
userspace to check the maximum DUN size directly.

Bug: 207390665
Change-Id: Id5e51720ca963fe80e65dbae1965f777b3cd2ee4
2021-11-22 11:33:39 -08:00
Xin Li
cb6a8c23ba [automerger skipped] Merge "Merge sc-qpr1-dev-plus-aosp-without-vendor@7810918" into stage-aosp-master am: d756848928 -s ours am: 0c981040de -s ours am: 1acd8a9306 -s ours
am skip reason: Merged-In I026ad515c20a042f87d3ce580c28745e68c0f939 with SHA-1 b6c257d37f is already in history

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

Change-Id: Ia1dd70c8964ac2cf003f181567c7eebcdadd9744
2021-11-18 22:37:50 +00:00
Xin Li
1acd8a9306 [automerger skipped] Merge "Merge sc-qpr1-dev-plus-aosp-without-vendor@7810918" into stage-aosp-master am: d756848928 -s ours am: 0c981040de -s ours
am skip reason: Merged-In I026ad515c20a042f87d3ce580c28745e68c0f939 with SHA-1 b6c257d37f is already in history

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

Change-Id: I19e0995b13822cae094a9c4b75ccf6d6a5953526
2021-11-18 22:25:11 +00:00
Xin Li
0c981040de [automerger skipped] Merge "Merge sc-qpr1-dev-plus-aosp-without-vendor@7810918" into stage-aosp-master am: d756848928 -s ours
am skip reason: Merged-In I026ad515c20a042f87d3ce580c28745e68c0f939 with SHA-1 b6c257d37f is already in history

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

Change-Id: I789da306f7ef9dd5f9323d89887bc398ad1fbe74
2021-11-18 22:00:54 +00:00
Xin Li
d756848928 Merge "Merge sc-qpr1-dev-plus-aosp-without-vendor@7810918" into stage-aosp-master 2021-11-18 21:29:02 +00:00
Paul Lawrence
5defbf9607 Add dependency for vold on fuse_media.o
Ensure fuse_media gets included in every build

Bug: 202785178
Test: /system/etc/bpf/fuse_media.o is present

Change-Id: Ic9f88a1905eca66f67b94ce75a04b9b26b6ca7ca
2021-11-16 19:49:44 +00:00
Youkichi Hosoi
4461c5a176 Split MOUNT_FLAG_VISIBLE into MOUNT_FLAG_VISIBLE_FOR_{READ, WRITE}
IVold.MOUNT_FLAG_VISIBLE is split into MOUNT_FLAG_VISIBLE_FOR_READ and
MOUNT_FLAG_VISIBLE_FOR_WRITE.
Accordingly, VolumeBase::MountFlags::kVisible is split into
kVisibleForRead and kVisibleForWrite.

Bug: 206019156
Test: m
Ignore-AOSP-First: Cherry-pick to AOSP later to avoid merge conflicts.
Change-Id: Ia55673400d9f713f221650e1335a46ba11f6f027
2021-11-15 21:51:05 +09:00
Keith Mok
238f515db0 [automerger skipped] Merge "vold: Reboot if vold failure" into sc-v2-dev am: 1d49ec7aab -s ours am: 356b107b73 -s ours
am skip reason: Merged-In Ic56acd9cc906b0166adf805023e34bbd6b3648a5 with SHA-1 c73dbac02d is already in history

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

Change-Id: If5f94f5c2a4f559fc260ee36be3d07dfd47b8c64
2021-11-12 23:13:59 +00:00
Keith Mok
356b107b73 [automerger skipped] Merge "vold: Reboot if vold failure" into sc-v2-dev am: 1d49ec7aab -s ours
am skip reason: Merged-In Ic56acd9cc906b0166adf805023e34bbd6b3648a5 with SHA-1 c73dbac02d is already in history

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

Change-Id: I9655fc85e5f27503ac1c9c6fb1b9c2857b96e2b8
2021-11-12 23:01:53 +00:00
Keith Mok
1d49ec7aab Merge "vold: Reboot if vold failure" into sc-v2-dev 2021-11-12 22:48:55 +00:00
Eric Biggers
5a3d4adfcc Merge changes Icdff584e,I71fd98e6,If1e9e3ad,I05bc4dc9 am: 017e95fa6a am: 078a507c43 am: 54dd37692a am: 01f990fa47
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1887522

Change-Id: Ife52b7398e5ea97afdcf009634f7bcf48b680ab2
2021-11-11 22:32:06 +00:00
Eric Biggers
01f990fa47 Merge changes Icdff584e,I71fd98e6,If1e9e3ad,I05bc4dc9 am: 017e95fa6a am: 078a507c43 am: 54dd37692a
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1887522

Change-Id: I6fbf578a3572365b31b70b336242884317e616f9
2021-11-11 22:13:55 +00:00
Eric Biggers
54dd37692a Merge changes Icdff584e,I71fd98e6,If1e9e3ad,I05bc4dc9 am: 017e95fa6a am: 078a507c43
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1887522

Change-Id: I6e2144b19a38d838595729b932d7bd3a9110b87e
2021-11-11 21:49:56 +00:00
Eric Biggers
078a507c43 Merge changes Icdff584e,I71fd98e6,If1e9e3ad,I05bc4dc9 am: 017e95fa6a
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1887522

Change-Id: If1d52fea241fa0732f4e1964f616a6e0c57b7303
2021-11-11 21:38:43 +00:00
Eric Biggers
017e95fa6a Merge changes Icdff584e,I71fd98e6,If1e9e3ad,I05bc4dc9
* changes:
  Remove vdc.rc
  Remove IgnoreEarlyBootEnded()
  Remove CRYPT_FOOTER_OFFSET
  Remove scrypt-related code
2021-11-11 21:21:32 +00:00
Eric Biggers
d89e239c56 Remove vdc.rc
Now that FDE is no longer supported, the "defaultcrypto" and "encrypt"
events are never triggered.  Therefore, the actions in vdc.rc aren't
needed anymore.

Bug: 191796797
Change-Id: Icdff584ec664b3e038f0accdc826437d261fed51
2021-11-10 14:03:48 -08:00
Eric Biggers
72ca0cf3f9 Remove IgnoreEarlyBootEnded()
Now that FDE is no longer supported, this is no longer needed.

Bug: 191796797
Change-Id: I71fd98e66fd0998b78b8d56507cc62e1a112263a
2021-11-10 14:03:48 -08:00
Eric Biggers
230d664e08 Remove CRYPT_FOOTER_OFFSET
This is no longer used.

Bug: 191796797
Change-Id: If1e9e3ad255714c37a8c1f292823f181eab7a1ce
2021-11-10 14:03:48 -08:00
Eric Biggers
7c111e4529 Remove scrypt-related code
This is no longer used.

Bug: 191796797
Change-Id: I05bc4dc9c25c050ace49606981c4f4db3d76f401
2021-11-10 13:27:53 -08:00
Eric Biggers
84cde7b517 Merge "Remove most of FDE support" am: a70c666688 am: 650828aabf am: d7a58896a2 am: d2769a436c am: 655f36ee0f
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1875760

Change-Id: Ieab1834ac3c9967acc62662f5ead4dcdc12bbe8f
2021-11-10 20:40:47 +00:00
Eric Biggers
655f36ee0f Merge "Remove most of FDE support" am: a70c666688 am: 650828aabf am: d7a58896a2 am: d2769a436c
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1875760

Change-Id: I0d1fb1b5a01a7c2a5a15a7ebb3b98425756203fd
2021-11-10 20:17:17 +00:00
Eric Biggers
d2769a436c Merge "Remove most of FDE support" am: a70c666688 am: 650828aabf am: d7a58896a2
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1875760

Change-Id: Id5d3cb85951ae5b2bceca4e586897303d9c2344f
2021-11-10 19:41:09 +00:00
Eric Biggers
d7a58896a2 Merge "Remove most of FDE support" am: a70c666688 am: 650828aabf
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1875760

Change-Id: Ife0a24bbeac6305c03f599230dc77d604e8ee8b7
2021-11-10 19:23:28 +00:00
Eric Biggers
650828aabf Merge "Remove most of FDE support" am: a70c666688
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1875760

Change-Id: I1d28b3ea12b7b132d2680decbd35ab80920e3634
2021-11-10 19:10:41 +00:00
Eric Biggers
a70c666688 Merge "Remove most of FDE support" 2021-11-10 19:05:05 +00:00
Xin Li
06517b71b6 Merge sc-qpr1-dev-plus-aosp-without-vendor@7810918
Bug: 205056467
Merged-In: I026ad515c20a042f87d3ce580c28745e68c0f939
Change-Id: I8dc9a2c27a483de8845db7c6e1f60ab37f29d27e
2021-11-10 08:06:30 +00:00
Eric Biggers
0803ba0985 Remove most of FDE support
Since Android 10, new devices have been required to use FBE instead of
FDE.  Therefore, the FDE code is no longer needed.

Remove most of cryptfs.cpp.  A few parts of it need to be kept in order
to support the dm-crypt method of adoptable storage encryption.

Keep the FDE-specific binder methods stubbed out for now until their
callers can be removed.

Bug: 191796797
Change-Id: I90b1e4cacd2f3e5cce77a82a0af744fcc7da9400
2021-11-09 16:09:33 -08:00
David Anderson
218bfdb47a Merge changes Ia095340c,I464edc6e am: 3d1a532efc am: 57ca48b788 am: af6552a833 am: 3a4423eec6 am: d0646fc9d9
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1883358

Change-Id: I18b24e66f4f386599a5f17b7477bf95ca33837b6
2021-11-09 00:23:16 +00:00
David Anderson
d0646fc9d9 Merge changes Ia095340c,I464edc6e am: 3d1a532efc am: 57ca48b788 am: af6552a833 am: 3a4423eec6
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1883358

Change-Id: I2538398321b13f8ef1b729b2f9b71d4e080798db
2021-11-09 00:07:22 +00:00
David Anderson
3a4423eec6 Merge changes Ia095340c,I464edc6e am: 3d1a532efc am: 57ca48b788 am: af6552a833
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1883358

Change-Id: I61b0045fe5324b497fc5b7c76568c396e2486def
2021-11-08 23:50:38 +00:00
David Anderson
af6552a833 Merge changes Ia095340c,I464edc6e am: 3d1a532efc am: 57ca48b788
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1883358

Change-Id: I34e28f326ac91743e1d752e4aed7172c4c76aa7e
2021-11-08 23:31:20 +00:00
David Anderson
57ca48b788 Merge changes Ia095340c,I464edc6e am: 3d1a532efc
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1883358

Change-Id: If66258821cd75f3ac755f89eb6aa0b69321fdf48
2021-11-08 23:09:38 +00:00
David Anderson
3d1a532efc Merge changes Ia095340c,I464edc6e
* changes:
  Route error logs to the kernel during early boot.
  Improve vold logging.
2021-11-08 22:46:35 +00:00
David Anderson
52de78e97b Route error logs to the kernel during early boot.
This is needed to debug vold mounting errors before adb is up. It also
helps diagnose failures on devices that store dmesg persistently.

Tested by adding an error log with serial attached.

Bug: 205314634
Test: manual test
Change-Id: Ia095340c562e3f1f94bc44c5d13ad466a7a35345
2021-11-08 13:22:54 -08:00
David Anderson
e179157dc5 Improve vold logging.
This patch adds more error logging to mountFstab. In a few cases, the
were error paths with no existing error logs. In other cases, the log
messages are there to help understand error flow in logs (for example
when a function with lots of error paths returns false).

Bug: 205314634
Test: treehugger builds
Change-Id: I464edc6e74ea0d7419ee9d9b75fd238752c13f4f
2021-11-08 13:22:53 -08:00
Yurii Zubrytskyi
3819f95fc7 [automerger skipped] Merge "[vold] Check incremental paths before mounting" into sc-v2-dev am: e0f8956247 am: b648eb229e -s ours
am skip reason: Merged-In I6035447f94ef44c4ae3294c3ae47de2d7210683a with SHA-1 090ae07bc2 is already in history

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

Change-Id: Iff67751afa7915c523c308974e43f7cb295a73ac
2021-11-03 19:36:31 +00:00
Yurii Zubrytskyi
b648eb229e Merge "[vold] Check incremental paths before mounting" into sc-v2-dev am: e0f8956247
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/vold/+/16177336

Change-Id: Ibe525fcda2d7ca0daac86c7d4cfde9deb55c6041
2021-11-03 19:12:44 +00:00
Yurii Zubrytskyi
e0f8956247 Merge "[vold] Check incremental paths before mounting" into sc-v2-dev 2021-11-03 18:59:09 +00:00
Yurii Zubrytskyi
11d0056600 [automerger skipped] Enable dynamic read logs buffer sizing for incfs am: 2fcde4e378 -s ours am: f282eec809 -s ours
am skip reason: Merged-In I0ea46c1ad2534b1dbb5faaead52afab88b66747b with SHA-1 1d7acfddf7 is already in history

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

Change-Id: I105ec927e195798e790d3198914a341ea9dc8c10
2021-11-02 23:02:41 +00:00
Yurii Zubrytskyi
f282eec809 [automerger skipped] Enable dynamic read logs buffer sizing for incfs am: 2fcde4e378 -s ours
am skip reason: Merged-In I0ea46c1ad2534b1dbb5faaead52afab88b66747b with SHA-1 1d7acfddf7 is already in history

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

Change-Id: I3dae32f22f94f53b837d9f99b09cd926e12b018c
2021-11-02 22:45:22 +00:00
Yurii Zubrytskyi
40389820e2 [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

Ignore-AOSP-First: security fix
Bug: 198657657
Test: manual
Change-Id: I6035447f94ef44c4ae3294c3ae47de2d7210683a
Merged-In: I6035447f94ef44c4ae3294c3ae47de2d7210683a
2021-11-02 21:46:31 +00:00
Yurii Zubrytskyi
090ae07bc2 [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

Ignore-AOSP-First: security fix
Bug: 198657657
Test: manual
Change-Id: I6035447f94ef44c4ae3294c3ae47de2d7210683a
2021-11-02 11:20:39 -07:00
Yurii Zubrytskyi
2fcde4e378 Enable dynamic read logs buffer sizing for incfs
Default buffer size of 4 pages causes many missed log records
because of ring buffer overflows. This change adds a dynamic
sizing, up to 32 pages, that has shown to decrease dropped
records pretty much to nil

Fallback code automatically decreases the buffer size in case
of kernel memory fragmentation - some logs are still much
better than no logs at all

Bug: 203551890
Test: manual, adb install <Apk>; checked for fallback by
  increasing max size to 1024 pages
Change-Id: I0ea46c1ad2534b1dbb5faaead52afab88b66747b
Merged-In: I0ea46c1ad2534b1dbb5faaead52afab88b66747b
2021-10-29 13:37:52 -07:00
Treehugger Robot
40a76662ae Merge "Enable dynamic read logs buffer sizing for incfs" am: 2a89e7c577 am: 7a65ee339b am: 6185ed675d am: 7815d53936 am: f57d973efb
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1874527

Change-Id: Id5c2a28f39be300b11b0751eb4f55e8068495f63
2021-10-29 00:17:31 +00:00
Treehugger Robot
f57d973efb Merge "Enable dynamic read logs buffer sizing for incfs" am: 2a89e7c577 am: 7a65ee339b am: 6185ed675d am: 7815d53936
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1874527

Change-Id: If9d53a948d5a1214eec1dc2d2a70c27f95275abf
2021-10-29 00:03:43 +00:00
Treehugger Robot
7815d53936 Merge "Enable dynamic read logs buffer sizing for incfs" am: 2a89e7c577 am: 7a65ee339b am: 6185ed675d
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1874527

Change-Id: I73c4db939921142e060d035c9dd0f183407ba81c
2021-10-28 23:48:00 +00:00
Treehugger Robot
6185ed675d Merge "Enable dynamic read logs buffer sizing for incfs" am: 2a89e7c577 am: 7a65ee339b
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1874527

Change-Id: I31d088cde96870d12ab004a70a79c99769374b20
2021-10-28 23:30:37 +00:00
Treehugger Robot
7a65ee339b Merge "Enable dynamic read logs buffer sizing for incfs" am: 2a89e7c577
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1874527

Change-Id: I7587da946ceae55021235814444eef04f315516e
2021-10-28 23:17:45 +00:00