OSDN Git Service

android-x86/system-vold.git
9 years agoresolved conflicts for merge of 88aba541 to lmp-mr1-dev-plus-aosp
Dan Albert [Thu, 18 Dec 2014 22:08:43 +0000 (14:08 -0800)]
resolved conflicts for merge of 88aba541 to lmp-mr1-dev-plus-aosp

Change-Id: Ie5ef819dd8168cb6a73f84a881a92c116705fffc

9 years agoMerge "Fix alignment of buffer used for dm_ioctl."
Dan Albert [Thu, 18 Dec 2014 18:42:15 +0000 (18:42 +0000)]
Merge "Fix alignment of buffer used for dm_ioctl."

9 years agoFix alignment of buffer used for dm_ioctl.
Dan Albert [Thu, 18 Dec 2014 18:00:55 +0000 (10:00 -0800)]
Fix alignment of buffer used for dm_ioctl.

Since the dm_ioctl struct was being allocated on the stack as a large
character array, it was getting character alignment rather than the
proper alignment for the struct. GCC had been getting away with this
so far, but it's undefined behavior that clang managed to expose.

Bug: 18736778
Change-Id: Ied275dfad7fcc41d712b2d02c8a185f499221f57

9 years agoresolved conflicts for merge of 4be36106 to lmp-mr1-dev-plus-aosp
Tim Murray [Thu, 18 Dec 2014 00:41:07 +0000 (16:41 -0800)]
resolved conflicts for merge of 4be36106 to lmp-mr1-dev-plus-aosp

Change-Id: If504710a618d8c3adf85297d5fd2909558ed57a3

9 years agoMerge "Make vold compile with -Werror -Wall."
Tim Murray [Thu, 18 Dec 2014 00:23:26 +0000 (00:23 +0000)]
Merge "Make vold compile with -Werror -Wall."

9 years agoMake vold compile with -Werror -Wall.
Tim Murray [Mon, 15 Dec 2014 19:56:11 +0000 (11:56 -0800)]
Make vold compile with -Werror -Wall.

-Wno-missing-field-initializers is used as well, but that is an
overzealous warning from initializing structs with {0} and not a
real warning.

bug 18736778 and 16868177

Change-Id: Iffde89cd7200d9a11193e1614f1819f9fcace30a

9 years agoam a20bb17e: Merge "Move vold to GCC."
Dan Albert [Sat, 13 Dec 2014 02:17:32 +0000 (02:17 +0000)]
am a20bb17e: Merge "Move vold to GCC."

* commit 'a20bb17e4c6095a77425418d7eb0c1ceb50d05f7':
  Move vold to GCC.

9 years agoMerge "Move vold to GCC."
Dan Albert [Sat, 13 Dec 2014 02:03:13 +0000 (02:03 +0000)]
Merge "Move vold to GCC."

9 years agoMove vold to GCC.
Dan Albert [Sat, 13 Dec 2014 01:47:16 +0000 (17:47 -0800)]
Move vold to GCC.

It looks like clang might have a miscompile that is causing SIGBUS in
`ioctl_init` when the device is encrypted. Move back to GCC until we
can sort this out.

Bug: 18736778
Change-Id: I21ae3b9d7d9ebff8679ecc1a828b7c59f27d0903

9 years agoam acfdc30e: Merge "Fix error in clocks leading to devices staying unlocked" into...
Paul Lawrence [Tue, 2 Dec 2014 18:54:41 +0000 (18:54 +0000)]
am acfdc30e: Merge "Fix error in clocks leading to devices staying unlocked" into lmp-mr1-dev

* commit 'acfdc30e3793512de4b9a5e15da69533735dd8be':
  Fix error in clocks leading to devices staying unlocked

9 years agoam d44a8f59: Merge "Fix encrypt-and-wipe" into lmp-mr1-dev
Paul Lawrence [Tue, 2 Dec 2014 18:45:42 +0000 (18:45 +0000)]
am d44a8f59: Merge "Fix encrypt-and-wipe" into lmp-mr1-dev

* commit 'd44a8f59a7518b87a3fe4174c78dfb9727e63f89':
  Fix encrypt-and-wipe

9 years agoam b25302e1: Do not log passwords returned through vdc
Paul Lawrence [Tue, 2 Dec 2014 18:45:42 +0000 (18:45 +0000)]
am b25302e1: Do not log passwords returned through vdc

* commit 'b25302e1b0232ac2f9d6ffa441f2ab1ff23a2de3':
  Do not log passwords returned through vdc

9 years agoMerge "Fix error in clocks leading to devices staying unlocked" into lmp-mr1-dev
Paul Lawrence [Tue, 2 Dec 2014 18:34:14 +0000 (18:34 +0000)]
Merge "Fix error in clocks leading to devices staying unlocked" into lmp-mr1-dev

9 years agoMerge "Fix encrypt-and-wipe" into lmp-mr1-dev
Paul Lawrence [Tue, 2 Dec 2014 18:20:04 +0000 (18:20 +0000)]
Merge "Fix encrypt-and-wipe" into lmp-mr1-dev

