Commit graph

1717 commits

Author SHA1 Message Date
TreeHugger Robot
53deec14b8 Merge "Add noatime to vfat and exfat" into oc-mr1-dev 2017-08-04 04:24:57 +00:00
Keun-young Park
612270b598 do not sleep if it is shutting down
am: 375ac25773

Change-Id: I576040b0068c27b9c7abd880e390841ce80f9906
2017-08-03 18:24:04 +00:00
Keun-young Park
375ac25773 do not sleep if it is shutting down
- Various sleep(5) for vold shutdown can increase shutdown time a lot.
- If it is shutting down, do not sleep at all. init will take care of
  active partitions if not unmounted.

bug: 64143519
Test: reboot and check logs from vold, check if "ShutdownThread: Shutdown wait timed out" happens.
Change-Id: I7cb91427ad2205fe23a054d255caf7ffdfd9f6c3
2017-08-02 17:45:48 -07:00
Ravisankar Reddy
4cc6baf616 Add noatime to vfat and exfat
testNoAtime is new cts testcase, which verifies all writable
block filesystems are mounted "noatime" toavoid unnecessary
flash churn. So add noatime for vfat.

Bug: 64137815
Test: run cts -m m CtsOsTestCases -t android.os.cts.EnvironmentTest#testNoAtime
Change-Id: I4f42b54ed0d66e09964351da26d0d3bf38d573d6
2017-07-31 18:12:30 +08:00
Pavel Grafov
b350ed02d5 Drop inode and page caches after evicting CE key.
Bug: 63257991
Test: Turning work profile off and attempting to read profile files.
Change-Id: I36f8ae9a8894f88950f50aed4a06645fab7e998b
2017-07-27 17:45:42 +01:00
Jeff Sharkey
95a92f9203 Only enable quotas when supported by device.
Otherwise we might end up creating ext4 partitions that the device
can't mount.

Bug: 63763609
Test: builds, boots
Exempt-From-Owner-Approval: Bug 63673347
Change-Id: I5f6cf73f23a55bc0dea9480523f19049313c3dd1
2017-07-17 13:58:45 -06:00
TreeHugger Robot
51f174f0c9 Merge "Check if sdcard daemon exited." 2017-07-13 21:05:07 +00:00
Junichi Uekawa
60fb60616c Merge "Try SO_RCVBUF before SO_RCVBUFFORCE." am: 3f8fa0c215 am: dfcc7dbad0 am: 602a2ce0e0
am: 189527f13f

Change-Id: Ie4cdfd04c1acf48c802b233eb34b2417c859ae04
2017-07-13 20:45:56 +00:00
Junichi Uekawa
189527f13f Merge "Try SO_RCVBUF before SO_RCVBUFFORCE." am: 3f8fa0c215 am: dfcc7dbad0
am: 602a2ce0e0

Change-Id: I4d4946552edb444f4a3a7ea333f272a7408ec260
2017-07-13 20:37:17 +00:00
Junichi Uekawa
602a2ce0e0 Merge "Try SO_RCVBUF before SO_RCVBUFFORCE." am: 3f8fa0c215
am: dfcc7dbad0

Change-Id: I742ebc5174d809fa6f70324659f6e03798710679
2017-07-13 20:34:46 +00:00
Junichi Uekawa
dfcc7dbad0 Merge "Try SO_RCVBUF before SO_RCVBUFFORCE."
am: 3f8fa0c215

Change-Id: I5df611cfaa1c4451f4d0cd576f3b82f2fefbea6b
2017-07-13 20:32:18 +00:00
Treehugger Robot
3f8fa0c215 Merge "Try SO_RCVBUF before SO_RCVBUFFORCE." 2017-07-13 20:21:49 +00:00
Daniel Rosenberg
1d79d1014e Check if sdcard daemon exited.
If the system is using sdcardfs, the sdcard daemon exits after mounting.
If it's using FUSE, the sdcard daemon runs until we go to unmount.

