Commit graph

1676 commits

Author SHA1 Message Date
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
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
Tom Cherry
80ce34d6cb Merge "Use WaitForProperty() to wait for restorecon"
am: 963a205a1b

Change-Id: I4a11f21c0849922cda49e3f771a0b0dcfc5a3177
2017-06-16 05:53:12 +00:00
Treehugger Robot
963a205a1b Merge "Use WaitForProperty() to wait for restorecon" 2017-06-16 05:47:59 +00:00
Tom Cherry
d6127ef795 Use WaitForProperty() to wait for restorecon
We have android::base::WaitForProperty() that uses futexes to
efficiently wait for property value changes, so use that instead
polling.

Test: Boot bullhead
Change-Id: Id964eddbdbfd9b5ceac5ed83a8ed66b9e60008ca
2017-06-15 17:19:32 -07:00
Chih-Hung Hsieh
9a64a4e365 Merge "Add OWNERS in system/vold" am: f18a5aad56 am: db09dbafdd am: c8240e2dd3
am: b413703a3b

Change-Id: I4d56fd159f08f63c577b2f7ac075e6adba815b9b
2017-06-10 00:01:23 +00:00
Chih-Hung Hsieh
b413703a3b Merge "Add OWNERS in system/vold" am: f18a5aad56 am: db09dbafdd
am: c8240e2dd3

Change-Id: Ie400e5a087a11670ea2f46b2056dd9a659d01317
2017-06-09 23:47:05 +00:00
Chih-Hung Hsieh
c8240e2dd3 Merge "Add OWNERS in system/vold" am: f18a5aad56
am: db09dbafdd

Change-Id: I78c4e90025a9b2785fff5955a5ece7bc5e866bd0
2017-06-09 23:44:39 +00:00
Chih-Hung Hsieh
db09dbafdd Merge "Add OWNERS in system/vold"
am: f18a5aad56

Change-Id: I75b04fc9a4e8d2e5de49833893ba74a375130929
2017-06-09 23:42:34 +00:00
Treehugger Robot
f18a5aad56 Merge "Add OWNERS in system/vold" 2017-06-09 23:38:02 +00:00
Chih-Hung Hsieh
978b7cfc0e Add OWNERS in system/vold
* Owners are selected from top CL approvals or owners.
  They will be suggested to review/approve future CLs.
* OWNERS files are recognized by the new find-owners plugin, see .md files in
  https://gerrit.googlesource.com/plugins/find-owners/+/master/src/main/resources/Documentation/

Test: build/make/tools/checkowners.py -c -v OWNERS
Change-Id: I4d0431105b55e88be258800a7fd45a42deb9bb60
2017-06-09 14:55:46 -07:00
Wei Wang
42e3810e13 Remove timout logic in waiting vold.post_fs_data_done
This code should not be timing out, since it has no graceful way to
recover.

Bug: 62308812
Test: marlin boot
Change-Id: I1284f9a34e83e6451622a702d2bee40b08877db2
2017-06-07 11:26:41 -07:00
Elliott Hughes
e4775fdbca Merge "vold should #include <sys/sysmacros.h>" am: 398c0e8274 am: 208b464f72 am: fb3e85cf99
am: 048422d46e

Change-Id: I33406265fcf0c77a6289cb429aa6a2cc5e8f7146
2017-05-19 19:01:20 +00:00
Elliott Hughes
048422d46e Merge "vold should #include <sys/sysmacros.h>" am: 398c0e8274 am: 208b464f72
am: fb3e85cf99

Change-Id: I32ed2a66bb60ba1042737b4bbb0a2195a3fe8e6f
2017-05-19 18:38:38 +00:00
Elliott Hughes
fb3e85cf99 Merge "vold should #include <sys/sysmacros.h>" am: 398c0e8274
am: 208b464f72

Change-Id: I8d4a8069958bc4af67766fde101c322b2f189049
2017-05-19 18:36:39 +00:00
Elliott Hughes
208b464f72 Merge "vold should #include <sys/sysmacros.h>"
am: 398c0e8274

Change-Id: Id72168cac260fedc3123e28402f737ee8be3f625
2017-05-19 18:34:45 +00:00
Treehugger Robot
398c0e8274 Merge "vold should #include <sys/sysmacros.h>" 2017-05-19 18:30:45 +00:00
Elliott Hughes
0e08e84df0 vold should #include <sys/sysmacros.h>
Bug: https://github.com/android-ndk/ndk/issues/398
Test: builds
Change-Id: I7a1ca1701099886fb493cc5288d6ee867d5f520a
2017-05-18 09:08:24 -07:00
Rubin Xu
2cd0b938cb Add secdiscard command for secure deletion of files am: f8d604caf3
am: f572398ae6  -s ours

Change-Id: Ic9960602cac03407caa8f63e4f0c9913640db5d2
2017-05-16 16:48:23 +00:00
Rubin Xu
f572398ae6 Add secdiscard command for secure deletion of files
am: f8d604caf3

Change-Id: Ib9d71507b880ee8dc66880536c800212f523332d
2017-05-16 16:35:19 +00:00
Rubin Xu
f8d604caf3 Add secdiscard command for secure deletion of files
This is used by LockSettingsService to delete sensitive credential files.

Bug: 34600579
Test: manual - change device lock under synthetic password, verify
      old data on disk is erased.

Change-Id: I5e11b559ad8818bd2ad2b321d67d21477aab7555
Merged-In: I5e11b559ad8818bd2ad2b321d67d21477aab7555
2017-05-16 13:29:24 +01:00
Rubin Xu
2436e27717 Add secdiscard command for secure deletion of files
This is used by LockSettingsService to delete sensitive credential files.

