Commit graph

2100 commits

Author SHA1 Message Date
Jeff Sharkey
f70cc79eb1 Merge "Grant "disk_reserved" GID to critical services." 2018-01-09 19:27:40 +00:00
Jeff Sharkey
36dd229675 Merge "Wire up reserved blocks presence for tests." 2018-01-09 05:40:53 +00:00
TreeHugger Robot
3b85797000 Merge "Remove all references to FDE enable wipe" 2018-01-08 18:59:45 +00:00
Jeff Sharkey
d7e5176043 Add "default_normal" support to vold.
This new flag isolates each user on a multi-user device for security
reasons.

Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.ExternalStorageHostTest#testSecondaryUsersInaccessible
Bug: 64672411
Change-Id: I3db8dde597a7715ca680779ac57957fb12a92f8e
2018-01-08 11:48:13 -07:00
Jeff Sharkey
53d5d7ca8a Wire up reserved blocks presence for tests.
This is how we tell CTS if the device has reserved blocks set aside
for system critical services.

Test: builds, boots
Bug: 62024591
Change-Id: I7c8ec2294b246eed54668b5717df00e72f13887a
2018-01-08 10:43:16 -07:00
Jeff Sharkey
570b2864ee Grant "disk_reserved" GID to critical services.
This GID extends the ability to use reserved disk space, giving the
system a chance to be usable enough for the user to free up disk
space used by apps.

Test: builds, boots
Bug: 62024591
Change-Id: I8bc47911a71e1f399616caae83678e2914781c7e
2018-01-07 19:30:19 -07:00
Jeff Sharkey
8c24ae7c47 FBE devices now fully support adoptable storage.
We've finished all the underlying work to support adoptable storage
on FBE devices, so remove the code that was disabling it by default.

To aid debugging, support blocking move commands (so that we log
the stdout) via a system property, so we don't have to recompile
end user devices stuck in funky states.

Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.AdoptableHostTest
Bug: 29923055, 25861755, 33252673, 37289651
Change-Id: I6b781de7e196a1a50ba543843aca0caf74c3e282
2018-01-04 18:52:07 -07:00
Paul Lawrence
7ee87cfcbe Remove all references to FDE enable wipe
Bug: 64766105
Test: FBE boots, forceencrypt boots, set pattern, reboots, encryptable
      boots and can be encrypted
Change-Id: I8c6dc0acdc37c3a6f1bea28d5607ed8938a4eb0c
2017-12-22 11:17:15 -08:00
Elliott Hughes
91f1886e14 Merge "StartsWith now allows std::string prefixes." 2017-12-21 15:55:34 +00:00
TreeHugger Robot
24224d10d0 Merge "Break vold dependency on keystore utilities." 2017-12-21 00:52:38 +00:00
Elliott Hughes
32a5b9aed3 StartsWith now allows std::string prefixes.
Bug: N/A
Test: builds
Change-Id: I2e24632e95f2bf929c2c000152c5c4076d53186e
2017-12-20 12:38:47 -08:00
Jeff Sharkey
401b260351 Delay touching disks when secure keyguard showing.
We've tried our best to protect against malicious storage devices
with limited SELinux domains, but let's be even more paranoid and
refuse to look at disks inserted while a secure keyguard is
showing.  We'll gladly scan them right away once the user confirms
their credentials.

Test: builds, boots, manual testing
Bug: 68054513
Change-Id: I37fd6c25bbd6631fa4ba3f84e19384d746a22498
2017-12-15 13:44:55 -07:00
Chih-hung Hsieh
0667b7e7dd Merge "Fix warning in system/vold/tests." am: b96ed7e6e0 am: 447f1874b4
am: c025ce8806  -s ours

Change-Id: I64cfa78cb57b5d813c34a0eb725a7dce802c7612
2017-12-11 23:37:26 +00:00
Chih-hung Hsieh
c025ce8806 Merge "Fix warning in system/vold/tests." am: b96ed7e6e0
am: 447f1874b4

Change-Id: I9e5db0fe14e7701b20c27e0c2074fb23496f59aa
2017-12-11 23:31:50 +00:00
Chih-hung Hsieh
447f1874b4 Merge "Fix warning in system/vold/tests."
am: b96ed7e6e0

Change-Id: I0d8dbf26cd9769307adc0a1ce0d4d02a8bff9382
2017-12-11 23:28:47 +00:00
Chih-hung Hsieh
b96ed7e6e0 Merge "Fix warning in system/vold/tests." 2017-12-11 23:22:58 +00:00
Xin Li
e3e2c74604 Merge "DO NOT MERGE: Merge Oreo MR1 into master" am: 56b0e8c1df -s ours am: d0271a642a
am: 54018cc991  -s ours