Bug: 37638548
Test: Run "adb shell ps | grep -w Z" with sdcardfs enabled.
      The sdcard daemon should not be listed.
      Run again with sdcardfs disabled. The daemon should be
      running, and vold should not be stuck waiting on it.
Change-Id: I930d22b35194ec99e7a6a4a022a04d36f4f39a34
2017-07-11 18:09:15 -07:00
Junichi Uekawa
c865adaa3b Try SO_RCVBUF before SO_RCVBUFFORCE.
When running in a container, the process might be in a user/net
namespace, which would cause setting the SO_RCVBUFFORCE socket option to
fail with EPERM. But rmem_max is set to a high enough value which allows
SO_RCVBUF to succeed.

Bug: 62417946
Test: Run android in a new user and network namespace, vold does not
      abort here.

Change-Id: I2b678ddd886a406a3394d9fdd33f9c8800ef78a3
Signed-off-by: Junichi Uekawa <uekawa@google.com>
(cherry picked from commit b41155d4af0e00fc6f65d7d67b80e7b866f847d6)
2017-07-11 15:51:54 -07:00
Keun-young Park
5139cdf927 add vold to "shutdown critical" am: 85f412b4ee
am: 4f58be1b69

Change-Id: I05a8c1ddb479e4e7527ef5d593a75f6a5992a5ad
2017-07-06 17:24:53 +00:00
Keun-young Park
4f58be1b69 add vold to "shutdown critical"
am: 85f412b4ee

Change-Id: Ib346b39be455571656c4732d2ad63b3edbe1e0cd
2017-07-06 17:22:35 +00:00
Android Build Merger (Role)
6eae30144e Merge "Merge "Merge "add vold to "shutdown critical"" am: da85cb71b3 am: 228b95fa15 am: 733fe09928" into oc-dr1-dev-plus-aosp am: f39281b68c" 2017-07-06 01:40:02 +00:00
Android Build Merger (Role)
8433d23931 Merge "Merge "Merge "add vold to "shutdown critical"" am: da85cb71b3 am: 228b95fa15 am: 733fe09928" into oc-dr1-dev-plus-aosp am: f39281b68c" 2017-07-06 01:39:56 +00:00
Keun-young Park
788d330274 Merge "Merge "add vold to "shutdown critical"" am: da85cb71b3 am: 228b95fa15 am: 733fe09928" into oc-dr1-dev-plus-aosp
am: f39281b68c

Change-Id: I142be6c019cd9a3f8f212a2bbc97842cd04cf6eb
2017-07-06 01:39:32 +00:00
Keun-young Park
12be4f9936 Merge "Merge "add vold to "shutdown critical"" am: da85cb71b3 am: 228b95fa15 am: 733fe09928" into oc-dr1-dev-plus-aosp
am: f39281b68c

Change-Id: If9b0ee31633ae73ad9257ee6035bdb1bd3c3d861
2017-07-06 01:39:27 +00:00
Android Build Merger (Role)
9344a3426e Merge "Merge "add vold to "shutdown critical"" am: da85cb71b3 am: 228b95fa15 am: 733fe09928 am: 9045c86a32" 2017-07-06 01:38:55 +00:00
Keun-young Park
b69dd8bb98 Merge "add vold to "shutdown critical"" am: da85cb71b3 am: 228b95fa15 am: 733fe09928
am: 9045c86a32

Change-Id: I5440cec7c057e5bc5e40886fcedd1a4814fd063a
2017-07-06 01:38:24 +00:00
Keun-young Park
da3e0f6ec2 Merge "add vold to "shutdown critical"" am: da85cb71b3 am: 228b95fa15 am: 733fe09928
am: 9045c86a32

Change-Id: Ifa4795f87e6de808cbbf4e238d8a0a938ad1f8b9
2017-07-06 01:38:18 +00:00
Android Build Merger (Role)
f39281b68c Merge "Merge "add vold to "shutdown critical"" am: da85cb71b3 am: 228b95fa15 am: 733fe09928" into oc-dr1-dev-plus-aosp 2017-07-06 01:14:00 +00:00
Keun-young Park
681b90811c Merge "add vold to "shutdown critical"" am: da85cb71b3 am: 228b95fa15
am: 733fe09928