Bug: 34600579
Test: manual - change device lock under synthetic password, verify
      old data on disk is erased.

Change-Id: I5e11b559ad8818bd2ad2b321d67d21477aab7555
2017-05-16 12:44:02 +01:00
Elliott Hughes
e437bad807 Merge "Switch to libkeyutils." am: 612eea6b4f am: 7a7df78819 am: f727d05b83
am: 4e19ff7ab1

Change-Id: Iff35b18579b3f7e932d36ed2164fd49b7791f779
2017-05-13 00:48:26 +00:00
Elliott Hughes
4e19ff7ab1 Merge "Switch to libkeyutils." am: 612eea6b4f am: 7a7df78819
am: f727d05b83

Change-Id: I1b3e4e932e54b33dd582a849135822ace61c11d7
2017-05-13 00:44:18 +00:00
Elliott Hughes
f727d05b83 Merge "Switch to libkeyutils." am: 612eea6b4f
am: 7a7df78819

Change-Id: I05f95589668e93b36d5d5eed2c4ac21aff6f7e41
2017-05-13 00:34:10 +00:00
Elliott Hughes
7a7df78819 Merge "Switch to libkeyutils."
am: 612eea6b4f

Change-Id: Icb86bc1c341ec9366f382985522b6ec70e11b8ea
2017-05-13 00:32:13 +00:00
Elliott Hughes
612eea6b4f Merge "Switch to libkeyutils." 2017-05-13 00:28:27 +00:00
Elliott Hughes
9baffc8ed4 Merge "Switch to libkeyutils." 2017-05-11 17:38:17 +00:00
TreeHugger Robot
965278233d Merge "Add CryptfsScryptHidlizationEquivalenceTest" 2017-05-11 01:46:54 +00:00
Elliott Hughes
c3bda18bda Switch to libkeyutils.
Bug: http://b/37991155
Test: builds+boots
Change-Id: I33a3ba0d59ffd504093dc94517815c1196e95e2b
2017-05-10 16:59:33 -07:00
Elliott Hughes
12d1312f98 Switch to libkeyutils.
Bug: http://b/37991155
Test: builds+boots
Change-Id: I33a3ba0d59ffd504093dc94517815c1196e95e2b
2017-05-09 17:01:04 -07:00
Tom Cherry
805defa9b4 Merge "BuildDataUserCePath always use dir instead of symbolic link" am: fed8ab1d76 am: 7dc93304c8 am: 10211d2207
am: 3559234cd3

Change-Id: Ifc6196804b57bdf9d38a37d594281ef53623f0d3
2017-05-04 00:01:13 +00:00
Tom Cherry
3559234cd3 Merge "BuildDataUserCePath always use dir instead of symbolic link" am: fed8ab1d76 am: 7dc93304c8
am: 10211d2207

Change-Id: I8ab5875455abaaa84cc777a96be23cbad314d3f7
2017-05-03 23:54:25 +00:00
Tom Cherry
10211d2207 Merge "BuildDataUserCePath always use dir instead of symbolic link" am: fed8ab1d76
am: 7dc93304c8

Change-Id: I025e83bc54bcda6e1a947301479bdd79d5a17e7b
2017-05-03 23:51:53 +00:00
Tom Cherry
7dc93304c8 Merge "BuildDataUserCePath always use dir instead of symbolic link"
am: fed8ab1d76

Change-Id: I98b7b11905f94c6576c268cfe950ed092b5e74d8
2017-05-03 23:46:52 +00:00
Tom Cherry
fed8ab1d76 Merge "BuildDataUserCePath always use dir instead of symbolic link" 2017-05-03 23:43:00 +00:00
Steven Moreland
a904d42a53 Keymaster: IWYU
am: 8264033678

Change-Id: Ia58e5508a19c4ba516a840e5f5287bfa1cb31bd1
2017-05-02 19:26:43 +00:00
Steven Moreland
8264033678 Keymaster: IWYU
Was depending on this transitively from MQDescriptor.h

Test: links
Bug: 37791060
Change-Id: I9b52bbe9ac6c3a54fdb6e352e90eba50914633d4
(cherry picked from commit 25e8b4b4f6)
2017-05-02 19:04:00 +00:00
Steven Moreland
25e8b4b4f6 Keymaster: IWYU
Was depending on this transitively from MQDescriptor.h

Test: links
Bug: 37791060
Change-Id: I9b52bbe9ac6c3a54fdb6e352e90eba50914633d4
2017-05-01 12:45:32 -07:00
Daniel Rosenberg
0411327894 Merge "Revert "Revert "Stop dropping caches now we have kernel fix""" into oc-dev am: c40996e719
am: 0066d41edd  -s ours

Change-Id: Ic762430d6e04de38d0cc08846774d2e7604eaf41
2017-04-30 12:00:35 +00:00
Daniel Rosenberg
0066d41edd Merge "Revert "Revert "Stop dropping caches now we have kernel fix""" into oc-dev
am: c40996e719

Change-Id: If30418cbb9af2e9d81b944474483c8040845c12d
2017-04-30 11:58:06 +00:00
TreeHugger Robot
c40996e719 Merge "Revert "Revert "Stop dropping caches now we have kernel fix""" into oc-dev 2017-04-30 11:53:22 +00:00
TreeHugger Robot
f3adadf974 Merge "Revert "Revert "Stop dropping caches now we have kernel fix""" 2017-04-29 22:57:54 +00:00