9 years agoDo not log passwords returned through vdc
Paul Lawrence [Tue, 11 Nov 2014 20:26:09 +0000 (12:26 -0800)]
Do not log passwords returned through vdc

Requires framework change:
  https://googleplex-android-review.git.corp.google.com/#/c/585511/

Bug: 18260068
Change-Id: I95d3bb39404ede7128b8f5d61ce2423a5f09a9b8

9 years agoFix error in clocks leading to devices staying unlocked
Paul Lawrence [Tue, 11 Nov 2014 20:47:03 +0000 (12:47 -0800)]
Fix error in clocks leading to devices staying unlocked

Use BOOTTIME consistently!

Bug: 18246810
Change-Id: I630bf39f72ab69f971d2f772e8d4545ffe467b82

9 years agoFix encrypt-and-wipe
Paul Lawrence [Tue, 25 Nov 2014 22:57:32 +0000 (14:57 -0800)]
Fix encrypt-and-wipe

encrypt-and-wipe was broken when checks were added that encryption succeeded
which assumed a 'normal' full encrypt traversing the device.

encrypt-and-wipe doesn't traverse, it just lays down a file system over
the encrypted device, so in this mode do not check the amount encrypted -
it will always be 0.

Bug: 18511900
Change-Id: Icb1d7e0cdb67abd2eac0ab3cbfc1a88912768f9d

9 years agoam bb7d9afe: fall back to dm-crypt if device already encrypted
Iliyan Malchev [Fri, 21 Nov 2014 08:56:42 +0000 (08:56 +0000)]
am bb7d9afe: fall back to dm-crypt if device already encrypted

* commit 'bb7d9afea9479eabbc98133d3d968225a1e1019e':
  fall back to dm-crypt if device already encrypted

9 years agoresolved conflicts for merge of 87701e27 to lmp-mr1-dev-plus-aosp
Iliyan Malchev [Fri, 21 Nov 2014 08:52:40 +0000 (00:52 -0800)]
resolved conflicts for merge of 87701e27 to lmp-mr1-dev-plus-aosp

Change-Id: Ie873baff626fe786515497f2e81aa9db2329168d

9 years agofall back to dm-crypt if device already encrypted
Iliyan Malchev [Fri, 21 Nov 2014 02:42:23 +0000 (18:42 -0800)]
fall back to dm-crypt if device already encrypted

Devices already encrypted with aes-cbc-essiv:sha256 will continue to be
decrypted in software, until a factory data reset.  New devices that
implement CONFIG_HW_DISK_ENCRYPTION will switch to aes-xts.

b/17475056 Enable hardware crypto for userdata encryption

Change-Id: I62d1583bdaf7ff06b87e386e758fa3b18c719bca
Signed-off-by: Iliyan Malchev <malchev@google.com>
9 years agoAdding support of dm-req-crypt
Ajay Dudani [Thu, 18 Sep 2014 04:02:52 +0000 (21:02 -0700)]
Adding support of dm-req-crypt

Currently Android provides disk encryption support using dm-crypt
which is based on bios. dm-crypt uses 512 bytes packet size for
crypto operations. While 512 bytes size packet is ok for SW based
disk encryption, it is inefficient for HW based crypto engines.
dm-req-crypt is similar to dm-crypt except it uses block requests
rathe bios for crypto operations. block requests when unpacked
carries data upto 512KB. Hence, HW based crypto engine can be used
more efficiently.

Also move create disk encryption key before framework start as
HW based disk encryption creates key in secure side. Key creation
can take sometime to create the key securely. If framework is
started before creating the key, it is possible that framework
requests service from secure side. Secure side can serve mostly one
request at a time. Secure side may reject framework request if key
creation request is still going on. This may cause problem in the
system

b/17475056 Enable hardware crypto for userdata encryption

Change-Id: I5480ab72a37c02532218a18faaba598a824589fd
Signed-off-by: Iliyan Malchev <malchev@google.com>
9 years agoam 89bcc638: am 36859212: Merge "Move vold to libc++."
Dan Albert [Thu, 6 Nov 2014 00:18:54 +0000 (00:18 +0000)]
am 89bcc638: am 36859212: Merge "Move vold to libc++."

* commit '89bcc638ab24af7bee0ff3ccfa190a08b721f0a4':
  Move vold to libc++.

9 years agoam a05cb413: am 460a93a6: Merge "Move vold to clang so ASAN_ALL works."
Dan Albert [Thu, 6 Nov 2014 00:18:53 +0000 (00:18 +0000)]
am a05cb413: am 460a93a6: Merge "Move vold to clang so ASAN_ALL works."

* commit 'a05cb41300b652e6125c6df42d4aa756101e6e72':
  Move vold to clang so ASAN_ALL works.

9 years agoam 36859212: Merge "Move vold to libc++."
Dan Albert [Thu, 6 Nov 2014 00:15:12 +0000 (00:15 +0000)]
am 36859212: Merge "Move vold to libc++."

* commit '36859212614fd112e08dcf92065ee6db910769bb':
  Move vold to libc++.

9 years agoam 460a93a6: Merge "Move vold to clang so ASAN_ALL works."
Dan Albert [Thu, 6 Nov 2014 00:15:12 +0000 (00:15 +0000)]
am 460a93a6: Merge "Move vold to clang so ASAN_ALL works."

