Commit graph

1083 commits

Author SHA1 Message Date
Makoto Onuki
5d268fdac4 Merge "Make sure volume is vfat before fsck'ing." into mnc-dev 2015-06-24 20:33:57 +00:00
Makoto Onuki
c82c9ce18c Make sure volume is vfat before fsck'ing.
Bug 21948137

Change-Id: I6843423fd8809d9e2f352059a810aa17dd83b3e3
2015-06-24 13:30:45 -07:00
Shawn Willden
4fcd2fca22 am 86af3557: Add purpose to vold-generated keymaster1 keys.
* commit '86af3557e3dc0f6e4fa2c0d56f840eb4247f9f4f':
  Add purpose to vold-generated keymaster1 keys.
2015-06-24 17:13:53 +00:00
Shawn Willden
86af3557e3 Add purpose to vold-generated keymaster1 keys.
Also remove the app ID and additional padding and digest options.

Bug: 22009890
Change-Id: Ibff9bbd0e0c11d651d11fac85d4ac907588f1cd2
2015-06-24 09:27:31 -07:00
Jeff Sharkey
b5e680ac37 am bc40cc8f: Add method to forget private partition keys.
* commit 'bc40cc8f07f69e0e26fc41516e2a83f0a8becbe0':
  Add method to forget private partition keys.
2015-06-22 21:33:51 +00:00
Jeff Sharkey
bc40cc8f07 Add method to forget private partition keys.
Report both the disk and the partition GUID for private volumes to
userspace, and offer to forget the encryption key for a given
partition GUID.

Bug: 21782268
Change-Id: Ie77a3a58e47bf3563cdb3e4b0edfab1de4d0e6b4
2015-06-22 14:04:54 -07:00
Shawn Willden
c6c5932cf8 am 0417060e: Use correct error code for rate limiting.
* commit '0417060e8ebfd28171fd0aaef8f4e42d9ddd482e':
  Use correct error code for rate limiting.
2015-06-20 19:32:57 +00:00
Shawn Willden
0417060e8e Use correct error code for rate limiting.
Note that this CL depends on cl 712195, which must be submitted first.

Bug: 21607106
Change-Id: Iafc42d1c8a1145a31ea252b33b404044f92ec62b
2015-06-19 09:14:51 -06:00
Shawn Willden
8087e11655 am da6e899f: Add keymaster1 support to vold.
* commit 'da6e899f4e1429add2ef023e0cc6b0fcca42c945':
  Add keymaster1 support to vold.
2015-06-17 21:07:23 +00:00
Shawn Willden
da6e899f4e Add keymaster1 support to vold.
Bug: 21607106
Change-Id: I498141b90888d4f0652912413b04519f61886935
2015-06-17 10:27:07 -06:00
Paul Lawrence
4cc173e135 am b1ef4665: Improve boot time by 0.1s by reducing a polling sleep interval
* commit 'b1ef4665e8df4abf0f3f134bf3090415fc834606':
  Improve boot time by 0.1s by reducing a polling sleep interval
2015-06-11 21:10:46 +00:00
Paul Lawrence
b1ef4665e8 Improve boot time by 0.1s by reducing a polling sleep interval
Bug: 21516860
Change-Id: I9e28f4d9cc20ec2a7d9e325c02ef85f0ad9b3d60
2015-06-11 11:36:18 -07:00
Jeff Sharkey
b75343ae99 am 210228a0: Merge "Start tracking added users with serial numbers." into mnc-dev
* commit '210228a089cd215bc671b9fb664d869d2c5ad986':
  Start tracking added users with serial numbers.
2015-06-10 17:05:45 +00:00
Jeff Sharkey
210228a089 Merge "Start tracking added users with serial numbers." into mnc-dev 2015-06-10 16:44:54 +00:00
Jeff Sharkey
bd3038df74 Start tracking added users with serial numbers.
vold will eventually use the serial numbers to clean up stale user
directories when mounting private storage devices.

