OSDN Git Service
Keun-young Park [Thu, 3 Aug 2017 18:28:14 +0000 (18:28 +0000)]
do not sleep if it is shutting down
am:
375ac25773
Change-Id: Id0aa75c190b7012f4d329533fcd664341ae8c26b
Keun-young Park [Thu, 3 Aug 2017 00:45:48 +0000 (17:45 -0700)]
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
Elliott Hughes [Wed, 2 Aug 2017 17:27:29 +0000 (17:27 +0000)]
Merge "Move off deprecated readdir_r." am:
1647759651 am:
b60d874f24
am:
984b786b0e
Change-Id: Ida8d9a0830cf660155d50e5179d9199717ee1720
Elliott Hughes [Wed, 2 Aug 2017 17:22:55 +0000 (17:22 +0000)]
Merge "Move off deprecated readdir_r." am:
1647759651
am:
b60d874f24
Change-Id: Ic4370c02cf1d83281ffadedd9c2e1006d3748cf1
Elliott Hughes [Wed, 2 Aug 2017 17:19:01 +0000 (17:19 +0000)]
Merge "Move off deprecated readdir_r."
am:
1647759651
Change-Id: I4f5a6422eaef6be21d29f5ddc2b98ee53376e6a0
Elliott Hughes [Wed, 2 Aug 2017 17:12:21 +0000 (17:12 +0000)]
Merge "Move off deprecated readdir_r."
Elliott Hughes [Wed, 2 Aug 2017 00:39:44 +0000 (17:39 -0700)]
Move off deprecated readdir_r.
Bug: http://b/
32678321
Test: builds
Change-Id: I2d6e995d5eed3e72e12ce8b8f82a10143a256cd4
Junichi Uekawa [Thu, 13 Jul 2017 20:37:17 +0000 (20:37 +0000)]
Merge "Try SO_RCVBUF before SO_RCVBUFFORCE." am:
3f8fa0c215 am:
dfcc7dbad0
am:
602a2ce0e0
Change-Id: I4d4946552edb444f4a3a7ea333f272a7408ec260
Junichi Uekawa [Thu, 13 Jul 2017 20:34:46 +0000 (20:34 +0000)]
Merge "Try SO_RCVBUF before SO_RCVBUFFORCE." am:
3f8fa0c215
am:
dfcc7dbad0
Change-Id: I742ebc5174d809fa6f70324659f6e03798710679
Junichi Uekawa [Thu, 13 Jul 2017 20:32:18 +0000 (20:32 +0000)]
Merge "Try SO_RCVBUF before SO_RCVBUFFORCE."
am:
3f8fa0c215
Change-Id: I5df611cfaa1c4451f4d0cd576f3b82f2fefbea6b
Treehugger Robot [Thu, 13 Jul 2017 20:21:49 +0000 (20:21 +0000)]
Merge "Try SO_RCVBUF before SO_RCVBUFFORCE."
Junichi Uekawa [Wed, 4 Nov 2015 21:05:54 +0000 (06:05 +0900)]
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)
Keun-young Park [Thu, 6 Jul 2017 17:22:35 +0000 (17:22 +0000)]
add vold to "shutdown critical"
am:
85f412b4ee
Change-Id: Ib346b39be455571656c4732d2ad63b3edbe1e0cd
Android Build Merger (Role) [Thu, 6 Jul 2017 01:14:00 +0000 (01:14 +0000)]
Merge "Merge "add vold to "shutdown critical"" am:
da85cb71b3 am:
228b95fa15 am:
733fe09928" into oc-dr1-dev-plus-aosp
Keun-young Park [Thu, 6 Jul 2017 01:13:30 +0000 (01:13 +0000)]
Merge "add vold to "shutdown critical"" am:
da85cb71b3 am:
228b95fa15
am:
733fe09928
Change-Id: I123056823f31b7e8d0ad3a6ae7775867d3dd0edb
Keun-young Park [Thu, 6 Jul 2017 01:13:21 +0000 (01:13 +0000)]
Merge "add vold to "shutdown critical"" am:
da85cb71b3 am:
228b95fa15
am:
733fe09928
Change-Id: I760a1278d3138ca7a24ab69613466c83615f067d
Keun-young Park [Thu, 6 Jul 2017 00:56:21 +0000 (00:56 +0000)]
Merge "add vold to "shutdown critical"" am:
da85cb71b3
am:
228b95fa15
Change-Id: I0de967657d969f54dedddbb2b72ab07ed650e2e3
Keun-young Park [Wed, 5 Jul 2017 18:58:32 +0000 (11:58 -0700)]
add vold to "shutdown critical"
bug:
37626581
Test: reboot and check last kmsg
(cherry picked from commit
41156c5035efb4aa5212963ac028b7889feda3f8)
Change-Id: I363dbbe58d2cb46b521ebdcea85c507679f27206
Keun-young Park [Thu, 6 Jul 2017 00:46:34 +0000 (00:46 +0000)]
Merge "add vold to "shutdown critical""
am:
da85cb71b3
Change-Id: Ib0e4977590a94d7934001c223677cff45e59cd0a
Treehugger Robot [Thu, 6 Jul 2017 00:40:55 +0000 (00:40 +0000)]
Merge "add vold to "shutdown critical""
Keun-young Park [Wed, 5 Jul 2017 18:58:32 +0000 (11:58 -0700)]
add vold to "shutdown critical"
bug:
37626581
Test: reboot and check last kmsg
Change-Id: I2c186c20a4afc342eaae420175013c80219a5ee5
Paul Crowley [Wed, 28 Jun 2017 23:08:04 +0000 (16:08 -0700)]
resolve merge conflicts of
8e6f6a5 to oc-dr1-dev-plus-aosp
Test: None
Change-Id: Icf7654b3200a4afd104f31aff8ce5b09867b7182
Paul Crowley [Wed, 28 Jun 2017 22:45:50 +0000 (22:45 +0000)]
resolve merge conflicts of
4ad7784 to stage-aosp-master
am:
ddb542f574
Change-Id: Iedef223a14b8a0c8dc558440b429a33d6b23f948
Paul Crowley [Tue, 27 Jun 2017 16:33:39 +0000 (09:33 -0700)]
resolve merge conflicts of
4ad7784 to stage-aosp-master
Test: Build seems to be unrelatedly broken
Change-Id: I2df307aa1c7134f217c558495e1438412480f324
Merged-In: I6ccfe0894551ba068de9bf5e23fe4fd1e10e36b1
Treehugger Robot [Tue, 27 Jun 2017 16:17:20 +0000 (16:17 +0000)]
Merge "Label keys with all the possible FBE prefixes that might apply"
Paul Crowley [Mon, 19 Jun 2017 23:05:55 +0000 (16:05 -0700)]
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
Tom Cherry [Fri, 16 Jun 2017 06:01:26 +0000 (06:01 +0000)]
Merge "Use WaitForProperty() to wait for restorecon" am:
963a205a1b am:
80ce34d6cb
am:
dfd0492354
Change-Id: Id3b68e5b946fc1bf886f59e59fee3960a2899041
Tom Cherry [Fri, 16 Jun 2017 05:57:12 +0000 (05:57 +0000)]
Merge "Use WaitForProperty() to wait for restorecon" am:
963a205a1b
am:
80ce34d6cb
Change-Id: I4687810672b51db024f11ad7976562d510de9b81
Tom Cherry [Fri, 16 Jun 2017 05:53:12 +0000 (05:53 +0000)]
Merge "Use WaitForProperty() to wait for restorecon"
am:
963a205a1b
Change-Id: I4a11f21c0849922cda49e3f771a0b0dcfc5a3177
Treehugger Robot [Fri, 16 Jun 2017 05:47:51 +0000 (05:47 +0000)]
Merge "Use WaitForProperty() to wait for restorecon"
Tom Cherry [Fri, 16 Jun 2017 00:13:56 +0000 (17:13 -0700)]
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
Chih-Hung Hsieh [Fri, 9 Jun 2017 23:47:05 +0000 (23:47 +0000)]
Merge "Add OWNERS in system/vold" am:
f18a5aad56 am:
db09dbafdd
am:
c8240e2dd3
Change-Id: Ie400e5a087a11670ea2f46b2056dd9a659d01317
Chih-Hung Hsieh [Fri, 9 Jun 2017 23:44:39 +0000 (23:44 +0000)]
Merge "Add OWNERS in system/vold" am:
f18a5aad56
am:
db09dbafdd
Change-Id: I78c4e90025a9b2785fff5955a5ece7bc5e866bd0
Chih-Hung Hsieh [Fri, 9 Jun 2017 23:42:34 +0000 (23:42 +0000)]
Merge "Add OWNERS in system/vold"
am:
f18a5aad56
Change-Id: I75b04fc9a4e8d2e5de49833893ba74a375130929
Treehugger Robot [Fri, 9 Jun 2017 23:38:00 +0000 (23:38 +0000)]
Merge "Add OWNERS in system/vold"
Chih-Hung Hsieh [Fri, 9 Jun 2017 21:55:46 +0000 (14:55 -0700)]
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
Elliott Hughes [Fri, 19 May 2017 19:01:20 +0000 (19:01 +0000)]
Merge "vold should #include <sys/sysmacros.h>" am:
398c0e8274 am:
208b464f72 am:
fb3e85cf99
am:
048422d46e
Change-Id: I33406265fcf0c77a6289cb429aa6a2cc5e8f7146
Elliott Hughes [Fri, 19 May 2017 18:38:38 +0000 (18:38 +0000)]
Merge "vold should #include <sys/sysmacros.h>" am:
398c0e8274 am:
208b464f72
am:
fb3e85cf99
Change-Id: I32ed2a66bb60ba1042737b4bbb0a2195a3fe8e6f
Elliott Hughes [Fri, 19 May 2017 18:36:39 +0000 (18:36 +0000)]
Merge "vold should #include <sys/sysmacros.h>" am:
398c0e8274
am:
208b464f72
Change-Id: I8d4a8069958bc4af67766fde101c322b2f189049
Elliott Hughes [Fri, 19 May 2017 18:34:45 +0000 (18:34 +0000)]
Merge "vold should #include <sys/sysmacros.h>"
am:
398c0e8274
Change-Id: Id72168cac260fedc3123e28402f737ee8be3f625
Treehugger Robot [Fri, 19 May 2017 18:30:44 +0000 (18:30 +0000)]
Merge "vold should #include <sys/sysmacros.h>"
Elliott Hughes [Thu, 18 May 2017 16:08:24 +0000 (09:08 -0700)]
vold should #include <sys/sysmacros.h>
Bug: https://github.com/android-ndk/ndk/issues/398
Test: builds
Change-Id: I7a1ca1701099886fb493cc5288d6ee867d5f520a
Rubin Xu [Tue, 16 May 2017 16:48:23 +0000 (16:48 +0000)]
Add secdiscard command for secure deletion of files am:
f8d604caf3
am:
f572398ae6 -s ours
Change-Id: Ic9960602cac03407caa8f63e4f0c9913640db5d2
Rubin Xu [Tue, 16 May 2017 16:35:19 +0000 (16:35 +0000)]
Add secdiscard command for secure deletion of files
am:
f8d604caf3
Change-Id: Ib9d71507b880ee8dc66880536c800212f523332d
Rubin Xu [Thu, 27 Apr 2017 19:43:10 +0000 (20:43 +0100)]
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
Rubin Xu [Thu, 27 Apr 2017 19:43:10 +0000 (20:43 +0100)]
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
Elliott Hughes [Sat, 13 May 2017 00:48:26 +0000 (00:48 +0000)]
Merge "Switch to libkeyutils." am:
612eea6b4f am:
7a7df78819 am:
f727d05b83
am:
4e19ff7ab1
Change-Id: Iff35b18579b3f7e932d36ed2164fd49b7791f779
Elliott Hughes [Sat, 13 May 2017 00:44:18 +0000 (00:44 +0000)]
Merge "Switch to libkeyutils." am:
612eea6b4f am:
7a7df78819
am:
f727d05b83
Change-Id: I1b3e4e932e54b33dd582a849135822ace61c11d7
Elliott Hughes [Sat, 13 May 2017 00:34:10 +0000 (00:34 +0000)]
Merge "Switch to libkeyutils." am:
612eea6b4f
am:
7a7df78819
Change-Id: I05f95589668e93b36d5d5eed2c4ac21aff6f7e41
Elliott Hughes [Sat, 13 May 2017 00:32:13 +0000 (00:32 +0000)]
Merge "Switch to libkeyutils."
am:
612eea6b4f
Change-Id: Icb86bc1c341ec9366f382985522b6ec70e11b8ea
Elliott Hughes [Sat, 13 May 2017 00:28:25 +0000 (00:28 +0000)]
Merge "Switch to libkeyutils."
Elliott Hughes [Thu, 11 May 2017 17:38:14 +0000 (17:38 +0000)]
Merge "Switch to libkeyutils."
TreeHugger Robot [Thu, 11 May 2017 01:46:52 +0000 (01:46 +0000)]
Merge "Add CryptfsScryptHidlizationEquivalenceTest"
Elliott Hughes [Wed, 10 May 2017 00:01:04 +0000 (17:01 -0700)]
Switch to libkeyutils.
Bug: http://b/
37991155
Test: builds+boots
Change-Id: I33a3ba0d59ffd504093dc94517815c1196e95e2b
Elliott Hughes [Wed, 10 May 2017 00:01:04 +0000 (17:01 -0700)]
Switch to libkeyutils.
Bug: http://b/
37991155
Test: builds+boots
Change-Id: I33a3ba0d59ffd504093dc94517815c1196e95e2b
Tom Cherry [Thu, 4 May 2017 00:01:13 +0000 (00:01 +0000)]
Merge "BuildDataUserCePath always use dir instead of symbolic link" am:
fed8ab1d76 am:
7dc93304c8 am:
10211d2207
am:
3559234cd3
Change-Id: Ifc6196804b57bdf9d38a37d594281ef53623f0d3
Tom Cherry [Wed, 3 May 2017 23:54:25 +0000 (23:54 +0000)]
Merge "BuildDataUserCePath always use dir instead of symbolic link" am:
fed8ab1d76 am:
7dc93304c8
am:
10211d2207
Change-Id: I8ab5875455abaaa84cc777a96be23cbad314d3f7
Tom Cherry [Wed, 3 May 2017 23:51:53 +0000 (23:51 +0000)]
Merge "BuildDataUserCePath always use dir instead of symbolic link" am:
fed8ab1d76
am:
7dc93304c8
Change-Id: I025e83bc54bcda6e1a947301479bdd79d5a17e7b
Tom Cherry [Wed, 3 May 2017 23:46:52 +0000 (23:46 +0000)]
Merge "BuildDataUserCePath always use dir instead of symbolic link"
am:
fed8ab1d76
Change-Id: I98b7b11905f94c6576c268cfe950ed092b5e74d8
Tom Cherry [Wed, 3 May 2017 23:42:58 +0000 (23:42 +0000)]
Merge "BuildDataUserCePath always use dir instead of symbolic link"
Steven Moreland [Tue, 2 May 2017 19:26:43 +0000 (19:26 +0000)]
Keymaster: IWYU
am:
8264033678
Change-Id: Ia58e5508a19c4ba516a840e5f5287bfa1cb31bd1
Steven Moreland [Mon, 1 May 2017 19:45:32 +0000 (12:45 -0700)]
Keymaster: IWYU
Was depending on this transitively from MQDescriptor.h
Test: links
Bug:
37791060
Change-Id: I9b52bbe9ac6c3a54fdb6e352e90eba50914633d4
(cherry picked from commit
25e8b4b4f67f62a98c440f8323eaeb956d99f0cd)
Steven Moreland [Mon, 1 May 2017 19:45:32 +0000 (12:45 -0700)]
Keymaster: IWYU
Was depending on this transitively from MQDescriptor.h
Test: links
Bug:
37791060
Change-Id: I9b52bbe9ac6c3a54fdb6e352e90eba50914633d4
Daniel Rosenberg [Sun, 30 Apr 2017 12:00:35 +0000 (12:00 +0000)]
Merge "Revert "Revert "Stop dropping caches now we have kernel fix""" into oc-dev am:
c40996e719
am:
0066d41edd -s ours
Change-Id: Ic762430d6e04de38d0cc08846774d2e7604eaf41
Daniel Rosenberg [Sun, 30 Apr 2017 11:58:06 +0000 (11:58 +0000)]
Merge "Revert "Revert "Stop dropping caches now we have kernel fix""" into oc-dev
am:
c40996e719
Change-Id: If30418cbb9af2e9d81b944474483c8040845c12d
TreeHugger Robot [Sun, 30 Apr 2017 11:53:22 +0000 (11:53 +0000)]
Merge "Revert "Revert "Stop dropping caches now we have kernel fix""" into oc-dev
TreeHugger Robot [Sat, 29 Apr 2017 22:57:53 +0000 (22:57 +0000)]
Merge "Revert "Revert "Stop dropping caches now we have kernel fix"""
Guang Zhu [Sat, 29 Apr 2017 00:01:34 +0000 (00:01 +0000)]
Merge "Revert "Enable metadata encryption""
Guang Zhu [Fri, 28 Apr 2017 23:56:45 +0000 (23:56 +0000)]
Revert "Enable metadata encryption"
Bug:
37792477
This reverts commit
3963b2364561a7d732995d5b8fec42097f548caa.
Change-Id: I3b6bf5a9a4c3899aabe2c824d8498a06981daed8
Daniel Rosenberg [Fri, 28 Apr 2017 01:11:35 +0000 (01:11 +0000)]
Revert "Revert "Stop dropping caches now we have kernel fix""
This reverts commit
8ad0bef7b5b1b6e1ba3afe441d2dcc9a06e782a7.
Bug:
37231161
Test: Boot device with FBE enabled. ls /storage/emulated/0/Android
Unlock device. ls /storage/emulated/0/Android
1st will not be found. Second should be found.
Change-Id: I92c7ad0adaa7bd357e10661a47cc667ac0ff84b4
Merged-In: I92c7ad0adaa7bd357e10661a47cc667ac0ff84b4
Daniel Rosenberg [Fri, 28 Apr 2017 01:11:35 +0000 (01:11 +0000)]
Revert "Revert "Stop dropping caches now we have kernel fix""
This reverts commit
8ad0bef7b5b1b6e1ba3afe441d2dcc9a06e782a7.
Bug:
37231161
Test: Boot device with FBE enabled. ls /storage/emulated/0/Android
Unlock device. ls /storage/emulated/0/Android
1st will not be found. Second should be found.
Change-Id: I92c7ad0adaa7bd357e10661a47cc667ac0ff84b4
Nick Desaulniers [Fri, 28 Apr 2017 21:29:28 +0000 (21:29 +0000)]
Merge "Enable metadata encryption"
Paul Lawrence [Tue, 25 Apr 2017 16:26:56 +0000 (09:26 -0700)]
Enable metadata encryption
Bug:
26778031
Test: Boots, reboots, sector 0 of userdata encrypted
Make sure an FDE device, both default and password protected,
boots.
Make sure an FBE device without metadata encryption boots.
Change-Id: Ic44a32ce7e9b978e9c9e2dc112b26206741c838d
Yong Yao [Wed, 26 Apr 2017 21:36:03 +0000 (21:36 +0000)]
Fix keyname generation issue am:
392c4dbdc1
am:
b8bb4463e0 -s ours
Change-Id: I20283d6cc9576af54b0bfc9e2adaf0e1bfabcee7
Yong Yao [Wed, 26 Apr 2017 21:05:18 +0000 (21:05 +0000)]
Fix keyname generation issue
am:
392c4dbdc1
Change-Id: Iea048673c82dea1d5d9a13a10e1f70376955ca4b
Paul Crowley [Thu, 2 Jun 2016 18:04:27 +0000 (11:04 -0700)]
Add support for metadata encryption
Support encrypting metadata in /userdata using the dm-default-key
driver with a key in the /metadata partition.
Bug:
29189559
Test: Angler & Marlin build and boot
Change-Id: I716b117508d4bb4f6a4039293acb848cbc60f67b
Yong Yao [Wed, 5 Apr 2017 09:52:48 +0000 (05:52 -0400)]
Fix keyname generation issue
The keyname binded to keyring return a wrong string when there are binary char larger than 127,
the sign extension will introduce unexpect FFFFFF string to the keyname.
Bug:
36975893
Test: local build
Change-Id: Iba2f6ef95aeacd08c8d6c72b71e7b92e956ec3fc
Signed-off-by: Ai, Ting A <ting.a.ai@intel.com>
Paul Crowley [Thu, 2 Jun 2016 18:01:19 +0000 (11:01 -0700)]
Refactor to lay the groundwork for metadata encryption
Bug:
26778031
Test: Angler, Marlin build and boot
Change-Id: Ic136dfe6195a650f7db76d3489f36da6a1929dc5
Daniel Rosenberg [Thu, 20 Apr 2017 22:42:17 +0000 (22:42 +0000)]
Revert "Stop dropping caches now we have kernel fix" am:
8ad0bef7b5
am:
e531126b40
Change-Id: I797d2c4615a94aca88640da11342f4053b15bb11
Daniel Rosenberg [Thu, 20 Apr 2017 22:39:16 +0000 (22:39 +0000)]
Revert "Stop dropping caches now we have kernel fix"
am:
8ad0bef7b5
Change-Id: I318b956c38175abada5a2423b8d920b299883030
Daniel Rosenberg [Thu, 20 Apr 2017 19:29:37 +0000 (12:29 -0700)]
Revert "Stop dropping caches now we have kernel fix"
This reverts commit
6abe6831b59a56145cdd28445cd46fa3c79ecb92.
Bringing this back temporarily for the same issue on sdcardfs.
Will remove once the kernel issue is resolved.
Change-Id: Ia29ea4fddb7777012a2eea9259f9ac856773fe01
Bug:
37231161
Test: Boot device with FBE enabled. ls /storage/emulated/0/Android
Unlock device. ls /storage/emulated/0/Android
1st will not be found. Second should be found.
cjbao [Tue, 11 Apr 2017 16:09:00 +0000 (00:09 +0800)]
BuildDataUserCePath always use dir instead of symbolic link
Select whichever is real dir instead of symbolic link from either /data/data
or /data/user/0. This is to minimize path walking overhead in kernel.
This works together with Change 369787
Test: Manual test
Change-Id: I338518673fc22ccbfed6ddd6be196931fce18525
Signed-off-by: cjbao <cathy.bao@intel.com>
Eric Biggers [Wed, 5 Apr 2017 00:33:50 +0000 (00:33 +0000)]
vold: unlink ext4 encryption keys rather than revoking them am:
fa4039b162
am:
9f71aa0ebc
Change-Id: Ie6688e99e6cf4bbc8f524ea4fdfbc389002cbde5
Eric Biggers [Wed, 5 Apr 2017 00:31:49 +0000 (00:31 +0000)]
vold: unlink ext4 encryption keys rather than revoking them
am:
fa4039b162
Change-Id: I118ef8b85620f721370e5d26be2d3ef3c2679a8d
Seigo Nonaka [Wed, 5 Apr 2017 00:02:05 +0000 (00:02 +0000)]
Merge "Prepare necessary data directory before loading persistent properties." am:
399bd0866c am:
e1f216cc4d am:
cbe1f6b1e4
am:
faec65d7c3
Change-Id: Ie8e0bcc05bdf83351b3bfb73309c1b00eb511e30
Seigo Nonaka [Wed, 5 Apr 2017 00:00:05 +0000 (00:00 +0000)]
Merge "Prepare necessary data directory before loading persistent properties." am:
399bd0866c am:
e1f216cc4d
am:
cbe1f6b1e4
Change-Id: I864e4151a0b7e1551892d9199883e8783941f7a8
Seigo Nonaka [Tue, 4 Apr 2017 23:52:12 +0000 (23:52 +0000)]
Merge "Prepare necessary data directory before loading persistent properties." am:
399bd0866c
am:
e1f216cc4d
Change-Id: I69153c12ca16fcb8381972c70ac7e3e25c050d42
Seigo Nonaka [Tue, 4 Apr 2017 23:46:15 +0000 (23:46 +0000)]
Merge "Prepare necessary data directory before loading persistent properties."
am:
399bd0866c
Change-Id: I4a675722c79bc74bcfc106365a1f056c9b338cc4
Treehugger Robot [Tue, 4 Apr 2017 23:34:23 +0000 (23:34 +0000)]
Merge "Prepare necessary data directory before loading persistent properties."
Eric Biggers [Mon, 3 Apr 2017 22:48:09 +0000 (15:48 -0700)]
vold: unlink ext4 encryption keys rather than revoking them
Unlinking keys rather than revoking them avoids bugs in certain kernel
versions without having to hack around the problem with an arbitrary 20
second delay, which is not guaranteed to be sufficient and has caused
full device hangs like in b/
35988361.
Furthermore, in the context of filesystem encryption, unlinking is not
currently supposed to be any less secure than revoking. There was a
case where revoking (but not unlinking) keys will cause the filesystem
to deny access to files that were previously opened with that key.
However, this was a means of _access control_, which encryption is not
intended to be used for. Instead, file permissions and/or SELinux
should be used to enforce access control, while filesystem encryption
should be used to protect data at rest independently from access
control. This misfeature has also been removed upstream (and backported
to 4.4-stable and 4.9-stable) because it caused CVE-2017-7374.
Eventually we'd really like to make the kernel support proper revocation
of filesystem encryption keys, i.e. fully clearing all key material and
plaintext and safely waiting for any affected filesystem operations or
writeback to complete. But for now this functionality does not exist.
('sync && echo 3 > /proc/sys/vm/drop_caches' can be useful, but it's not
good enough.)
Bug:
35988361
Change-Id: Ib44effe5368cdce380ae129dc4e6c6fde6cb2719
(cherry picked from commit
fd7ba5e4c61691d8a45bc729b7659940a984bab0)
Eric Biggers [Tue, 4 Apr 2017 22:16:50 +0000 (22:16 +0000)]
Merge "vold: unlink ext4 encryption keys rather than revoking them"
Seigo Nonaka [Mon, 20 Jun 2016 08:05:40 +0000 (17:05 +0900)]
Prepare necessary data directory before loading persistent properties.
init reads files in /data/property/ but it is not ready to read when
trigger_load_persist_props is triggered by vold.decrypt.
Bug:
29332975
Change-Id: I14beac8714ff2f722d8b11f666bc7ca693ccd46e
(cherry picked from commit
e2ef0c0da454a5b9224d340260e9ad5be46092fe)
Jeff Sharkey [Tue, 4 Apr 2017 02:05:21 +0000 (02:05 +0000)]
Merge "Abort migration early when not enough space." into oc-dev am:
e6c142174c
am:
a4c0a3b2ca
Change-Id: Ie50f0ae2dbf7eb1b868606b75d1ade808d34590b
Jeff Sharkey [Tue, 4 Apr 2017 01:58:25 +0000 (01:58 +0000)]
Merge "Abort migration early when not enough space." into oc-dev
am:
e6c142174c
Change-Id: I193b962b1288be22fb343c802ac3d2b464748f17
TreeHugger Robot [Tue, 4 Apr 2017 01:45:42 +0000 (01:45 +0000)]
Merge "Abort migration early when not enough space." into oc-dev
Jeff Sharkey [Mon, 3 Apr 2017 23:11:45 +0000 (17:11 -0600)]
Abort migration early when not enough space.
Otherwise we potentially waste minutes of the users time copying
data that will never fit.
Also fix bug around storage calculation. It's confusing, but f_bsize
is not the value you're looking for; the real block size is f_frsize.
Test: builds, boots
Bug:
27590986,
36840579
Change-Id: I77c63e259356824cc75a3adcf3f4af567efdc7aa
Eric Biggers [Mon, 3 Apr 2017 22:48:09 +0000 (15:48 -0700)]
vold: unlink ext4 encryption keys rather than revoking them
Unlinking keys rather than revoking them avoids bugs in certain kernel
versions without having to hack around the problem with an arbitrary 20
second delay, which is not guaranteed to be sufficient and has caused
full device hangs like in b/
35988361.
Furthermore, in the context of filesystem encryption, unlinking is not
currently supposed to be any less secure than revoking. There was a
case where revoking (but not unlinking) keys will cause the filesystem
to deny access to files that were previously opened with that key.
However, this was a means of _access control_, which encryption is not
intended to be used for. Instead, file permissions and/or SELinux
should be used to enforce access control, while filesystem encryption
should be used to protect data at rest independently from access
control. This misfeature has also been removed upstream (and backported
to 4.4-stable and 4.9-stable) because it caused CVE-2017-7374.
Eventually we'd really like to make the kernel support proper revocation
of filesystem encryption keys, i.e. fully clearing all key material and
plaintext and safely waiting for any affected filesystem operations or
writeback to complete. But for now this functionality does not exist.
('sync && echo 3 > /proc/sys/vm/drop_caches' can be useful, but it's not
good enough.)
Change-Id: Ib44effe5368cdce380ae129dc4e6c6fde6cb2719
Tom Cherry [Mon, 3 Apr 2017 22:12:49 +0000 (22:12 +0000)]
vdc: use libbase logging and log directly to kmsg on boot am:
c61581e7d2
am:
bd7e8c55af
Change-Id: If48f19f21c29bac7de7a639e812a5729d9e3de5e
Tom Cherry [Mon, 3 Apr 2017 22:06:06 +0000 (22:06 +0000)]
vdc: use libbase logging and log directly to kmsg on boot
am:
c61581e7d2
Change-Id: I1a77a6f8f3c3325abf4d74d0feef1a6187c3f6b6
Tom Cherry [Wed, 29 Mar 2017 23:50:28 +0000 (16:50 -0700)]
vdc: use libbase logging and log directly to kmsg on boot
Init is no longer calling vdc with logwrapper, so it must take care of
logging to kmsg directly.
Bug:
36278706
Test: observe logging in kmsg on boot and stderr on normal usage
(cherry picked from commit
f71511ac4199f273744b8e0adf266c6e911918aa)
Change-Id: Ieb643918f11bdde4f99ec7f3ec083efbb326e809