Commit graph

6178 commits

Author SHA1 Message Date
Paul Lawrence
9adf86a881 Log reason for fuse-bpf being enabled/disabled
Also don't try to set ro.fuse.bpf.is_running if it's already set.

Bug: 278263648
Ignore-AOSP-First: Feature is in internal
Test: Examine logs with various properties set
Change-Id: I9623a02c7065fa0d0c71c618d448bda0cd2a900e
2023-04-14 21:59:05 +00:00
Paul Lawrence
1603b339e8 Merge "Use kernel sys/fs/fuse/features/fuse_bpf flag to enable fuse_bpf" into udc-dev am: ee0a2bf52e
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/vold/+/22427697

Change-Id: Ie2adf92fe28a1d69017e5444eb1f0af3de4e730f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-12 14:56:41 +00:00
Paul Lawrence
ee0a2bf52e Merge "Use kernel sys/fs/fuse/features/fuse_bpf flag to enable fuse_bpf" into udc-dev 2023-04-12 14:31:27 +00:00
Steven Moreland
82f9d33152 Merge "Explicit init .rc user." am: 6c8b6e1651 am: 0b6dd2c641 am: e9eee2b50e am: 15e9b2f3ad
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2530203

Change-Id: I4d6bd5c3e98e348b5f43c97441b20625ab5cb68c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-12 09:44:55 +00:00
Steven Moreland
15e9b2f3ad Merge "Explicit init .rc user." am: 6c8b6e1651 am: 0b6dd2c641 am: e9eee2b50e
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2530203

Change-Id: Ib45eadd4459b4e07e28737658370e03c314f69fb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-12 03:16:08 +00:00
Steven Moreland
e9eee2b50e Merge "Explicit init .rc user." am: 6c8b6e1651 am: 0b6dd2c641
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2530203

Change-Id: I323939dd2d50c62797603e2dc5c1848c61231bd8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-12 02:44:20 +00:00
Steven Moreland
0b6dd2c641 Merge "Explicit init .rc user." am: 6c8b6e1651
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2530203

Change-Id: I6a4938c8ea0918f8421d92e6d82d6b9d3c5dfeed
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-12 02:12:34 +00:00
Steven Moreland
6c8b6e1651 Merge "Explicit init .rc user." 2023-04-11 21:33:30 +00:00
Steven Moreland
0eff1d2890 Explicit init .rc user.
Set the user explicitly.

Bug: 276813155
Test: boot
Change-Id: I54c14c47a3435d72e00280cf663f23ffbb9659ee
2023-04-10 20:54:26 +00:00
Paul Lawrence
7278162512 Use kernel sys/fs/fuse/features/fuse_bpf flag to enable fuse_bpf
Bug: 262887267
Test: ro.fuse.bpf.is_running is true
Ignore-AOSP-First: This breaks multiple tests because the rest of
fuse_bpf is not in aosp
Change-Id: I3c41c7a0992803a100a1a7eeecd2c5f57e6085fd
2023-04-03 16:55:45 +00:00
Daeho Jeong
0635cf3917 Merge "vold: fix write kbytes handling" am: 13a57d2a26 am: 486c3507fb am: d4680bb584 am: bfb937b068
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2507268

Change-Id: I4dc76496659ca8cc3c773a5ec05ec75bd7d4af04
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-28 22:13:43 +00:00
Daeho Jeong
bfb937b068 Merge "vold: fix write kbytes handling" am: 13a57d2a26 am: 486c3507fb am: d4680bb584
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2507268

Change-Id: I97a52712004285b30340f428f280abe43a0c7a7d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-28 21:29:55 +00:00
Daeho Jeong
d4680bb584 Merge "vold: fix write kbytes handling" am: 13a57d2a26 am: 486c3507fb
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2507268

Change-Id: I697ba818c7399584b81c831eb14a8a4d55be7cee
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-28 21:11:18 +00:00
Daeho Jeong
486c3507fb Merge "vold: fix write kbytes handling" am: 13a57d2a26
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2507268

