Commit graph

5270 commits

Author SHA1 Message Date
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
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
Treehugger Robot
2a89e7c577 Merge "Enable dynamic read logs buffer sizing for incfs" 2021-10-28 23:01:58 +00:00
Yurii Zubrytskyi
1d7acfddf7 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
2021-10-28 14:41:48 -07:00
Tianjie Xu
cf88ab9c11 Merge "Delete the checkin directory with the wrong context" am: 2c48d37a29 am: 821e6c7db4 am: ea28c7cdce am: 8081f39fce am: 00f1824b7a
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1866819

Change-Id: I89d197e67eeba6ec86d0926416d36b7af4a059e8
2021-10-25 22:17:23 +00:00
Tianjie Xu
00f1824b7a Merge "Delete the checkin directory with the wrong context" am: 2c48d37a29 am: 821e6c7db4 am: ea28c7cdce am: 8081f39fce
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1866819

Change-Id: I0f35a3db31a6c96f289928dcfdb4596f24a37345
2021-10-25 22:00:39 +00:00
Tianjie Xu
8081f39fce Merge "Delete the checkin directory with the wrong context" am: 2c48d37a29 am: 821e6c7db4 am: ea28c7cdce
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1866819

Change-Id: I8330072d26bff2f406100c66d46bede7fb436aba
2021-10-25 21:42:36 +00:00
Tianjie Xu
ea28c7cdce Merge "Delete the checkin directory with the wrong context" am: 2c48d37a29 am: 821e6c7db4
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1866819

Change-Id: I6ce421b3b41858f94f759821d52973e2047eb1f9
2021-10-25 21:31:10 +00:00
Tianjie Xu
821e6c7db4 Merge "Delete the checkin directory with the wrong context" am: 2c48d37a29
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1866819

Change-Id: Ia1fd614583176ced6135b8dfb4be8760273d9eec
2021-10-25 21:13:23 +00:00
Tianjie Xu
2c48d37a29 Merge "Delete the checkin directory with the wrong context" 2021-10-25 20:57:29 +00:00
Tianjie
b2ee9e0771 Delete the checkin directory with the wrong context
http://aosp/1845900 creates the directory with the wrong permission
and context. And when we attempt to fix it in http://aosp/1860276, the
device would fail to boot if the device is already on the bad build.

As a temporarily fix, already delete that checkin directory in vold. And
we can revert the deletion when the droidfood daily polulation gets out
of the bad state.

Bug: 203742483
Test: Update from TP1A.211016.001 and make sure the boot doesn't fail
Change-Id: Iec74528c1fe0e5876acc601e5cd008f99852d269
2021-10-22 18:28:29 +00:00
Tianjie Xu
edfa6e8ccd Merge "Correct the permission of checkin dir" am: 9696432564 am: 5901afa842 am: e224d0827f am: e4f192efd3 am: da45b66919
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1860276

Change-Id: I3eaf171268e66eeaac0644ac530f471bf961decf
2021-10-19 22:48:16 +00:00
Tianjie Xu
da45b66919 Merge "Correct the permission of checkin dir" am: 9696432564 am: 5901afa842 am: e224d0827f am: e4f192efd3
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1860276

Change-Id: I95933b9dfb86016e666f71af19cc424d126901d1
2021-10-19 22:35:58 +00:00
Tianjie Xu
e4f192efd3 Merge "Correct the permission of checkin dir" am: 9696432564 am: 5901afa842 am: e224d0827f
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1860276

Change-Id: Ib71ffd138764df0a6286f5036d76e0e56278dc66
2021-10-19 22:24:46 +00:00
Tianjie Xu
e224d0827f Merge "Correct the permission of checkin dir" am: 9696432564 am: 5901afa842
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1860276

Change-Id: Iad995d454f8e93d0f43f00ab5c0503908a1b3e0e
2021-10-19 22:07:06 +00:00