Change-Id: Ic4cf2efd7603cb01d9bf11be0b0245a8b46a2ac3
2017-12-08 04:27:44 +00:00
Chih-Hung Hsieh
a827f55629 Fix warning in system/vold/tests.
* Comment out unused function.

Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I18db09be2ff8ef27f822876a6832ca5f08ce939f
Merged-In: I7a23573af0d664a5f39f1cde3a22ac0001dac1ac
2017-12-07 14:18:34 -08:00
Xin Li
43dd997761 DO NOT MERGE: Merge Oreo MR1 into master am: 1843c887d4 -s ours am: 00a2c10b44
am: 81daada217  -s ours

Change-Id: I157feb353c48566849a001630ed505dc5911addd
2017-12-07 22:05:05 +00:00
Xin Li
54018cc991 Merge "DO NOT MERGE: Merge Oreo MR1 into master" am: 56b0e8c1df -s ours
am: d0271a642a

Change-Id: Ie7f861c8ba9eca256bfdd1546a3a67ae943cea4d
2017-12-07 19:40:44 +00:00
Xin Li
d0271a642a Merge "DO NOT MERGE: Merge Oreo MR1 into master"
am: 56b0e8c1df  -s ours

Change-Id: I632ac4d7b22928b78579ccd6e99a17c516f18809
2017-12-07 19:37:04 +00:00
Xin Li
81daada217 DO NOT MERGE: Merge Oreo MR1 into master am: 1843c887d4 -s ours
am: 00a2c10b44

Change-Id: I5d524667113fd31b78c2932d919d1c23b62caa5b
2017-12-07 07:26:09 +00:00
Xin Li
00a2c10b44 DO NOT MERGE: Merge Oreo MR1 into master
am: 1843c887d4  -s ours

Change-Id: Ie3ef381ae67fa4e1761ff96e91fef55a959215d4
2017-12-07 04:53:08 +00:00
Gao Xiang
9aec7a2fb6 mFusePid should be cleared after waitpid successfully
When waitpid is successful, we need to reset mFusePid
since mFusePid will be killed again unnecessarily
in doUnmount() if we don't reset mFusePid.

As a result, it will kill another unrelated process
in the case of pids wrap around.

Test: reboot
Fixes: 1d79d10 ("Check if sdcard daemon exited.")

Change-Id: Icb422d5c81621f9f6b9f4b1218e94b1d89172763
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
2017-12-07 11:37:19 +08:00
Xin Li
56b0e8c1df Merge "DO NOT MERGE: Merge Oreo MR1 into master" 2017-12-06 23:18:28 +00:00
Xin Li
1843c887d4 DO NOT MERGE: Merge Oreo MR1 into master
Exempt-From-Owner-Approval: Changes already landed internally
Change-Id: Ic7e2e2d1ef7bf17a9c81ea30d759fd9fe0a218c7
2017-12-06 14:24:58 -08:00
Paul Crowley
5afbc6276d No double encryption on FDE+FBE SD cards
On FBE systems, adoptable storage uses both file-based encryption (for
per-user protection) and full disk encryption (for metadata
protection). For performance/battery reasons, we don't want to encrypt
the same data twice; to that end, ensure that the
allow_encrypt_override flag is sent to dm_crypt.

Bug: 25861755
Test: see ag/3247969
Change-Id: Ib0c5891ab2d2ee9007e27a50254d29fc867d7bc5
2017-12-04 14:42:10 -08:00
Colin Cross
b8efb47a7c Merge "Export AIDL files as a filegroup for framework.jar" 2017-12-02 23:20:42 +00:00
Risan
aedae617fe [Vold] Conditional dependency to ARC++ ObbVolume
Test: Compile

Change-Id: Ic6348f7816b28302d45c05a359548a5d034fde24
Bug: 64500663
2017-11-30 04:24:41 +00:00
Colin Cross
a838863d77 Export AIDL files as a filegroup for framework.jar
Put AIDL files into a filegroup so they can be imported as sources
for framework.jar.

Bug: 69917341
Test: m checkbuild
Change-Id: I22e765ccf88832b1b192b42b2161898d9a6e5b2c
2017-11-29 19:07:22 +00:00
Pierre-Hugues Husson
130a994f4f Merge "Workaround perdev_minors path change in Linux" am: d3870c5167 am: 5687befd86
am: 77e194d0b9

Change-Id: If0c043e387629312121dc7d4556c112dc5800201
2017-11-28 19:19:36 +00:00
Pierre-Hugues Husson
77e194d0b9 Merge "Workaround perdev_minors path change in Linux" am: d3870c5167
am: 5687befd86

Change-Id: I65e584b3fb56aea64a466afb933d9085ab35117a
2017-11-28 19:03:30 +00:00
Pierre-Hugues Husson
5687befd86 Merge "Workaround perdev_minors path change in Linux"
am: d3870c5167