Bug: 20275572
Change-Id: Ia29cb5da23e969f3087bb5caa5dc8f4e88f07613
2015-06-10 09:42:01 -07:00
Paul Lawrence
330f26baea am 3bd36d5e: Remove hex encoding and password adjusting now that patterns are \'1\' based
* commit '3bd36d5e5f14dff4dadba88eb27664e495d0e16e':
  Remove hex encoding and password adjusting now that patterns are '1' based
2015-06-10 16:02:11 +00:00
Paul Lawrence
3bd36d5e5f Remove hex encoding and password adjusting now that patterns are '1' based
Bug: 21606650
Change-Id: I3486ad394d563135c5171a1d4785f7a27eeea3ae
2015-06-10 07:21:19 -07:00
Jeff Sharkey
0eb991ea0a am 34824129: Run restorecon over mounted private volumes.
* commit '34824129de2c4a8bb0d1cb9011beff2c186a87d0':
  Run restorecon over mounted private volumes.
2015-06-09 23:53:35 +00:00
Jeff Sharkey
34824129de Run restorecon over mounted private volumes.
This ensures that we have consistent SELinux policy in place before
going any further, and it mirrors the way we restorecon /data when
first mounted.

Bug: 21121357
Change-Id: I2a7e3584ade655fe1fae8916cf54f9eae3a0f99d
2015-06-09 16:28:44 -07:00
Jeff Sharkey
d6a77b518c am d0640f63: Add f2fs support for private volumes.
* commit 'd0640f6358041f7e2657167560b357078db73526':
  Add f2fs support for private volumes.
2015-06-09 13:01:36 +00:00
Jeff Sharkey
d0640f6358 Add f2fs support for private volumes.
When formatting volumes, pass along fsType string which can be "auto"
to let the volume select the best choice.  For now, private volumes
assume that MMC devices (like SD cards) are best off using f2fs when
both kernel support and tools are present, otherwise fall back to
ext4.  Use blkid when mounting to pick the right set of tools.

Move filesystem utility methods into namespaces and place in separate
directory to be more organized.

Bug: 20275581
Change-Id: Id5f82d8672dda2e9f68c35b075f28232b0b55ed4
2015-06-08 20:21:25 -07:00
Paul Lawrence
5c18a67579 Merge commit 'd0b4295c' into manualmerge
Change-Id: I6d7178edebf50663fa9622b539c8101627a84385
2015-06-04 16:01:47 -07:00
Paul Lawrence
d0b4295ccc Move crypt commands to a different listener in vold
In order to prevent this bug from happening, we must allow vold cryptfs
commands to complete while a long running mount is underway.

While waiting for vold to be changed to a binder interface, we will simply
create two listeners, one for cryptfs and one for everything else.

Bug: 19197175
Change-Id: If74142aa81abd58f718a9de6c9e387f6ea442754
2015-06-04 21:29:01 +00:00
Paul Lawrence
d095d86705 am 0628fa25: Improve boot time
* commit '0628fa25141261e549f06d1c6f9e9f3d29e2b8f0':
  Improve boot time
2015-06-04 19:13:24 +00:00
Paul Lawrence
0628fa2514 Improve boot time
Bug: 21516860
Change-Id: I3153c7f9a414a8eeadc0118f0a642ad8e96c81ce
2015-06-04 10:49:25 -07:00
Elliott Hughes
bb68c6f576 am d25e1074: Merge "Don\'t use TEMP_FAILURE_RETRY on close in vold." into mnc-dev
* commit 'd25e10744026e85e86e22ace8ec939611be3f367':
  Don't use TEMP_FAILURE_RETRY on close in vold.
2015-06-01 16:03:51 +00:00
Paul Lawrence
9a795187ee am 86c942a2: (-s ours) DO NOT MERGE Delete password as per block encryption
* commit '86c942a2537701a90b88768eab4648c0650dfad1':
  DO NOT MERGE Delete password as per block encryption