* commit '460a93a6d4d01bf0efa83acea0c84b4d43ab23c9':
  Move vold to clang so ASAN_ALL works.

9 years agoMerge "Move vold to libc++."
Dan Albert [Thu, 6 Nov 2014 00:12:48 +0000 (00:12 +0000)]
Merge "Move vold to libc++."

9 years agoMove vold to libc++.
Dan Albert [Wed, 5 Nov 2014 22:48:45 +0000 (14:48 -0800)]
Move vold to libc++.

Bug: 15193147
Change-Id: Ib868f1ed8145ca5cbfdb4cd60ed0c47a6182ac62

9 years agoModify vold to check for hardware keymaster.
Shawn Willden [Wed, 5 Nov 2014 18:03:47 +0000 (18:03 +0000)]
Modify vold to check for hardware keymaster.
automerge: 7c49ab0

* commit '7c49ab0a0b3c1ee9b24a4b0b1a2c0a8c86acea41':
  Modify vold to check for hardware keymaster.

9 years agoModify vold to check for hardware keymaster.
Shawn Willden [Thu, 30 Oct 2014 14:12:32 +0000 (08:12 -0600)]
Modify vold to check for hardware keymaster.

vold should only use hardware keymaster implementations to protect the
disk encryption key, because there's little value in using the software
implementation.  More importantly, if we allow vold to use softkeymaster
in the absence of a HW keymaster and (somehow) a HW keymaster is added
to a device, the HW version will be loaded, and will be unable to use
the softkeymaster key found in the crypto footer, forcing a factory
reset.

This CL will not break devices without HW keymaster, because
softkeymaster currently reports its keys as non-standalone (which isn't
correct).  After this CL is in, I will fix softkeymaster.

Bug: 17362157
Change-Id: I98b169e7a59ff7d44b72069b87743463ec823ea2

9 years agoMerge "Make persistent field in cryptofs support longer values." into lmp-mr1-dev
Rubin Xu [Thu, 30 Oct 2014 18:59:11 +0000 (18:59 +0000)]
Merge "Make persistent field in cryptofs support longer values." into lmp-mr1-dev
automerge: 13c3a90

* commit '13c3a90b586d272b391bd0e2795717db75a4d853':
  Make persistent field in cryptofs support longer values.

9 years agoMerge "Make persistent field in cryptofs support longer values." into lmp-mr1-dev
Rubin Xu [Wed, 29 Oct 2014 15:41:23 +0000 (15:41 +0000)]
Merge "Make persistent field in cryptofs support longer values." into lmp-mr1-dev

9 years agoam 096dd2dd: am ab083da0: Merge "Set SELinux contexts on device nodes created by...
Nick Kralevich [Wed, 29 Oct 2014 07:00:56 +0000 (07:00 +0000)]
am 096dd2dd: am ab083da0: Merge "Set SELinux contexts on device nodes created by vold."

* commit '096dd2dd8c0294253c4b88b2c02715bf56e0287c':

9 years agoam 9b5a3812: cryptfs: [HACK] reboot if the crypto block dev failed to open automerge...
JP Abgrall [Wed, 29 Oct 2014 07:00:56 +0000 (07:00 +0000)]
am 9b5a3812: cryptfs: [HACK] reboot if the crypto block dev failed to open automerge: 512f0d5

* commit '9b5a381241ff503ba05f5622927633b8527dadf5':

9 years agoam 4c9b4d8c: am 7776871d: cryptfs: extra debugging around crypto blockdev dm-......
JP Abgrall [Wed, 29 Oct 2014 07:00:55 +0000 (07:00 +0000)]
am 4c9b4d8c: am 7776871d: cryptfs: extra debugging around crypto blockdev dm-... errors.

* commit '4c9b4d8c978433b4810c0449d4f376dbf7e74ab9':

9 years agoam fd2180a9: am fc615041: Remove possibility of zero chars from passwords
Paul Lawrence [Wed, 29 Oct 2014 07:00:55 +0000 (07:00 +0000)]
am fd2180a9: am fc615041: Remove possibility of zero chars from passwords

* commit 'fd2180a97289732520328c69150419763ced48c1':

9 years agoam 6bcac81e: am 7639a6ab: Merge "Reset failed decryption count on successful decrypti...
Paul Lawrence [Wed, 29 Oct 2014 07:00:55 +0000 (07:00 +0000)]
am 6bcac81e: am 7639a6ab: Merge "Reset failed decryption count on successful decryptions" into lmp-dev

* commit '6bcac81e6a8db504dc32d89907f847b5a9118817':

9 years agoam b69a5e44: am 6e8440fd: cryptfs: kill processes with open files on tmpfs /data
Greg Hackmann [Wed, 29 Oct 2014 07:00:54 +0000 (07:00 +0000)]
am b69a5e44: am 6e8440fd: cryptfs: kill processes with open files on tmpfs /data

* commit 'b69a5e44db9b7ecf39b9441115f3470554062157':

9 years agoam f2eabef8: am 9c58a871: Use monotonic clock for cryptfs progress
Paul Lawrence [Wed, 29 Oct 2014 07:00:54 +0000 (07:00 +0000)]
am f2eabef8: am 9c58a871: Use monotonic clock for cryptfs progress

