OSDN Git Service
Nick Kralevich [Thu, 5 Mar 2015 20:57:54 +0000 (20:57 +0000)]
Merge "fstrim.c: use open(O_DIRECTORY) instead of stat"
Nick Kralevich [Thu, 5 Mar 2015 20:50:23 +0000 (12:50 -0800)]
fstrim.c: use open(O_DIRECTORY) instead of stat
open(O_DIRECTORY) returns an error if the open attempt
is against anything other than a directory. This basically
duplicates the check that the stat() call was trying to do.
Eliminate the unnecessary stat() call and use O_DIRECTORY
instead.
Change-Id: I1821abbed325f29a7214fdc41ed27cd9e26817d0
Shawn Willden [Thu, 26 Feb 2015 23:24:53 +0000 (23:24 +0000)]
Merge "Rename keymaster_device_t to keymaster0_device_t."
JP Abgrall [Thu, 26 Feb 2015 18:56:15 +0000 (18:56 +0000)]
Merge "vold: acquire wakelock on fstrim thread"
Young-ho Cha [Fri, 20 Jun 2014 10:48:36 +0000 (19:48 +0900)]
vold: acquire wakelock on fstrim thread
If fstrim thread creation or detachment is failed, wakelock can be leaked.
So move wakelock acquire to do_fstrim_filesystems function
Change-Id: I4da3164343af83fae3e5b01700f43d1752661276
Signed-off-by: Young-ho Cha <ganadist@gmail.com>
Shawn Willden [Tue, 24 Feb 2015 16:51:34 +0000 (09:51 -0700)]
Rename keymaster_device_t to keymaster0_device_t.
This is to accomodate the new keymaster1_device_t, which has an entirely
different interface.
Soon I'll provide a libkeymaster which provides a unified (and nicer)
interface for dealing with both v0 and v1 keymaster implementations
using a v1 keymaster API. For now this change is just so that vold will
build and run.
Change-Id: I5c54282c12d1c4b8b22ed4929b6e6c724a94ede4
Elliott Hughes [Sat, 7 Feb 2015 07:29:43 +0000 (07:29 +0000)]
Merge "prevent ioctl_init() to write outside buffer"
Elliott Hughes [Sat, 7 Feb 2015 07:28:05 +0000 (07:28 +0000)]
Merge "Change strncpy to strlcpy"
Nick Kralevich [Fri, 6 Feb 2015 17:11:00 +0000 (17:11 +0000)]
Merge "VolumeManager: don't use faccessat(AT_SYMLINK_NOFOLLOW)"
Nick Kralevich [Fri, 6 Feb 2015 16:55:08 +0000 (08:55 -0800)]
VolumeManager: don't use faccessat(AT_SYMLINK_NOFOLLOW)
Don't use faccessat(AT_SYMLINK_NOFOLLOW). In Android, AT_SYMLINK_NOFOLLOW
is ignored. In glibc, it returns counter intuitive results when a
symbolic link is encountered, returning true all the time even though
an open(O_NOFOLLOW) will eventually fail.
Instead, stat the file and check to see if it's a regular file,
not a directory or symlink or some other weirdness.
In addition, fix a bug where isAsecInDirectory would return
true ("-1") if the asec directory didn't exist. It should return
false.
Bug:
18867827
Change-Id: I33d90e9095fad36ce0f83fde105b70f72e4eaef4
Henrik Baard [Fri, 6 Feb 2015 08:24:14 +0000 (09:24 +0100)]
Change strncpy to strlcpy
Change all function calls to strncpy to strlcpy.
Change-Id: I2bbefb7829d715847c5b26f4b9f0faddbd4c89d0
Marek Pola [Thu, 5 Feb 2015 13:22:34 +0000 (14:22 +0100)]
prevent ioctl_init() to write outside buffer
The strncpy operation does not write a 0 termination
if the name is larger than the target buffer.
Ensure that zero termination is always written using
safe strlcpy function.
Change-Id: Idb68cdff7cd1a860c1dfac7494fa99f3d382cb91
Elliott Hughes [Thu, 5 Feb 2015 17:36:01 +0000 (17:36 +0000)]
Merge "Change lseek to lseek64"
Elliott Hughes [Thu, 5 Feb 2015 17:08:58 +0000 (17:08 +0000)]
Merge "Fix memory leak in upgrade_crypt_ftr"
Björn Landström [Tue, 20 Jan 2015 11:43:56 +0000 (12:43 +0100)]
Change lseek to lseek64
Using lseek on 64-bit offset parameter caused failure
to write persistent data in crypto footer.
Changed calls to use lseek64 instead.
Change-Id: I4e4c397a6d36201b8b08be3017e17c9fac3b34e4
Henrik Baard [Thu, 5 Feb 2015 14:09:17 +0000 (15:09 +0100)]
Fix memory leak in upgrade_crypt_ftr
The structure crypt_persist_data was allocated,
but never freed.
Added free of allocated memory in normal and
error case.
Change-Id: I9aaa067e6f6501e8ce007f8659004b5dbcf2b246
Paul Lawrence [Wed, 28 Jan 2015 21:14:19 +0000 (21:14 +0000)]
Merge "Make encryption configurable"
Elliott Hughes [Wed, 28 Jan 2015 20:04:02 +0000 (20:04 +0000)]
Merge "Add missing <string.h> include."
Elliott Hughes [Wed, 28 Jan 2015 19:47:21 +0000 (11:47 -0800)]
Add missing <string.h> include.
Change-Id: I31f5cd6fb4ff55d7cfe213f66955e3dbcbdff101
Paul Lawrence [Wed, 21 Jan 2015 17:58:26 +0000 (09:58 -0800)]
Make encryption configurable
Add maybeenabledefaultencryption function, that encrypts based
on the encryption flag and appropriate environment variable
Bug:
18764230
Change-Id: Id9a1967d09a7ae63a51240c0a5f3c41505af0e9a
Kenny Root [Fri, 23 Jan 2015 01:05:47 +0000 (01:05 +0000)]
Merge "Remove superfluous OpenSSL include paths."
Adam Langley [Fri, 23 Jan 2015 00:45:28 +0000 (16:45 -0800)]
Remove superfluous OpenSSL include paths.
The libcrypto and libssl modules (and their respective static and host
versions) use LOCAL_EXPORT_C_INCLUDE_DIRS thus just including the module
is sufficient.
Additionally, cryptfs.h was including an OpenSSL header just to get the
length of a SHA-256 hash. Rather than force all users of this header to
also depend on libcrypto, it's easier just to define that value in the
header file.
Change-Id: I3e3e0db906a212e1093944b298e4a8ff2e2fb07d
Yabin Cui [Tue, 6 Jan 2015 18:06:08 +0000 (18:06 +0000)]
Merge "Use getmntent when accessing /proc/mounts."
Yabin Cui [Fri, 2 Jan 2015 21:28:28 +0000 (13:28 -0800)]
Use getmntent when accessing /proc/mounts.
Bug:
18887435
Change-Id: Ibcb446fac954d9c42ebdfc4b684e6f3503337ab4
Elliott Hughes [Mon, 29 Dec 2014 22:10:51 +0000 (22:10 +0000)]
Merge "Fix missing #includes in system/vold."
Elliott Hughes [Mon, 29 Dec 2014 22:09:42 +0000 (14:09 -0800)]
Fix missing #includes in system/vold.
Change-Id: I53611cf8373daf638b0cc45b7b3d17e4d3e7247e
Dan Albert [Thu, 18 Dec 2014 18:42:15 +0000 (18:42 +0000)]
Merge "Fix 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
Tim Murray [Thu, 18 Dec 2014 00:23:26 +0000 (00:23 +0000)]
Merge "Make 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
Dan Albert [Sat, 13 Dec 2014 02:03:13 +0000 (02:03 +0000)]
Merge "Move 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
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++.
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.
Dan Albert [Thu, 6 Nov 2014 00:12:48 +0000 (00:12 +0000)]
Merge "Move 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
Dan Albert [Tue, 21 Oct 2014 23:09:07 +0000 (23:09 +0000)]
Merge "Move 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
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.
Nick Kralevich [Sat, 18 Oct 2014 23:02:30 +0000 (23:02 +0000)]
Merge "Set SELinux contexts on device nodes created by vold."
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
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.
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)
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
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
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
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
Paul Lawrence [Sun, 5 Oct 2014 23:24:46 +0000 (23:24 +0000)]
Merge "Reset failed decryption count on successful decryptions" into lmp-dev
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
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
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>
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>
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
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
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
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
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.
Greg Hackmann [Wed, 24 Sep 2014 23:32:00 +0000 (23:32 +0000)]
Merge "cryptfs: log umount() failure reason" 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
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>
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
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
Paul Lawrence [Tue, 23 Sep 2014 16:23:06 +0000 (16:23 +0000)]
am
3846be17: Reduce cryptfs logspam
* commit '
3846be17feba13150a5db22204622db6a762a0d8':
Reduce cryptfs logspam
Paul Lawrence [Mon, 22 Sep 2014 18:33:54 +0000 (11:33 -0700)]
Reduce cryptfs logspam
Bug:
17572886
Change-Id: I91302ccc284e0f908299852650db5bf645f2ff71
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.
Alex Klyubin [Fri, 19 Sep 2014 22:41:09 +0000 (22:41 +0000)]
Merge "Don't use deprecated OpenSSL functions."
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.
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
Dan Albert [Fri, 12 Sep 2014 18:07:50 +0000 (18:07 +0000)]
Merge "Remove makefile cruft."
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
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
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
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
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.
Shawn Willden [Mon, 8 Sep 2014 19:04:08 +0000 (13:04 -0600)]
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.
Bug:
17358530
Change-Id: I4dc488399c4ecfa2d24cacb839a9087e65475947
Paul Lawrence [Mon, 8 Sep 2014 20:21:04 +0000 (20:21 +0000)]
am
b2f682bd: Fix Shamus bricked by encryption upgrade
* commit '
b2f682bda8443fb93ab67f19be84fd80d5ed2838':
Fix Shamus bricked by encryption upgrade
Paul Lawrence [Mon, 8 Sep 2014 18:28:19 +0000 (11:28 -0700)]
Fix Shamus bricked by encryption upgrade
Bug:
17358530
Change-Id: I95207b62131224a2ed7ae3b75621a09acd69ea79
Shawn Willden [Fri, 5 Sep 2014 23:44:02 +0000 (23:44 +0000)]
am
47ba10d6: Pad object to proper size before signing.
* commit '
47ba10d6d53e0d2e54453fe62324afdfa8d6c78a':
Pad object to proper size before signing.
Adam Langley [Wed, 3 Sep 2014 21:23:13 +0000 (14:23 -0700)]
Don't use deprecated OpenSSL functions.
This change simply switches from the deprecated
EVP_{En|De}crypt{Init|Final} to the newer, _ex versions of the same.
There is no difference in behaviour, save for calling
EVP_CIPHER_CTX_init, as the deprecated versions are just wrappers around
the _ex functions. See
https://git.openssl.org/gitweb/?p=openssl.git;a=blob;f=crypto/evp/evp_enc.c;h=
f705967a40ab92cdf3c2ba8dd6bc19680d6157d6;hb=HEAD#l274
This change is required for the transition to BoringSSL, which removes
the deprecated functions.
Bug:
17409664
Change-Id: I35c6cc2d86d0c876a9edaff1e5571170fe393d87
Signed-off-by: Adam Langley <agl@google.com>
Shawn Willden [Wed, 3 Sep 2014 23:07:06 +0000 (17:07 -0600)]
Pad object to proper size before signing.
Correct implementations of keymaster should reject using an n-bit
RSA key to sign less than n bits of data, because we specify that
keymaster should not perform padding.
Change-Id: Ibdff1bbfbee84fd5bdbfb3149a124dbbaa7827fc
Paul Lawrence [Tue, 2 Sep 2014 21:44:45 +0000 (21:44 +0000)]
am
60dec16c: Correctly remove asecs for full disk encryption
* commit '
60dec16c5026d29a52791ad790860d247f47f8f2':
Correctly remove asecs for full disk encryption
Paul Lawrence [Tue, 2 Sep 2014 17:52:15 +0000 (10:52 -0700)]
Correctly remove asecs for full disk encryption
Previously this would fail if the framework wasn't stopped. The failure
would then stop full disk encryption. The fact that the unmount worked,
however, would then stop the second attempt from achieving anything.
Fix in line with current retry philosophy
We still need to figure out why Devmapper::destroy() fails at first.
Bug:
17301843
Change-Id: I405a36c832ccdebf2d904bef77f15eea174a6bfb
Paul Lawrence [Fri, 29 Aug 2014 20:35:47 +0000 (20:35 +0000)]
am
74f29f1d: Don\'t test mount when we can use the crypto footer to test the password
* commit '
74f29f1df7d12c0cc06e9d6685adf15e757d8eda':
Don't test mount when we can use the crypto footer to test the password
Paul Lawrence [Thu, 28 Aug 2014 22:54:10 +0000 (15:54 -0700)]
Don't test mount when we can use the crypto footer to test the password
Note that this also changes the boot sequence, and moves the test for corrupted
data to cryptfs_restart_internal.
Bug:
17213613
Change-Id: I0f86e8fe3d482e2d1373bd0f4d0d861e63ad8904
Paul Lawrence [Tue, 26 Aug 2014 04:53:39 +0000 (04:53 +0000)]
am
00786076: Merge "Don\'t reboot after default encrypting" into lmp-dev
* commit '
00786076cd6a3a32a42f95b4813ea807321b3fda':
Don't reboot after default encrypting
Paul Lawrence [Tue, 26 Aug 2014 04:53:24 +0000 (04:53 +0000)]
am
71577504: Show correct remaining time
* commit '
715775046c79f04d8975da53efcfbd1b70abe699':
Show correct remaining time
Paul Lawrence [Mon, 25 Aug 2014 20:28:46 +0000 (20:28 +0000)]
Merge "Don't reboot after default encrypting" into lmp-dev
Paul Lawrence [Wed, 13 Aug 2014 21:55:55 +0000 (14:55 -0700)]
Show correct remaining time
In field reports, sometimes the remaining time gets stuck for many
minutes. This has to be caused by a spurious low reading early on which
cannot be overridded because of old logic.
Solution: allow time to increase but only by large amounts (avoid time
jittering up and down).
Bug:
16973374
Change-Id: I49d23ae8c54ded416cbedf383a3c03b33dc02e1c
Jeff Sharkey [Sun, 24 Aug 2014 19:04:02 +0000 (19:04 +0000)]
am
43ed123d: ASEC resize tweaking, allow read-write mounting.
* commit '
43ed123d3fc1a3edf3660cd0e2528e971abc399e':
ASEC resize tweaking, allow read-write mounting.
Jeff Sharkey [Fri, 22 Aug 2014 19:29:05 +0000 (12:29 -0700)]
ASEC resize tweaking, allow read-write mounting.
Resize is no-op when sector count is unchanged; the caller can't
anticipate how vold does its sector calculations.
After resizing, we need to mount the container read-write, so allow
the caller to request "ro" or "rw" mode.
Handle ENOTSUP when trying to fallocate() on some filesystems
Bug:
16514385
Change-Id: I0d3a378280d4c36d14f8108ff428102283d583fa
Paul Lawrence [Fri, 15 Aug 2014 14:37:28 +0000 (07:37 -0700)]
Don't reboot after default encrypting
Instead trigger normal default encryption mount
Requires matching change to system/core: https://googleplex-android-review.git.corp.google.com/#/c/527286/
Bug:
17041092
Change-Id: Ifcf023386e08325db7dce61395fbb056f7d9815b
Daniel Rosenberg [Mon, 18 Aug 2014 20:02:53 +0000 (20:02 +0000)]
am
e82df164: Revert "Revert "cryptfs: Added support for f2fs fast encryption""
* commit '
e82df164e8128ec9df0072c4a4f3d92e79a0f5f4':
Revert "Revert "cryptfs: Added support for f2fs fast encryption""
Daniel Rosenberg [Fri, 15 Aug 2014 22:19:23 +0000 (22:19 +0000)]
Revert "Revert "cryptfs: Added support for f2fs fast encryption""
This reverts commit
a70abc60091aed3c3eaf8bc8e1766e233c1c3a2f.
Change-Id: Ic41d1924638586cf9b2297f91ed5417f3b0303c6
JP Abgrall [Fri, 15 Aug 2014 20:56:13 +0000 (20:56 +0000)]
am
52f5425f: Merge "Fix Vold to properly handle full-disk file systems"
* commit '
52f5425ff53216e3d7e2410bffd05e0df2b13c9c':
Fix Vold to properly handle full-disk file systems
JP Abgrall [Fri, 15 Aug 2014 20:49:09 +0000 (20:49 +0000)]
Merge "Fix Vold to properly handle full-disk file systems"
Robert Chiras [Tue, 27 May 2014 07:40:37 +0000 (10:40 +0300)]
Fix Vold to properly handle full-disk file systems
(full-disk: no partitions)
In Android, Vold recognizes a USB drive having a full-disk file system
and mounts it properly, but when the drive is removed from system Vold
won't unmount the device. This is because Vold only unmounts partitions.
For a FAT32 USB drive (with partitions), kernel will create two devices:
sda (disk device) and sda1 (partition device). When the drive is removed,
Vold will receive two netlink events: one for partition remove (sda1)
and one for disk remove (sda). The unmount occurs only when partition
remove event is received.
For a full-disk FS USB drive, kernel will only create one device: sda
(disk device). When the drive is removed, Vold will only receive one
netlink event for disk remove (sda) and it won't unmount the device.
This patch will verify if there is a currently mounted device when disk
remove event is received and will perform unmount, to properly unmount
the device.
Change-Id: I4866ab2482fddfb40a8fc73083f31df846bbb24f
Signed-off-by: Robert Chiras <robert.chiras@intel.com>
Jim Miller [Fri, 15 Aug 2014 11:49:55 +0000 (11:49 +0000)]
am
a70abc60: Revert "cryptfs: Added support for f2fs fast encryption"
* commit '
a70abc60091aed3c3eaf8bc8e1766e233c1c3a2f':
Revert "cryptfs: Added support for f2fs fast encryption"
Daniel Rosenberg [Fri, 15 Aug 2014 11:48:33 +0000 (11:48 +0000)]
am
74c01201: cryptfs: Added support for f2fs fast encryption
* commit '
74c01201dec12b5de43ba0f20a2f38e835cd00af':
cryptfs: Added support for f2fs fast encryption
JP Abgrall [Fri, 15 Aug 2014 04:28:21 +0000 (04:28 +0000)]
am
211c0cfd: Merge "Enable SD card format"
* commit '
211c0cfda6c38469180a8ae87228603d7f317778':
Enable SD card format
Jim Miller [Fri, 15 Aug 2014 02:00:45 +0000 (02:00 +0000)]
Revert "cryptfs: Added support for f2fs fast encryption"
This reverts commit
74c01201dec12b5de43ba0f20a2f38e835cd00af.
Change-Id: Ib397a2b5812179ee2e2b68de5d718077563adc1c