Change-Id: I0ea8d3eb6fe49612077a23b30a5fce5a7627a871
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-28 20:40:45 +00:00
Daeho Jeong
13a57d2a26 Merge "vold: fix write kbytes handling" 2023-03-28 20:15:53 +00:00
Daeho Jeong
dd08c52eb8 vold: fix write kbytes handling
Since Android platform codespace doesn't support exception handling, we
use strtoll() instead of stoll for direct error handling.

Bug: 274369737
Test: check smart idle maintenace service log
Change-Id: I57c709b1e329228790e0a883edb64dc023135a24
2023-03-27 18:19:18 -07:00
Nathan Huckleberry
2ec6f0acf0 [automerger skipped] Clean up potential busy files after key eviction. am: 759ac5f87c -s ours am: e828c966e3 -s ours am: 99b2289954 -s ours
am skip reason: Merged-In I9e39e5bb0f5190284552bcd252b6213a22a51e91 with SHA-1 a21962b207 is already in history

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

Change-Id: I91b9dd370f3a4be3b3a83431f0ba7bc051e2d94b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-17 01:42:15 +00:00
Nathan Huckleberry
99b2289954 [automerger skipped] Clean up potential busy files after key eviction. am: 759ac5f87c -s ours am: e828c966e3 -s ours
am skip reason: Merged-In I9e39e5bb0f5190284552bcd252b6213a22a51e91 with SHA-1 a21962b207 is already in history

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

Change-Id: Ic60f93e88d4ab638bd88bb595059d9d419307fb5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-17 01:03:12 +00:00
Nathan Huckleberry
e828c966e3 [automerger skipped] Clean up potential busy files after key eviction. am: 759ac5f87c -s ours
am skip reason: Merged-In I9e39e5bb0f5190284552bcd252b6213a22a51e91 with SHA-1 a21962b207 is already in history

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

Change-Id: I16aa0e7cfe276c918affdbddc58e593e2f1c2eeb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-17 00:26:48 +00:00
Pawan Wagh
8d8b3253f1 Merge "Set sehandle in voldFuzzer" am: c1572fe8cf am: b43fe97e5a am: 0d069ca15a am: f15652879e
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2492755

Change-Id: I186ac3842169320eb94516ba8047bfc318c1da82
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-16 10:02:35 +00:00
Pawan Wagh
f15652879e Merge "Set sehandle in voldFuzzer" am: c1572fe8cf am: b43fe97e5a am: 0d069ca15a
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2492755

Change-Id: I489e84ee7c4c2212eb5a810c9d3f18ad37e734af
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-16 09:25:41 +00:00
Pawan Wagh
0d069ca15a Merge "Set sehandle in voldFuzzer" am: c1572fe8cf am: b43fe97e5a
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2492755

Change-Id: Ic386ce0bc09e0b0cafdce9c612a278aff6fccb36
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-16 08:47:39 +00:00
Pawan Wagh
b43fe97e5a Merge "Set sehandle in voldFuzzer" am: c1572fe8cf
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2492755

Change-Id: I60003de6b4df333663c168483acc5d967c16dd84
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-16 08:10:28 +00:00
Pawan Wagh
c1572fe8cf Merge "Set sehandle in voldFuzzer" 2023-03-16 07:28:40 +00:00
Pawan Wagh
25effc38ff Set sehandle in voldFuzzer
Bug: 271649747
Test: m vold_native_service_fuzzer && adb sync && adb shell data/fuzz/x86_64/vold_native_service_fuzzer/vold_native_service_fuzzer
Change-Id: I55a17ffd631b0b85e2fc049bffe9a91623699e64
2023-03-15 20:54:42 +00:00
Eric Biggers
6bcbb52536 Merge "Avoid error message when destroying key w/o secdiscardable file" am: dc262c27f0 am: 60c71b9950 am: 2ef1832ac4 am: 10f3d7ec32
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2470460