* commit 'f2eabef83f4a32de1d0670d053a4d6bac787cd4b':

9 years agoam e46f7122: am 3574b085: Merge "cryptfs: log umount() failure reason" into lmp-dev
Greg Hackmann [Wed, 29 Oct 2014 07:00:53 +0000 (07:00 +0000)]
am e46f7122: am 3574b085: Merge "cryptfs: log umount() failure reason" into lmp-dev

* commit 'e46f7122e002539cdfb1d83baac3652b88528455':

9 years agoam e2a470f3: am 46a3a79a: Merge "print information about opened files when failed...
Greg Hackmann [Wed, 29 Oct 2014 07:00:53 +0000 (07:00 +0000)]
am e2a470f3: am 46a3a79a: Merge "print information about opened files when failed unmount" into lmp-dev

* commit 'e2a470f3980a824e8f5ba92fd8356336c7161463':

9 years agoam 640aa862: am dd1a8040: Include reason when wiping data.
Jeff Sharkey [Wed, 29 Oct 2014 07:00:52 +0000 (07:00 +0000)]
am 640aa862: am dd1a8040: Include reason when wiping data.

* commit '640aa86222c40553a2540c6cf9e840d13e750e30':

9 years agoam 7df812df: am 3846be17: Reduce cryptfs logspam
Paul Lawrence [Wed, 29 Oct 2014 07:00:52 +0000 (07:00 +0000)]
am 7df812df: am 3846be17: Reduce cryptfs logspam

* commit '7df812dfaa6c82865efb0511f2da1adb601829b2':

9 years agoam b707d72a: am 6efa9351: Merge "Don\'t use deprecated OpenSSL functions."
Alex Klyubin [Wed, 29 Oct 2014 07:00:52 +0000 (07:00 +0000)]
am b707d72a: am 6efa9351: Merge "Don\'t use deprecated OpenSSL functions."

* commit 'b707d72a33c8e442cafb36f724245f1c9898fb36':

9 years agoMake persistent field in cryptofs support longer values.
Rubin Xu [Mon, 13 Oct 2014 11:49:54 +0000 (12:49 +0100)]
Make persistent field in cryptofs support longer values.

Store long field values in multiple underlying fixed-length entries
and concatenate them together when reading back.

Bug: 17556485
Change-Id: I2f8033d18c208993fa1b010712be0dad5d8b646b

9 years agoMerge "Move vold to clang so ASAN_ALL works."
Dan Albert [Tue, 21 Oct 2014 23:09:07 +0000 (23:09 +0000)]
Merge "Move vold to clang so ASAN_ALL works."

9 years agoMove vold to clang so ASAN_ALL works.
Dan Albert [Tue, 21 Oct 2014 18:02:33 +0000 (11:02 -0700)]
Move vold to clang so ASAN_ALL works.

ASAN_ALL uses ASAN for anything built with clang. Since some of vold's
dependencies use clang, they will have unresolved ASAN symbols unless
vold is also built with clang. There's no harm in just moving this
project to clang.

Change-Id: Ia6f412beb7bf092121bff2a5a980531636adcdb9

9 years agoam ab083da0: Merge "Set SELinux contexts on device nodes created by vold."
Nick Kralevich [Sat, 18 Oct 2014 23:09:09 +0000 (23:09 +0000)]
am ab083da0: Merge "Set SELinux contexts on device nodes created by vold."

* commit 'ab083da069a73f787a9304e155c0ab847c85377f':
  Set SELinux contexts on device nodes created by vold.

9 years agoam ab083da0: Merge "Set SELinux contexts on device nodes created by vold."
Nick Kralevich [Sat, 18 Oct 2014 23:08:54 +0000 (23:08 +0000)]
am ab083da0: Merge "Set SELinux contexts on device nodes created by vold."

* commit 'ab083da069a73f787a9304e155c0ab847c85377f':
  Set SELinux contexts on device nodes created by vold.

9 years agoMerge "Set SELinux contexts on device nodes created by vold."
Nick Kralevich [Sat, 18 Oct 2014 23:02:30 +0000 (23:02 +0000)]
Merge "Set SELinux contexts on device nodes created by vold."

9 years agoam ada1f929: am 512f0d52: cryptfs: [HACK] reboot if the crypto block dev failed to...
JP Abgrall [Fri, 17 Oct 2014 19:12:11 +0000 (19:12 +0000)]
am ada1f929: am 512f0d52: cryptfs: [HACK] reboot if the crypto block dev failed to open

* commit 'ada1f9290fc266f5277fbed88b02faf2a4f93ff8':
  cryptfs: [HACK] reboot if the crypto block dev failed to open

9 years agoam 0f3e09cb: resolved conflicts for merge of 7776871d to lmp-mr1-dev
JP Abgrall [Fri, 17 Oct 2014 18:59:31 +0000 (18:59 +0000)]
am 0f3e09cb: resolved conflicts for merge of 7776871d to lmp-mr1-dev

* commit '0f3e09cb9c5adbdae140694e519cf9a8b241f1ba':
  cryptfs: extra debugging around crypto blockdev dm-... errors.