Change-Id: Ia7ec03a566f8c122dff05bcc3d996c05cf2b7771
2017-11-28 18:59:56 +00:00
Treehugger Robot
d3870c5167 Merge "Workaround perdev_minors path change in Linux" 2017-11-28 18:45:30 +00:00
Pierre-Hugues Husson
f347cd0249 Workaround perdev_minors path change in Linux
This upstream Linux change has been discussed at https://patchwork.kernel.org/patch/8281851/
And included in AOSP in https://android-review.googlesource.com/c/kernel/common/+/202752
Some devices have been released without it, so we need this change to
have a working SDcard on those devices.

Change-Id: I323d85bd8381f82b75db09493ddc22f432cec548
2017-11-28 17:53:42 +01:00
Paul Crowley
6699e7b912 Merge "Key upgrading for FDE." am: 997e605563 am: 2b1b72d183
am: 78c9969299

Change-Id: I85740653a804707faca6becc77a16c3ce9990123
2017-11-27 21:05:35 +00:00
Paul Crowley
78c9969299 Merge "Key upgrading for FDE." am: 997e605563
am: 2b1b72d183

Change-Id: I3c88a78565751c17f49c712d6015aad02cfca8f8
2017-11-27 21:02:34 +00:00
Paul Crowley
2b1b72d183 Merge "Key upgrading for FDE."
am: 997e605563

Change-Id: If2ca4a6bd3b7a2b36b6c092975bcfdde8e063a3e
2017-11-27 20:59:33 +00:00
Treehugger Robot
997e605563 Merge "Key upgrading for FDE." 2017-11-27 20:55:51 +00:00
Paul Crowley
73473337d8 Key upgrading for FDE.
Correctly handle a key upgrade error from keymaster by upgrading the
FDE RSA key and writing the new key blob to disk.

Bug: 69792304
Test: Roll back PLATFORM_SECURITY_PATCH a month, wipe and reboot, roll
      forwards again, check logs with and without this patch.
Change-Id: I220d2dd4e3d791f636e9bc5f063064cecbf1b88a
2017-11-27 10:34:18 -08:00
TreeHugger Robot
318b07d7c6 Merge "Vold: format f2fs partition" 2017-11-17 08:03:32 +00:00
TreeHugger Robot
3cb5cbff5a Merge "Add functions to handle idle maintenance" 2017-11-15 18:47:21 +00:00
Jaegeuk Kim
c7c477b8fb Vold: format f2fs partition
This patch formats f2fs paritition with proper flags.

Change-Id: Ie5ded1f2ceb3869771b2eaf9bea3b0966cab18c5
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2017-11-14 17:52:16 -08:00
Xin Li
1dd13cd558 Merge remote-tracking branch 'goog/stage-aosp-master' into HEAD
am: c6d4d2a22d

Change-Id: I65288cb11d5b2a56bcf3e388f1bb4de6d3ee74dd
2017-11-15 01:19:24 +00:00
Xin Li
c6d4d2a22d Merge remote-tracking branch 'goog/stage-aosp-master' into HEAD
Change-Id: Id798fe06c18348b17befbca944afa25f7c514a80
2017-11-14 16:38:31 -08:00
Jin Qian
a370c14f75 Add functions to handle idle maintenance
runIdleMaint is equivalent with:

1. echo 1 > /sys/fs/f2fs/sdX/gc_urgent
2. wait until /sys/fs/f2fs/sdX/dirty_segments
     <= threshold or timeout
3. echo 0 > /sys/fs/f2fs/sdX/gc_urgent
4. fstrim

abortIdleMaint forces the wait loop above to exit and
skips fstrim. However, if fstrim is already running,
abortIdleMaint will just leave it run to completion.

Test: adb shell sm idle-maint [run|abort]
Bug: 67776637
Change-Id: I4adff8d9b6bbd63bce41368cea55dc9e9b117eb6
2017-11-14 15:12:30 -08:00
Xin Li
bf168f7dad Merge commit 'e2d1d99f1a98b02a28fe71f2a387a72b69d4b4a6' from
oc-mr1-dev-plus-aosp into stage-aosp-master

Change-Id: I4bdada4c933109f1cc60c61946fa30e174ca7583
2017-11-14 12:20:56 -08:00
Jaegeuk Kim
119a98ac1b Merge "cryptfs: support make_f2fs with quota" am: 7807866abe am: 4d1c7765c8
am: 5968445892

Change-Id: Id898a24124eeafdcc1abdaafc4864d795f6fd340
2017-11-14 03:33:35 +00:00
Jaegeuk Kim
ab693f201e Merge "cryptfs: call format_f2fs correctly with proper flags" am: b9a1169eca am: af285d98b8
am: e15780494f

Change-Id: I5e08076759e8ba4d35c76d9da19e6607e5515958
2017-11-14 03:33:16 +00:00
Jaegeuk Kim
5968445892 Merge "cryptfs: support make_f2fs with quota" am: 7807866abe
am: 4d1c7765c8

Change-Id: Ica0836d567049774eeaf41d7f75d5cd83045edfe
2017-11-14 03:03:10 +00:00