2015-06-01 16:03:51 +00:00
Paul Lawrence
4efa3d2783 am 0d9cd9e9: DO NOT MERGE Fix problem that reading/writing crypto footers wasn\'t identity
* commit '0d9cd9e9cf39e1cdb06565de6c4e11ff244b2a3a':
  DO NOT MERGE Fix problem that reading/writing crypto footers wasn't identity
2015-06-01 15:44:37 +00:00
Paul Lawrence
ab5741de49 am 2f32cda6: DO NOT MERGE Retry unmounts in ext4 encryption
* commit '2f32cda63bf5c86db880d36029a27c8597fb5e3c':
  DO NOT MERGE Retry unmounts in ext4 encryption
2015-06-01 15:44:37 +00:00
Paul Lawrence
9cea1138cf am b7f0702e: (-s ours) DO NOT MERGE Use default key permissions for ext4enc
* commit 'b7f0702ea6cc32c58540d596016c2dabd8ba3541':
  DO NOT MERGE Use default key permissions for ext4enc
  DO NOT MERGE Simplify password checking logic
2015-06-01 15:44:36 +00:00
Paul Lawrence
7344a7b5af am 368d7945: (-s ours) DO NOT MERGE Enable properties in ext4enc
* commit '368d79459e8d30474dd5cbc414623c1e2f78ee98':
  DO NOT MERGE Enable properties in ext4enc
2015-06-01 15:42:57 +00:00
Paul Lawrence
b2292f0a2c am c78c71b1: (-s ours) DO NOT MERGE Check password is correct by checking hash
* commit 'c78c71b1717613a5be921bbb8ac63c007d4af86a':
  DO NOT MERGE Check password is correct by checking hash
2015-06-01 15:38:09 +00:00
Paul Lawrence
145fc84a79 am fd7db732: (-s ours) DO NOT MERGE New ext4enc kernel switching from xattrs to ioctl
* commit 'fd7db732434eb41fda69a353053bcb7aab259529':
  DO NOT MERGE New ext4enc kernel switching from xattrs to ioctl
2015-06-01 15:28:39 +00:00
Paul Lawrence
d4618a5981 am 731a7a24: (-s ours) DO NOT MERGE Securely encrypt the master key
* commit '731a7a242df6cc3441ac82b4f9521546fac5ac2d':
  DO NOT MERGE Securely encrypt the master key
2015-06-01 15:28:39 +00:00
Elliott Hughes
d25e107440 Merge "Don't use TEMP_FAILURE_RETRY on close in vold." into mnc-dev 2015-05-29 22:04:26 +00:00
Paul Lawrence
86c942a253 DO NOT MERGE Delete password as per block encryption
(cherry-picked from commit 00f4aade5c)

Bug: 18151196
Change-Id: Iee0f932c61ff4a309dc2861725b24bf976adb4c7
2015-05-29 14:22:18 -07:00
Paul Lawrence
0d9cd9e9cf DO NOT MERGE Fix problem that reading/writing crypto footers wasn't identity
(cherry-picked from commit 75c922f49b)

Bug: 18151196
Change-Id: Ideef6bcdbccf068a64ed3e042be50c4837a373f8
2015-05-29 14:21:33 -07:00
Paul Lawrence
2f32cda63b DO NOT MERGE Retry unmounts in ext4 encryption
(cherry-picked from commit 29b54aab8e)

Bug: 18151196
Change-Id: I52ca23b2ce3adcff44bd003d4a12243a0bd6ac34
2015-05-29 14:20:51 -07:00
Paul Lawrence
b7f0702ea6 DO NOT MERGE Use default key permissions for ext4enc
(cherry-picked from commit 1190a26f6d)

As per discussion default permissions are the correct ones.
Note that since we use logon keys, they cannot be read outside
the kernel.

Note also that we limit who can read/write keys in selinux policy.

Bug: 18151196
Change-Id: Icc916f430a70eff22e6b74c20ec361c8f3789c1c
2015-05-29 14:20:06 -07:00
Paul Lawrence
a56d3134b0 DO NOT MERGE Simplify password checking logic
(cherry-picked from commit aaccfac344)