9 years agoam 512f0d52: cryptfs: [HACK] reboot if the crypto block dev failed to open
JP Abgrall [Fri, 17 Oct 2014 18:50:39 +0000 (18:50 +0000)]
am 512f0d52: cryptfs: [HACK] reboot if the crypto block dev failed to open

* commit '512f0d52ac5f85b327872e085d9fe6f02517eadf':
  cryptfs: [HACK] reboot if the crypto block dev failed to open

9 years agoresolved conflicts for merge of 7776871d to lmp-mr1-dev
JP Abgrall [Fri, 17 Oct 2014 18:41:56 +0000 (11:41 -0700)]
resolved conflicts for merge of 7776871d to lmp-mr1-dev

This change was already in lmp-mr1-dev

9 years agocryptfs: [HACK] reboot if the crypto block dev failed to open
JP Abgrall [Fri, 17 Oct 2014 00:21:22 +0000 (00:21 +0000)]
cryptfs: [HACK] reboot if the crypto block dev failed to open
automerge: 512f0d5

* commit '512f0d52ac5f85b327872e085d9fe6f02517eadf':
  cryptfs: [HACK] reboot if the crypto block dev failed to open

9 years agoam 7776871d: cryptfs: extra debugging around crypto blockdev dm-... errors.
JP Abgrall [Thu, 16 Oct 2014 21:01:28 +0000 (21:01 +0000)]
am 7776871d: cryptfs: extra debugging around crypto blockdev dm-... errors.

* commit '7776871d82050bac3e6bb307a68caef973305516':
  cryptfs: extra debugging around crypto blockdev dm-... errors.

9 years agocryptfs: [HACK] reboot if the crypto block dev failed to open
JP Abgrall [Sat, 11 Oct 2014 01:43:41 +0000 (18:43 -0700)]
cryptfs: [HACK] reboot if the crypto block dev failed to open

There are cases where the /dev/block/dm-0 fails to open.
This leads to the device not completing the boot up sequence.
Currently, the only way out is to reboot.

Bug: 17898962
Change-Id: If4583ebb1ef1ebdbaf680d69b876459aaec2f4ce
(cherry picked from commit 7fc1de8a44307d6c51826ab90f804702e08d1e6d)

9 years agoam 7fc1de8a: cryptfs: [HACK] reboot if the crypto block dev failed to open
JP Abgrall [Mon, 13 Oct 2014 20:36:52 +0000 (20:36 +0000)]
am 7fc1de8a: cryptfs: [HACK] reboot if the crypto block dev failed to open

* commit '7fc1de8a44307d6c51826ab90f804702e08d1e6d':
  cryptfs: [HACK] reboot if the crypto block dev failed to open

9 years agoam 3334c6a1: cryptfs: extra debugging around crypto blockdev dm-... errors.
JP Abgrall [Mon, 13 Oct 2014 19:07:27 +0000 (19:07 +0000)]
am 3334c6a1: cryptfs: extra debugging around crypto blockdev dm-... errors.

* commit '3334c6a1ae38b2c7886fc9c0a69467e586af8635':
  cryptfs: extra debugging around crypto blockdev dm-... errors.

9 years agocryptfs: [HACK] reboot if the crypto block dev failed to open
JP Abgrall [Sat, 11 Oct 2014 01:43:41 +0000 (18:43 -0700)]
cryptfs: [HACK] reboot if the crypto block dev failed to open

There are cases where the /dev/block/dm-0 fails to open.
This leads to the device not completing the boot up sequence.
Currently, the only way out is to reboot.

Bug: 17898962
Change-Id: If4583ebb1ef1ebdbaf680d69b876459aaec2f4ce

9 years agocryptfs: extra debugging around crypto blockdev dm-... errors.
JP Abgrall [Fri, 10 Oct 2014 22:52:11 +0000 (15:52 -0700)]
cryptfs: extra debugging around crypto blockdev dm-... errors.

Some times the /dev/block/dm-0 fails to open after it has been setup.
Log why.

Bug: 17576594
Bug: 17942270
Change-Id: If0bbfe22d84137f2029bacb10873832038f0d36c

9 years agocryptfs: extra debugging around crypto blockdev dm-... errors.
JP Abgrall [Fri, 10 Oct 2014 22:52:11 +0000 (15:52 -0700)]
cryptfs: extra debugging around crypto blockdev dm-... errors.

Some times the /dev/block/dm-0 fails to open after it has been setup.
Log why.

Bug: 17576594
Bug: 17942270
Change-Id: If0bbfe22d84137f2029bacb10873832038f0d36c

9 years agoam fc615041: Remove possibility of zero chars from passwords
Paul Lawrence [Tue, 7 Oct 2014 00:34:56 +0000 (00:34 +0000)]
am fc615041: Remove possibility of zero chars from passwords

* commit 'fc61504166d4377a1f83211c236ca11260da1261':
  Remove possibility of zero chars from passwords

9 years agoam fc615041: Remove possibility of zero chars from passwords
Paul Lawrence [Mon, 6 Oct 2014 22:49:36 +0000 (22:49 +0000)]
am fc615041: Remove possibility of zero chars from passwords

