Commit graph

1644 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
12d1312f98 Switch to libkeyutils.
Bug: http://b/37991155
Test: builds+boots
Change-Id: I33a3ba0d59ffd504093dc94517815c1196e95e2b
2017-05-09 17:01:04 -07: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
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
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
Daniel Rosenberg
c6bf7c7544 Revert "Revert "Stop dropping caches now we have kernel fix""
This reverts commit 8ad0bef7b5.

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
2017-04-28 23:56:00 +00:00
Yong Yao
b8bb4463e0 Fix keyname generation issue
am: 392c4dbdc1

Change-Id: Iea048673c82dea1d5d9a13a10e1f70376955ca4b
2017-04-26 21:05:18 +00:00
Yong Yao
392c4dbdc1 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>
2017-04-21 11:33:36 -07:00
Daniel Rosenberg
e531126b40 Revert "Stop dropping caches now we have kernel fix"
am: 8ad0bef7b5

Change-Id: I318b956c38175abada5a2423b8d920b299883030
2017-04-20 22:39:16 +00:00
Daniel Rosenberg
8ad0bef7b5 Revert "Stop dropping caches now we have kernel fix"
This reverts commit 6abe6831b5.

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.
2017-04-20 12:38:26 -07:00
cjbao
eb50114a83 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>
2017-04-18 19:57:54 +08:00
Eric Biggers
9f71aa0ebc vold: unlink ext4 encryption keys rather than revoking them
am: fa4039b162

Change-Id: I118ef8b85620f721370e5d26be2d3ef3c2679a8d
2017-04-05 00:31:49 +00:00
Seigo Nonaka
faec65d7c3 Merge "Prepare necessary data directory before loading persistent properties." am: 399bd0866c am: e1f216cc4d
am: cbe1f6b1e4

Change-Id: I864e4151a0b7e1551892d9199883e8783941f7a8
2017-04-05 00:00:05 +00:00
Seigo Nonaka
cbe1f6b1e4 Merge "Prepare necessary data directory before loading persistent properties." am: 399bd0866c
am: e1f216cc4d

Change-Id: I69153c12ca16fcb8381972c70ac7e3e25c050d42
2017-04-04 23:52:12 +00:00
Seigo Nonaka
e1f216cc4d Merge "Prepare necessary data directory before loading persistent properties."
am: 399bd0866c

Change-Id: I4a675722c79bc74bcfc106365a1f056c9b338cc4
2017-04-04 23:46:15 +00:00
Treehugger Robot
399bd0866c Merge "Prepare necessary data directory before loading persistent properties." 2017-04-04 23:34:24 +00:00
Eric Biggers
fa4039b162 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 fd7ba5e4c6)
2017-04-04 22:25:24 +00:00
Seigo Nonaka
cb46b9b0c8 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 e2ef0c0da4)
2017-04-04 15:01:28 -07:00
Jeff Sharkey
a4c0a3b2ca Merge "Abort migration early when not enough space." into oc-dev
am: e6c142174c

Change-Id: I193b962b1288be22fb343c802ac3d2b464748f17
2017-04-04 01:58:25 +00:00