Change-Id: I21d1b7408545e709fc492773bf093227373feaaf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-04 08:31:02 +00:00
Eric Biggers
10f3d7ec32 Merge "Avoid error message when destroying key w/o secdiscardable file" am: dc262c27f0 am: 60c71b9950 am: 2ef1832ac4
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2470460

Change-Id: I9a0edebc0100cd56077e95ff5adb3f40d7b5129f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-04 07:49:59 +00:00
Eric Biggers
2ef1832ac4 Merge "Avoid error message when destroying key w/o secdiscardable file" am: dc262c27f0 am: 60c71b9950
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2470460

Change-Id: I3c1ccbf5a48de8281db1244471f40831e32decbe
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-04 07:16:23 +00:00
Eric Biggers
60c71b9950 Merge "Avoid error message when destroying key w/o secdiscardable file" am: dc262c27f0
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2470460

Change-Id: I0259a28cc469a98149512f258751771f09112fda
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-04 06:30:21 +00:00
Eric Biggers
dc262c27f0 Merge "Avoid error message when destroying key w/o secdiscardable file" 2023-03-03 22:14:58 +00:00
Eric Biggers
73e2936fc2 Avoid error message when destroying key w/o secdiscardable file
Since commit 08f4bdfe98 ("Don't use a secdiscardable file for keys
encrypted by SP") (https://r.android.com/2242561), some keys don't use a
secdiscardable file.  Currently if such a key is destroyed, an ERROR
message like the following is logged:

    E secdiscard: Secure discard open failed for: /data/misc/vold/user_keys/ce/14/current/secdiscardable

This case is expected, so it should not be an ERROR.  Fix this by only
passing the secdiscardable file to the secdiscard program if it exists.

Bug: 232452368
Change-Id: I490289dfdaf0db6c3f4fb507509095e0033e2f69
2023-03-03 19:51:36 +00:00
Eric Biggers
53b0fcc994 Merge "Check for SELinux labelling errors" am: 826eef6b33 am: 0c7abb02e5 am: 44d3181bc5 am: 13c2e12a5a
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2465051

Change-Id: I3fd4f932a08debd717026026d9b23a2cae88b8f5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-03 01:23:47 +00:00
Eric Biggers
13c2e12a5a Merge "Check for SELinux labelling errors" am: 826eef6b33 am: 0c7abb02e5 am: 44d3181bc5
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2465051

Change-Id: Ie71dab9cd4818e1ab7d37c5442b451776451b328
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-02 20:27:49 +00:00
Eric Biggers
44d3181bc5 Merge "Check for SELinux labelling errors" am: 826eef6b33 am: 0c7abb02e5
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2465051

Change-Id: I25c3b804e4e4814a357d8428231c42a33a5f01d8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-02 19:49:30 +00:00
Eric Biggers
0c7abb02e5 Merge "Check for SELinux labelling errors" am: 826eef6b33
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2465051

Change-Id: I55ae26d92455278fb9e687571392083c5859e4d9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-02 19:14:42 +00:00
Eric Biggers
826eef6b33 Merge "Check for SELinux labelling errors" 2023-03-02 18:35:16 +00:00
Eric Biggers
c7c4f5a902 Check for SELinux labelling errors
It's essential that files created by vold get the correct SELinux
labels, so make sure to check for errors when setting them.

ENOENT (no label defined) is expected on some files such as
/mnt/appfuse/*, so allow ENOENT but log a DEBUG message.

This will help debug b/269567270.  This is not a fix for b/269567270.

Bug: 269567270
Test: Created user and checked SELinux labels of user's directories
Test: atest CtsBlobStoreHostTestCases
Change-Id: Ife005bdd896952653943c57336deb33456f7c5d8
2023-03-01 22:11:29 +00:00
Austin Delgado
bd79cf1cb0 Merge "Revert "Strictly check for SELinux labelling errors"" am: 545f0ab758 am: 9a4265cc20 am: edb3220e2b am: 6ed3654033
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2461593

Change-Id: Id992e07388777ffb57ff0197b6d41db60e0f96a1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-01 01:12:27 +00:00
Austin Delgado
6ed3654033 Merge "Revert "Strictly check for SELinux labelling errors"" am: 545f0ab758 am: 9a4265cc20 am: edb3220e2b
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2461593

Change-Id: I9839fde4983f0ef66e5da75f9ad26537765b4773
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-01 00:19:37 +00:00
Austin Delgado
edb3220e2b Merge "Revert "Strictly check for SELinux labelling errors"" am: 545f0ab758 am: 9a4265cc20
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2461593

Change-Id: Ia7bd2386936b722f2c4effa3f2615caa11918353
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-28 23:41:28 +00:00
Austin Delgado
9a4265cc20 Merge "Revert "Strictly check for SELinux labelling errors"" am: 545f0ab758
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2461593

Change-Id: Id02634939a86d6fb05b8a2762c4a6cb161ed7476
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-28 22:44:36 +00:00
Eric Biggers
f9ea98a1ba Merge "Strictly check for SELinux labelling errors" am: 5554b80afb am: d8bf3b2681 am: 2df74f43c0 am: f65f63a29c
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2456274

Change-Id: Ib712102acd25edfbcf9e66784a57cc8eb2646cf5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-28 22:27:00 +00:00
Austin Delgado
545f0ab758 Merge "Revert "Strictly check for SELinux labelling errors"" 2023-02-28 22:05:45 +00:00
Austin Delgado
b0f997deae Revert "Strictly check for SELinux labelling errors"
This reverts commit 2ef4e85448.

Reason for revert: b/271157681

Change-Id: I7224fd68027e2e9824694171547b8b2c808f9923
2023-02-28 21:58:08 +00:00
Eric Biggers
f65f63a29c Merge "Strictly check for SELinux labelling errors" am: 5554b80afb am: d8bf3b2681 am: 2df74f43c0
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2456274

Change-Id: I0d2c7197660c0a3b1428c5ebe6904fd4db7f1a61
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-28 21:46:35 +00:00
Eric Biggers
2df74f43c0 Merge "Strictly check for SELinux labelling errors" am: 5554b80afb am: d8bf3b2681
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2456274

Change-Id: Iaac9bc0c82a43a4808cec59867320ff6084cff67
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-28 21:03:43 +00:00
Eric Biggers
d8bf3b2681 Merge "Strictly check for SELinux labelling errors" am: 5554b80afb
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2456274

Change-Id: I7c4ab5c3fdfbda22b24a8875915f3acfef1b8003
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-28 20:25:42 +00:00
Eric Biggers
5554b80afb Merge "Strictly check for SELinux labelling errors" 2023-02-28 19:31:24 +00:00
Nathan Huckleberry
759ac5f87c Clean up potential busy files after key eviction.
There is a race condition between key eviction and killing user
processes.  The race condition is difficult to properly fix without
significantly degrading UI performance.

If the race condition occurs, decrypted filesystem data is left in
various kernel caches.  To mitigate, we try to ensure the caches are
flushed by evicting the keys again in a worker thread.

Test: Checked that the correct log messages appear when evicting a
user's keys
Bug: 140762419

Change-Id: I9e39e5bb0f5190284552bcd252b6213a22a51e91
(cherry picked from commit a21962b207)
Merged-In: I9e39e5bb0f5190284552bcd252b6213a22a51e91
2023-02-28 18:47:56 +00:00
Eric Biggers
2ef4e85448 Strictly check for SELinux labelling errors
It's essential that files created by vold get the correct SELinux
labels, so make sure to check for errors when setting them.

This will help debug b/269567270.  This is not a fix for b/269567270.

Bug: 269567270
Test: Created user and checked SELinux labels of user's directories
Change-Id: I99e4d530a00f9401532c9cb0990df254b7a12a80
2023-02-27 21:01:25 +00:00