* commit 'fc61504166d4377a1f83211c236ca11260da1261':
  Remove possibility of zero chars from passwords

9 years agoRemove possibility of zero chars from passwords
Paul Lawrence [Sat, 4 Oct 2014 22:32:29 +0000 (15:32 -0700)]
Remove possibility of zero chars from passwords

scrypt pads the password with zeros. Our patterns use 0 to represent
the top left dot. So patterns that end there are equivalent to ones
that end one short.

After much thought, the best solution is to change the way we
represent patterns in keyguard. This, however, is a big change.

The short term solution is to change the pattern representation in vold
so that we are storing the correct thing. Later we will change keyguard
to handle patterns correctly and remove quite a few hacks from vold
(use of hex, this code). b/17840293 created to track this.

Bug: 17751714
Change-Id: I30cdffb0f0db406d2e2b6c54d4153d120d975318

9 years agoam 7639a6ab: Merge "Reset failed decryption count on successful decryptions" into...
Paul Lawrence [Sun, 5 Oct 2014 23:38:39 +0000 (23:38 +0000)]
am 7639a6ab: Merge "Reset failed decryption count on successful decryptions" into lmp-dev

* commit '7639a6ab60426bbfa57c750c1ff0b4016cad0294':
  Reset failed decryption count on successful decryptions

9 years agoam 7639a6ab: Merge "Reset failed decryption count on successful decryptions" into...
Paul Lawrence [Sun, 5 Oct 2014 23:27:41 +0000 (23:27 +0000)]
am 7639a6ab: Merge "Reset failed decryption count on successful decryptions" into lmp-dev

* commit '7639a6ab60426bbfa57c750c1ff0b4016cad0294':
  Reset failed decryption count on successful decryptions

9 years agoMerge "Reset failed decryption count on successful decryptions" into lmp-dev
Paul Lawrence [Sun, 5 Oct 2014 23:24:46 +0000 (23:24 +0000)]
Merge "Reset failed decryption count on successful decryptions" into lmp-dev

9 years agoReset failed decryption count on successful decryptions
Paul Lawrence [Sun, 5 Oct 2014 19:57:37 +0000 (12:57 -0700)]
Reset failed decryption count on successful decryptions

Bug: 17866359
Change-Id: I1af2ff1ac4f5243afba0cfa2f2d3a1d0b029091b

9 years agoam 6e8440fd: cryptfs: kill processes with open files on tmpfs /data
Greg Hackmann [Fri, 3 Oct 2014 06:16:58 +0000 (06:16 +0000)]
am 6e8440fd: cryptfs: kill processes with open files on tmpfs /data

* commit '6e8440fd5072a673dd861ffb531fc17b4673ad90':
  cryptfs: kill processes with open files on tmpfs /data

9 years agoam 9c58a871: Use monotonic clock for cryptfs progress
Paul Lawrence [Fri, 3 Oct 2014 06:16:57 +0000 (06:16 +0000)]
am 9c58a871: Use monotonic clock for cryptfs progress

* commit '9c58a871f9fb356409d3b90734bf706d1463f041':
  Use monotonic clock for cryptfs progress

9 years agoam 6e8440fd: cryptfs: kill processes with open files on tmpfs /data
Greg Hackmann [Fri, 3 Oct 2014 03:54:44 +0000 (03:54 +0000)]
am 6e8440fd: cryptfs: kill processes with open files on tmpfs /data

* commit '6e8440fd5072a673dd861ffb531fc17b4673ad90':
  cryptfs: kill processes with open files on tmpfs /data

9 years agocryptfs: kill processes with open files on tmpfs /data
Greg Hackmann [Fri, 3 Oct 2014 00:18:20 +0000 (17:18 -0700)]
cryptfs: kill processes with open files on tmpfs /data

cryptfs will fail to remount /data at boot if any processes (e.g.
dex2oat) have files open on the tmpfs /data partition.  Since these
files are about to be destroyed anyway, just kill the offending
processes: first with SIGHUP and finally with SIGKILL.

Also remove a stray i++ that effectively cut the number of retries in
half.

Bug: 17576594

Change-Id: I76fb90ce2e52846ffb9de706e52b7bde98b4186a
Signed-off-by: Greg Hackmann <ghackmann@google.com>
9 years agoSet SELinux contexts on device nodes created by vold.
Stephen Smalley [Tue, 30 Sep 2014 14:29:24 +0000 (10:29 -0400)]
Set SELinux contexts on device nodes created by vold.

Extend vold to look up and set SELinux contexts on the
device nodes it creates for extra loop devices and for volumes.
Prior to this change, these device nodes simply inherited the type
of their parent directory /dev/block, i.e. block_device, and vold
therefore required create_file perms to block_device:blk_file.
With this change we can scope vold down to accessing specific
block device types.

This depends on change Id3bea28f5958086716cd3db055bea309b3b5fa5a
to allow vold to use setfscreatecon().

Change-Id: Ib9e8294abb1da94d92503947603ec12e802ff08c
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
9 years agoam 9c58a871: Use monotonic clock for cryptfs progress
Paul Lawrence [Tue, 30 Sep 2014 18:19:43 +0000 (18:19 +0000)]
am 9c58a871: Use monotonic clock for cryptfs progress

