Commit graph

5143 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
Tianjie Xu
5901afa842 Merge "Correct the permission of checkin dir" am: 9696432564
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1860276

Change-Id: I114df75669af98d88e71189f60fce2cb1ec3db00
2021-10-19 21:55:26 +00:00
Tianjie Xu
9696432564 Merge "Correct the permission of checkin dir" 2021-10-19 21:37:52 +00:00
Keith Mok
442361140d vold: Reboot if vold failure
Vold stores some status in memory.
If vold crashed and restarted, those status are not
restored. Reboot device if vold on failure.

Bug: 202048432
Test: manually kill vold
Merged-In: Ic56acd9cc906b0166adf805023e34bbd6b3648a5
Change-Id: Ic56acd9cc906b0166adf805023e34bbd6b3648a5
2021-10-18 18:53:30 +00:00
Tianjie
62487c92ba Correct the permission of checkin dir
Gmscore runs in cache group, so set the own:group of the checkin
directory to system:cache to align with other use cases. Because we
want proper user separation when accessing the dir, also provide
user id to set the correct selinux mls_level.

Bug: 197636740
Test: check selinux label, make sure checkin can access the directory.
Change-Id: Id47a2a30a2f37c204ef72a81ac2aebe4ee3a37b0
2021-10-16 13:24:01 -07:00
Keith Mok
d5371be2d4 Merge "vold: Reboot if vold failure" am: 319f778edc am: 05562f4a93 am: 9a6022acac am: 7042fb94cb
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1846798

Change-Id: I0d8b593211aef36d826dcdf99e0f81b9a8dc6ff9
2021-10-16 07:40:16 +00:00
Keith Mok
7042fb94cb Merge "vold: Reboot if vold failure" am: 319f778edc am: 05562f4a93 am: 9a6022acac
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1846798

Change-Id: Idf48a6fe8182ff9289b3b9509aaae8b383367210
2021-10-16 07:24:29 +00:00
Keith Mok
9a6022acac Merge "vold: Reboot if vold failure" am: 319f778edc am: 05562f4a93
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1846798

Change-Id: I1cf471b22e149b4a43c43fbc4671dfde51109814
2021-10-16 07:10:20 +00:00
Keith Mok
05562f4a93 Merge "vold: Reboot if vold failure" am: 319f778edc
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1846798

Change-Id: I02f07af8e5e82a2318614b5fc1b70727db967973
2021-10-16 06:54:27 +00:00
Keith Mok
319f778edc Merge "vold: Reboot if vold failure" 2021-10-16 06:39:29 +00:00
Tianjie Xu
061ea29035 Merge "Create the checkin subdirectory under misc_ce" am: 45d04fb4a2 am: 0cc0755bf7 am: a77f71630f am: ab2920ddb1
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1845900

Change-Id: I4b2ce961f6f9f5e743dd71eefd0d2f4bbe2aa809
2021-10-15 22:19:24 +00:00
Tianjie Xu
ab2920ddb1 Merge "Create the checkin subdirectory under misc_ce" am: 45d04fb4a2 am: 0cc0755bf7 am: a77f71630f
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1845900

Change-Id: I19235c483c94300045e484f90e9f6021b71e5a52
2021-10-15 22:02:46 +00:00
Tianjie Xu
a77f71630f Merge "Create the checkin subdirectory under misc_ce" am: 45d04fb4a2 am: 0cc0755bf7
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1845900

Change-Id: I5ed1105c556c50d73ad22beae2db82e7dc3aa371
2021-10-15 21:51:11 +00:00
Tianjie Xu
0cc0755bf7 Merge "Create the checkin subdirectory under misc_ce" am: 45d04fb4a2
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1845900

Change-Id: Ibd90bc3f7b20eac8dec03067fdbb1c64ac6225d5
2021-10-15 21:33:13 +00:00
Tianjie Xu
45d04fb4a2 Merge "Create the checkin subdirectory under misc_ce" 2021-10-15 21:19:26 +00:00
Keun-young Park
8ebe4cb6d6 Merge "Fix vold dump" am: bba0592dce am: 22b0c0fca0 am: d9f2335ab7 am: 64ce88543b
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1856933

Change-Id: I8f5108e4e46f5657e24523c5346dbab175d9e5e8
2021-10-14 22:08:39 +00:00
Keun-young Park
64ce88543b Merge "Fix vold dump" am: bba0592dce am: 22b0c0fca0 am: d9f2335ab7
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1856933

Change-Id: I1807a992b19e8f8fffd7425a5cc390e358b7c0d8
2021-10-14 22:01:15 +00:00
Keun-young Park
d9f2335ab7 Merge "Fix vold dump" am: bba0592dce am: 22b0c0fca0
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1856933

Change-Id: I0a3dd874fd00d7b35a47ed1067836b597f5961ca
2021-10-14 21:49:05 +00:00
Keun-young Park
22b0c0fca0 Merge "Fix vold dump" am: bba0592dce
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1856933

Change-Id: I6f6b0d3a00dd9d27ec47f7f06a44c463df3b9d0b
2021-10-14 21:39:10 +00:00
Keun-young Park
bba0592dce Merge "Fix vold dump" 2021-10-14 21:19:30 +00:00
Keun young Park
0bccae2070 Fix vold dump
- Original code of re-opening /proc/self/fd/fd does not work
  due to selinux violation.
- fd (=pipe) passed over binder should be used as it is.

Bug: 202999256
Test: $ adb shell su root dumpsys vold
Change-Id: I1fceba89f1b07228e1677c266f87e431e93f7cb5
2021-10-13 16:50:10 -07:00
Xin Li
663b2c7cb2 [automerger skipped] Merge "Merge Android 12" am: 97e69c9529 -s ours am: ad3c475452 -s ours am: 20bdf84535 -s ours am: b6c257d37f -s ours
am skip reason: Merged-In I9d1b60b1bddeade81238cc971d38a5de76f748d5 with SHA-1 af91a5ec2d is already in history

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

Change-Id: Ifc9d23b7169673fbe861f25d02483bbceaf55d4b
2021-10-08 08:29:42 +00:00
Xin Li
b6c257d37f [automerger skipped] Merge "Merge Android 12" am: 97e69c9529 -s ours am: ad3c475452 -s ours am: 20bdf84535 -s ours
am skip reason: Merged-In I9d1b60b1bddeade81238cc971d38a5de76f748d5 with SHA-1 af91a5ec2d is already in history

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

Change-Id: I026ad515c20a042f87d3ce580c28745e68c0f939
2021-10-08 07:56:44 +00:00
Xin Li
20bdf84535 [automerger skipped] Merge "Merge Android 12" am: 97e69c9529 -s ours am: ad3c475452 -s ours
am skip reason: Merged-In I9d1b60b1bddeade81238cc971d38a5de76f748d5 with SHA-1 af91a5ec2d is already in history

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

Change-Id: Iad7911fc440b61df02311913865e49f6eb56de34
2021-10-08 01:39:29 +00:00