Change-Id: I123056823f31b7e8d0ad3a6ae7775867d3dd0edb
2017-07-06 01:13:30 +00:00
Keun-young Park
9045c86a32 Merge "add vold to "shutdown critical"" am: da85cb71b3 am: 228b95fa15
am: 733fe09928

Change-Id: I760a1278d3138ca7a24ab69613466c83615f067d
2017-07-06 01:13:21 +00:00
Keun-young Park
733fe09928 Merge "add vold to "shutdown critical"" am: da85cb71b3
am: 228b95fa15

Change-Id: I0de967657d969f54dedddbb2b72ab07ed650e2e3
2017-07-06 00:56:21 +00:00
Keun-young Park
85f412b4ee add vold to "shutdown critical"
bug: 37626581
Test: reboot and check last kmsg

(cherry picked from commit 41156c5035)

Change-Id: I363dbbe58d2cb46b521ebdcea85c507679f27206
2017-07-06 00:53:42 +00:00
Keun-young Park
228b95fa15 Merge "add vold to "shutdown critical""
am: da85cb71b3

Change-Id: Ib0e4977590a94d7934001c223677cff45e59cd0a
2017-07-06 00:46:34 +00:00
Treehugger Robot
da85cb71b3 Merge "add vold to "shutdown critical"" 2017-07-06 00:40:55 +00:00
Keun-young Park
41156c5035 add vold to "shutdown critical"
bug: 37626581
Test: reboot and check last kmsg
Change-Id: I2c186c20a4afc342eaae420175013c80219a5ee5
2017-07-05 13:58:35 -07:00
Paul Crowley
73a5b06578 resolve merge conflicts of 8e6f6a5 to oc-dr1-dev-plus-aosp
am: 071120776a

Change-Id: Ifaa55b09cf0251cf994b8870169cf69e430b91ba
2017-06-29 01:20:07 +00:00
Paul Crowley
071120776a resolve merge conflicts of 8e6f6a5 to oc-dr1-dev-plus-aosp
Test: None
Change-Id: Icf7654b3200a4afd104f31aff8ce5b09867b7182
2017-06-28 16:09:00 -07:00
Paul Crowley
8e6f6a5ceb resolve merge conflicts of 4ad7784 to stage-aosp-master
am: ddb542f574

Change-Id: Iedef223a14b8a0c8dc558440b429a33d6b23f948
2017-06-28 22:45:50 +00:00
Paul Crowley
ddb542f574 resolve merge conflicts of 4ad7784 to stage-aosp-master
Test: Build seems to be unrelatedly broken
Change-Id: I2df307aa1c7134f217c558495e1438412480f324
Merged-In: I6ccfe0894551ba068de9bf5e23fe4fd1e10e36b1
2017-06-28 21:52:46 +00:00
Treehugger Robot
4ad7784b07 Merge "Label keys with all the possible FBE prefixes that might apply" 2017-06-27 16:17:22 +00:00
TreeHugger Robot
f05f5040c4 Merge "Fully switch to mke2fs; set policies everywhere." 2017-06-27 02:11:00 +00:00
TreeHugger Robot
c37919039e Merge "Label keys with all the possible FBE prefixes that might apply" 2017-06-27 00:50:32 +00:00
Jeff Sharkey
d794526962 Fully switch to mke2fs; set policies everywhere.
Older make_ext4fs doesn't support enabling quotas, so switch everyone
over to using mke2fs for adoptable storage.

Remove UUID check so that we start setting ext4-crypto policies on
adoptable storage devices; a future change will handle the actual
key management.