* commit '9c58a871f9fb356409d3b90734bf706d1463f041':
  Use monotonic clock for cryptfs progress

9 years agoUse monotonic clock for cryptfs progress
Paul Lawrence [Tue, 30 Sep 2014 16:12:51 +0000 (09:12 -0700)]
Use monotonic clock for cryptfs progress

Otherwise we get strange results when the time changes. Worst
effect is that the encryption takes a lot longer since we are
calling the logging code far more frequently.

Bug: 17625981
Change-Id: Ice29f28b3720e9e4a1ea28e45eeab574d1959ec1

9 years agoam 3574b085: Merge "cryptfs: log umount() failure reason" into lmp-dev
Greg Hackmann [Fri, 26 Sep 2014 00:21:50 +0000 (00:21 +0000)]
am 3574b085: Merge "cryptfs: log umount() failure reason" into lmp-dev

* commit '3574b085f46a5b22ee660a9fd3ef727a20c106ee':
  cryptfs: log umount() failure reason

9 years agoam 46a3a79a: Merge "print information about opened files when failed unmount" into...
Greg Hackmann [Fri, 26 Sep 2014 00:21:49 +0000 (00:21 +0000)]
am 46a3a79a: Merge "print information about opened files when failed unmount" into lmp-dev

* commit '46a3a79a8f6b8b8eb66b1194a1a56b0ddcd4943b':
  print information about opened files when failed unmount

9 years agoam dd1a8040: Include reason when wiping data.
Jeff Sharkey [Fri, 26 Sep 2014 00:21:49 +0000 (00:21 +0000)]
am dd1a8040: Include reason when wiping data.

* commit 'dd1a8040e8449cc0e8b861a23e0339a43d80593c':
  Include reason when wiping data.

9 years agoam 3574b085: Merge "cryptfs: log umount() failure reason" into lmp-dev
Greg Hackmann [Wed, 24 Sep 2014 23:35:42 +0000 (23:35 +0000)]
am 3574b085: Merge "cryptfs: log umount() failure reason" into lmp-dev

* commit '3574b085f46a5b22ee660a9fd3ef727a20c106ee':
  cryptfs: log umount() failure reason

9 years agoam 46a3a79a: Merge "print information about opened files when failed unmount" into...
Greg Hackmann [Wed, 24 Sep 2014 23:35:42 +0000 (23:35 +0000)]
am 46a3a79a: Merge "print information about opened files when failed unmount" into lmp-dev

* commit '46a3a79a8f6b8b8eb66b1194a1a56b0ddcd4943b':
  print information about opened files when failed unmount

9 years agoam dd1a8040: Include reason when wiping data.
Jeff Sharkey [Wed, 24 Sep 2014 23:35:41 +0000 (23:35 +0000)]
am dd1a8040: Include reason when wiping data.

* commit 'dd1a8040e8449cc0e8b861a23e0339a43d80593c':
  Include reason when wiping data.

9 years agoMerge "cryptfs: log umount() failure reason" into lmp-dev
Greg Hackmann [Wed, 24 Sep 2014 23:32:00 +0000 (23:32 +0000)]
Merge "cryptfs: log umount() failure reason" into lmp-dev

9 years agoMerge "print information about opened files when failed unmount" into lmp-dev
Greg Hackmann [Wed, 24 Sep 2014 23:31:50 +0000 (23:31 +0000)]
Merge "print information about opened files when failed unmount" into lmp-dev

9 years agocryptfs: log umount() failure reason
Greg Hackmann [Wed, 24 Sep 2014 21:55:20 +0000 (14:55 -0700)]
cryptfs: log umount() failure reason

Bug: 17576594

Change-Id: I7320aa597210896b4db6e663e1b2cb0c24d96557
Signed-off-by: Greg Hackmann <ghackmann@google.com>
9 years agoprint information about opened files when failed unmount
jessica_yu [Mon, 22 Sep 2014 07:57:40 +0000 (15:57 +0800)]
print information about opened files when failed unmount

Change-Id: I88ae719cdae490433390d624f75612a9f4f96677

Cryptfs : Enabling support for allow_discards in dmcrypt.
Cryptfs : Password matches
Cryptfs : test_mount_encrypted_fs(): Master key saved
TrustyKeymaster: Creating device
TrustyKeymaster: Device address: 0x7f8f416100
Cryptfs : keymaster version is 3
Cryptfs : Just asked init to shut down class main
ServiceManager: service 'drm.drmManager' died
ServiceManager: service 'media.audio_flinger' died
ServiceManager: service 'media.player' died
ServiceManager: service 'media.camera' died
ServiceManager: service 'android.security.keystore' died
Cryptfs : unmounting /data failed

Bug: 17576594

9 years agoInclude reason when wiping data.
Jeff Sharkey [Wed, 24 Sep 2014 18:46:51 +0000 (11:46 -0700)]
Include reason when wiping data.

This will help us track down who requested a data wipe.

Bug: 17412160
Change-Id: I5ab39a4de03c973ed151d703d6462a172ee043fd