Bug: 18151196
Change-Id: I07ffde534dee7d1032149cfcbaa1a61c5246d759
2015-05-29 14:17:48 -07:00
Paul Lawrence
368d79459e DO NOT MERGE Enable properties in ext4enc
(cherry-picked from 4e7274551c)

Enables OwnerInfo and pattern suppression

Bug: 18151196

Change-Id: I46144e16cb00319deeb5492ab82c67f5dd43d6d3
2015-05-29 14:16:42 -07:00
Paul Lawrence
c78c71b171 DO NOT MERGE Check password is correct by checking hash
(cherry-picked from commit 3ca21e227a)

Handle failures gracefully

Change-Id: Ifb6da8c11a86c50fb11964c18cc1be1326461f78
2015-05-29 14:13:50 -07:00
Paul Lawrence
fd7db73243 DO NOT MERGE New ext4enc kernel switching from xattrs to ioctl
(cherrypicked from commit 5e7f004231)

This is one of three changes to enable this functionality:
  https://android-review.googlesource.com/#/c/146259/
  https://android-review.googlesource.com/#/c/146264/
  https://android-review.googlesource.com/#/c/146265/

Bug: 18151196

Change-Id: Iba5146b8be1e15050ae901e08b3aaa26d96dcf7e
2015-05-29 17:50:43 +00:00
Paul Lawrence
731a7a242d DO NOT MERGE Securely encrypt the master key
(cherry-picked from commit 707fd6c7cc)

Move all key management into vold
Reuse vold's existing key management through the crypto footer
to manage the device wide keys.

Use ro.crypto.type flag to determine crypto type, which prevents
any issues when running in block encrypted mode, as well as speeding
up boot in block or no encryption.

This is one of four changes to enable this functionality:
  https://android-review.googlesource.com/#/c/148586/
  https://android-review.googlesource.com/#/c/148604/
  https://android-review.googlesource.com/#/c/148606/
  https://android-review.googlesource.com/#/c/148607/

Bug: 18151196

Change-Id: I3c68691717a61b5e1df76423ca0c02baff0dab98
2015-05-29 17:25:54 +00:00
Elliott Hughes
4e378be81e Don't use TEMP_FAILURE_RETRY on close in vold.
Bug: http://b/20501816
Change-Id: Ia0a3899947582b8dd0e8e185c203d1ad7dad572e
2015-05-28 22:02:14 -07:00
Jeff Sharkey
a9ae06f092 am 65427f1a: Offer debug flag to force default primary.
* commit '65427f1a805ed2b8ee65a30ecf6ea8b14fe1e02b':
  Offer debug flag to force default primary.
2015-05-20 00:24:56 +00:00
Jeff Sharkey
65427f1a80 Offer debug flag to force default primary.
Useful for transforming a secondary SD card slot into a primary SD
card slot without doing a completely different lunch target.

$ adb shell stop
$ adb shell setprop vold.debug.default_primary 1
$ adb shell setprop ro.vold.primary_physical 1
$ adb shell setprop ctl.restart vold
$ adb shell start

Bug: 21017105
Change-Id: I45aac7ab3bb4c5ac3e0140572844883823fc3e4f
2015-05-19 15:54:15 -07:00
Jeff Sharkey
6e9e89f787 am 721e5807: Fully sync filesystem before time measurements.
* commit '721e5807ed28c7630c0359212cdc0544a9918aa1':
  Fully sync filesystem before time measurements.
2015-05-19 22:51:16 +00:00
Jeff Sharkey
721e5807ed Fully sync filesystem before time measurements.
Also drop unneeded SCR register logging.

Bug: 21172095
Change-Id: I17c5aae2edc0eb7144ab38701f90a1fd54e119da
2015-05-19 11:20:48 -07:00
Elliott Hughes
817409c3d9 am 4351c9a0: Merge "Don\'t use TEMP_FAILURE_RETRY on close in vold." into mnc-dev
* commit '4351c9a08be1d95607e2e5d431692198d60b7d94':
  Don't use TEMP_FAILURE_RETRY on close in vold.
2015-05-16 03:03:46 +00:00