Bug: 30230655, 36757864
Test: cts-tradefed run commandAndExit cts-dev --abi armeabi-v7a -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.AdoptableHostTest
Change-Id: I021f85b1be8431044c239521c37be96534682746
2017-06-26 16:09:14 -06:00
Paul Crowley
ab4cc7814f Label keys with all the possible FBE prefixes that might apply
We don't know which FS and kernel version is going to want these keys,
so put them in the kernel three times with all three possible prefixes.

Bug: 62900873
Test: Marlin set up before this change successfully boots after it.
Change-Id: I6ccfe0894551ba068de9bf5e23fe4fd1e10e36b1
2017-06-26 09:58:31 -07:00
Jeff Sharkey
46bb69f49a Progress towards FBE and adoptable storage.
Offer to adopt storage devices on FBE devices, but keep it guarded
behind a system property for now, since we still need to work out key
storage details.

When migrating shared storage, leave user-specific /data/media
directories in place, since they already have the needed crypto
policies defined.

Enable journaling, quotas, and encrypt options when formatting
newly adopted devices.  installd already gracefully handles older
partitions without quota enabled.

Test: cts-tradefed run commandAndExit cts-dev --abi armeabi-v7a -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.AdoptableHostTest
Bug: 62290006, 36757864, 29117062, 37395736
Bug: 29923055, 25861755, 30230655, 37436961
Change-Id: Ibbeb6ec9db2394a279bbac221a2b20711d65494e
2017-06-26 09:53:10 -06:00
Paul Crowley
cd8bfe3d7f Label keys with all the possible FBE prefixes that might apply
We don't know which FS and kernel version is going to want these keys,
so put them in the kernel three times with all three possible prefixes.

Test: Marlin set up before this change successfully boots after it.
Change-Id: I6ccfe0894551ba068de9bf5e23fe4fd1e10e36b1
2017-06-20 10:10:08 -07:00
Jaegeuk Kim
ab48bc9dbd cryptfs: call format_f2fs correctly with proper flags
Change-Id: Ia493e6f758ff5dd5dd41479193ab237d4306d464
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2017-06-19 18:38:17 -07:00
Paul Crowley
ce02449264 Merge "Move functions useful for crypto test into their own file" 2017-06-19 19:46:30 +00:00
Paul Crowley
547c045adc Merge "Abolish AutoCloseFD.h in favour of unique_fd" 2017-06-19 15:34:00 +00:00
Paul Crowley
03f89d3d95 Move functions useful for crypto test into their own file
More refactoring in advance of work on bug.

Bug: 36029169
Test: compiles.
Change-Id: Ic4cdd4761e4c2b11a3ddca5c3bbc4d5e42fac9d4
2017-06-16 16:17:26 -07:00
Paul Crowley
e4c93da492 Abolish AutoCloseFD.h in favour of unique_fd
Android has a standard way to do what AutoCloseFD.h does, so use that
instead. Refactor before work on the bug.

Bug: 36029169
Test: Deleted a user and checked that secdiscard logs looked good.
Change-Id: I5d8bedfb3fa1f032fd2bced88b1b561e4a8c2ff4
2017-06-16 16:14:03 -07:00
Tom Cherry
f8c424fbe0 Merge "Use WaitForProperty() to wait for restorecon" am: 963a205a1b am: 80ce34d6cb am: dfd0492354
am: bd40570e25

Change-Id: I8cf81bab9521b3d0a589943a0a5dbd815aa75b5c
2017-06-16 06:05:13 +00:00
Tom Cherry
bd40570e25 Merge "Use WaitForProperty() to wait for restorecon" am: 963a205a1b am: 80ce34d6cb
am: dfd0492354

Change-Id: Id3b68e5b946fc1bf886f59e59fee3960a2899041
2017-06-16 06:01:26 +00:00
Tom Cherry
dfd0492354 Merge "Use WaitForProperty() to wait for restorecon" am: 963a205a1b
am: 80ce34d6cb

Change-Id: I4687810672b51db024f11ad7976562d510de9b81
2017-06-16 05:57:12 +00:00