9 years agoam 3846be17: Reduce cryptfs logspam
Paul Lawrence [Tue, 23 Sep 2014 17:05:56 +0000 (17:05 +0000)]
am 3846be17: Reduce cryptfs logspam

* commit '3846be17feba13150a5db22204622db6a762a0d8':
  Reduce cryptfs logspam

9 years agoam 3846be17: Reduce cryptfs logspam
Paul Lawrence [Tue, 23 Sep 2014 16:23:06 +0000 (16:23 +0000)]
am 3846be17: Reduce cryptfs logspam

* commit '3846be17feba13150a5db22204622db6a762a0d8':
  Reduce cryptfs logspam

9 years agoReduce cryptfs logspam
Paul Lawrence [Mon, 22 Sep 2014 18:33:54 +0000 (11:33 -0700)]
Reduce cryptfs logspam

Bug: 17572886
Change-Id: I91302ccc284e0f908299852650db5bf645f2ff71

9 years agoam 6efa9351: Merge "Don\'t use deprecated OpenSSL functions."
Alex Klyubin [Fri, 19 Sep 2014 23:17:02 +0000 (23:17 +0000)]
am 6efa9351: Merge "Don\'t use deprecated OpenSSL functions."

* commit '6efa9351a257edc53ce07eb8c544ccf08efb64ae':
  Don't use deprecated OpenSSL functions.

9 years agoam 6efa9351: Merge "Don\'t use deprecated OpenSSL functions."
Alex Klyubin [Fri, 19 Sep 2014 23:02:26 +0000 (23:02 +0000)]
am 6efa9351: Merge "Don\'t use deprecated OpenSSL functions."

* commit '6efa9351a257edc53ce07eb8c544ccf08efb64ae':
  Don't use deprecated OpenSSL functions.

9 years agoMerge "Don't use deprecated OpenSSL functions."
Alex Klyubin [Fri, 19 Sep 2014 22:41:09 +0000 (22:41 +0000)]
Merge "Don't use deprecated OpenSSL functions."

9 years agoam 8e3f4510: HACK: Retry/reboot when mount reports busy.
Paul Lawrence [Fri, 12 Sep 2014 23:21:11 +0000 (23:21 +0000)]
am 8e3f4510: HACK: Retry/reboot when mount reports busy.

* commit '8e3f4510a88871a2d489ca4cdf7b738d4229053d':
  HACK: Retry/reboot when mount reports busy.

9 years agoresolved conflicts for merge of 2b2a0bec to lmp-dev-plus-aosp
Dan Albert [Fri, 12 Sep 2014 20:05:56 +0000 (13:05 -0700)]
resolved conflicts for merge of 2b2a0bec to lmp-dev-plus-aosp

Change-Id: I224499833777ef80d85c1199f475f5ed1568d053

9 years agoMerge "Remove makefile cruft."
Dan Albert [Fri, 12 Sep 2014 18:07:50 +0000 (18:07 +0000)]
Merge "Remove makefile cruft."

9 years agoHACK: Retry/reboot when mount reports busy.
Paul Lawrence [Mon, 8 Sep 2014 17:11:17 +0000 (10:11 -0700)]
HACK: Retry/reboot when mount reports busy.

This is a hack because we don't know why mount() reports busy.

Requires dependent change in syste/core:
  https://googleplex-android-review.git.corp.google.com/#/c/543125/

Bug: 17358530

Change-Id: I8d3078bc68f8c450adce2c3a4101b6a958f1c4a0

9 years agoRemove makefile cruft.
Dan Albert [Fri, 12 Sep 2014 17:48:12 +0000 (10:48 -0700)]
Remove makefile cruft.

Don't manually include stlport, and don't use private bionic headers.

Change-Id: I44dd212fdd5874e625890c548e9d7bf3a9c27912

9 years agoam 7e17e2d2: Don\'t worry about battery levels when encrypting
Paul Lawrence [Wed, 10 Sep 2014 22:58:38 +0000 (22:58 +0000)]
am 7e17e2d2: Don\'t worry about battery levels when encrypting

* commit '7e17e2d226783a2e065a194e60c061c255cebaae':
  Don't worry about battery levels when encrypting

9 years agoDon't worry about battery levels when encrypting
Paul Lawrence [Tue, 9 Sep 2014 21:47:53 +0000 (14:47 -0700)]
Don't worry about battery levels when encrypting

This is a deliberately minimalistic change. There is another
defect to remove all this code - removing some of it will (IMO)
simply confuse the issue.

Bug: 16868177
Bug: 17180951
Change-Id: I57d7a4fb3a881d62eb73419cd639a6e3ca567f91

9 years agoam e17a9c4a: Change cryptfs keymaster padding to ensure the high bit is never 1,...
Shawn Willden [Tue, 9 Sep 2014 16:34:09 +0000 (16:34 +0000)]
am e17a9c4a: Change cryptfs keymaster padding to ensure the high bit is never 1, to ensure the padded message is never larger than the RSA public modulus.

* commit 'e17a9c4ad3ebb4051853a4860b18973e1a01ce11':
  Change cryptfs keymaster padding to ensure the high bit is never 1, to ensure the padded message is never larger than the RSA public modulus.