OSDN Git Service
Chih-Wei Huang [Sat, 25 Mar 2017 16:47:42 +0000 (00:47 +0800)]
vold3: check supported filesystem modules
If there is a filesystem module of the requested type,
it should be considered supported.
Note the kernel will auto load the filesystem module
on mounting by modprobe.
Chih-Wei Huang [Sat, 25 Mar 2017 16:46:42 +0000 (00:46 +0800)]
vold3: support UDF (Universal Disk Format)
Refer to https://en.wikipedia.org/wiki/Universal_Disk_Format.
Chih-Wei Huang [Sat, 25 Mar 2017 16:45:41 +0000 (00:45 +0800)]
vold3: auto mount CDROM
Jide's ISO9660 support (commit
3da6ea1) is not complete. Still
need to handle block devices with major number of CDROM.
Chih-Wei Huang [Fri, 24 Mar 2017 16:13:45 +0000 (00:13 +0800)]
Move kMajor* constants to a header file
Currently each cpp defines its own kMajor* that can't be shared.
Move the kMajor* to a header to avoid duplicate definitions.
Luo Chunbo [Wed, 25 May 2016 08:16:48 +0000 (16:16 +0800)]
vold: ISO9660 support
Ref: T7691
Change-Id: Ifc602781e7d87aea9f3181263e09ffe143e9a231
Signed-off-by: Luo Chunbo <luochunbo@jidemail.com>
Chih-Wei Huang [Thu, 4 May 2017 17:27:36 +0000 (01:27 +0800)]
Merge remote-tracking branch 'cm/cm-14.1' into nougat-x86
Conflicts:
main.cpp
Dan Pasanen [Wed, 5 Apr 2017 12:28:02 +0000 (07:28 -0500)]
Merge tag 'android-7.1.2_r2' into cm-14.1
Android 7.1.2 Release 2 (N2G47E)
# gpg: Signature made Mon 03 Apr 2017 01:41:52 AM CDT
# gpg: using DSA key
E8AD3F819AB10E78
# gpg: Can't check signature: No public key
Chih-Wei Huang [Tue, 8 Nov 2016 02:27:59 +0000 (10:27 +0800)]
More fix for Ext4 mount issue
The security context is only defined in the CM build.
So skip it for non-CM build.
Jaap Jan Meijer [Mon, 10 Oct 2016 16:13:08 +0000 (18:13 +0200)]
Fix crypt dependency conflict between AOSP and CM
Chih-Wei Huang [Sun, 11 Sep 2016 15:15:17 +0000 (23:15 +0800)]
Enable f2fs support
Chih-Wei Huang [Fri, 8 Jul 2016 14:48:40 +0000 (22:48 +0800)]
Fix Ext4 can't be mounted issue
Only set context if selinux is enabled.
Chih-Wei Huang [Tue, 14 Mar 2017 07:41:12 +0000 (15:41 +0800)]
Revert "Added cypto_complete states to reflect MDTP state."
This reverts commit
d1821cf4857eedf0f0ae9c3b362d35ed216cd9f5.
Chih-Wei Huang [Tue, 14 Mar 2017 07:40:21 +0000 (15:40 +0800)]
Revert "Switch to BoringSSL crypto."
This reverts commit
71c215be3e768b1a205021a3720129e4d290a3a8.
Chih-Wei Huang [Tue, 14 Mar 2017 07:38:52 +0000 (15:38 +0800)]
Merge remote-tracking branch 'cm/cm-14.1' into nougat-x86
c457 [Sat, 4 Feb 2017 20:45:19 +0000 (14:45 -0600)]
vold: Update path to cryptfs_hw
* It's now a seprate project
Change-Id: I636fde1ff07333580aab7b8ace9a5a98174e306e
Dimitry Ivanov [Thu, 19 Jan 2017 20:48:27 +0000 (12:48 -0800)]
Fix deadlock between vold and init
By setting property after listeners are initialized
we avoid deadlock between vold and init where
vold is waiting on property_service while init is blocked
(and therefore is not able to accept connections) on vdc
which is attempting to communicate with vold.
(This also speeds up boot by 250ms)
Test: Boot a device, check locks and make sure there is no timeout
on property_set(.)
Test: Successfully boot a device with new property service protocol.
Bug: http://b/
34278978
Change-Id: I9547d2f19cb35aa452bf01fbff0eb4b32a4824a4
(cherry picked from commit
c976e73bbdfd512482d0ea0c5e10afd53ba85e1e)
Steve Kondik [Thu, 6 Oct 2016 13:42:18 +0000 (06:42 -0700)]
vold: Fix build warning
Change-Id: I791a5e44198612aaea7713094416da7eaafc5bf8
Mattias Nissler [Thu, 31 Mar 2016 14:32:59 +0000 (16:32 +0200)]
Switch to BoringSSL crypto.
This replaces the libmincrypt dependency with libcrypto_utils, which
is needed due to libfec and fs_mgr switching to BoringSSL.
Change-Id: I4f6f4d8cc5e200679331a9bcdf2cc3bad1082dd6
Steve Kondik [Fri, 26 Aug 2016 11:05:18 +0000 (04:05 -0700)]
vold: Don't include cryptfs in minivold
* This wants to use Keymaster in N, will need to think of a
different approach if we want to support encrypted volumes.
This is not a likely scenario anyway, so just nuke it.
Change-Id: Icca82054ef07e0bf1caeca3615cf67921d14b4cd
Steve Kondik [Fri, 26 Aug 2016 09:19:34 +0000 (02:19 -0700)]
vold: Export main function of vdc correctly
Change-Id: Ied918717a2a37d70e59f6e82b6be5e7414a04840
Rashed Abdel-Tawab [Fri, 26 Aug 2016 02:13:34 +0000 (22:13 -0400)]
vold: Correct base header paths
These headers were moved to android-base
Change-Id: I3eaa8316006b9017c5f5e31cd1e91efc2862106d
Luca Stefani [Thu, 25 Aug 2016 18:16:50 +0000 (20:16 +0200)]
vold: fs: Fix build errors
* Migrate from base to android-base
* Add missing , in Ext4 Mount function
Change-Id: I875b5763c472aa7da2976ec7c5db7cf28c913876
Steve Kondik [Thu, 28 Jul 2016 01:12:04 +0000 (18:12 -0700)]
vold: Allow reset after shutdown
* If we shutdown all volumes (during crypto), vold throws up an
assert at us when reset() is called due to destroying an
already destroyed volume. This is actually fine, just return
an error instead of crashing.
Change-Id: I51f8561da83e27de8e80d74f3a600fb0139d3035
Michael Bestas [Sun, 29 Nov 2015 21:30:56 +0000 (23:30 +0200)]
vold: Fix tool paths for minivold
Change-Id: I4c90f0054f8cc83b5384bc2a9550ab172b202f01
Scott Mertz [Thu, 31 Mar 2016 20:09:56 +0000 (13:09 -0700)]
vold: skip first disk change when converting MBR to GPT
When converting a public (MBR) partition to private (GPT) partition,
'sgdisk --zap-all <path>' triggers a disk change netlink event
when converting from MBR to GPT. Then, 'sgdisk --new=....' triggers
another disk change netlink event.
vold informs clients a new volume is created after the first disk
change event occurs. system server reacts by requesting to mount
the volume. If this request is honored before the second disk change
event, the volume will be unmounted immediately after system server's
request to mount is honored. The next time system server performs
an operation (createnewuser) on this volume, it will fail due to
the volume being unmounted.
This is reproduced by running the following commands in a loop:
adb shell sm partition <disk> private
adb shell sm partition <disk> public
adb shell sm forget all
OR
run cts -c com.android.cts.appsecurity.AdoptableHostTest -m testPackageInstaller
This change causes vold to delay notifying clients that the volume is
ready until after it's actually partitioned.
CYNGNOS-2283
Change-Id: I457cc1508573d73ef2be2f0cfdc5c2237bfabad7
Jani Lusikka [Fri, 25 Mar 2016 18:12:15 +0000 (20:12 +0200)]
Fix the group permissions of the sdcard root.
If the root is not writable, we cannot create new files or folders there.
Change-Id: I3edad81f105bbeabc9dcd1f5322acea6fbfc63bb
Tom Marshall [Thu, 10 Mar 2016 23:55:01 +0000 (15:55 -0800)]
minivold: Use libblkid for readMetadata
We cannot popen() /sbin/blkid because selinux.
Change-Id: I0ba032c362dcfaa72443860071e5bd4d4d3b8270
Jani Lusikka [Fri, 15 Jan 2016 20:25:47 +0000 (22:25 +0200)]
vold: Mount ext4/f2fs portable storage with sdcard_posix context
This commit is a forward port of following commits:
Author: Michael Stucki <mundaun@gmx.ch>
Change-Id: Ia34ad91444951e62f6d17374f480dcbdfa34cca3
Author: Tom Marshall <tdm@cyngn.com>
Change-Id: I05d9b57cc28ffd1f8deb8148d81c7f6fad0aa8db
Author: Pawit Pornkitprasan <p.pawit@gmail.com>
Change-Id: I1364f37018b25d79b1826c85849def64e868d72f
Author: Pawit Pornkitprasan <p.pawit@gmail.com>
Change-Id: I873af4dc2309d3d0942ce466b8acf8158abb85ae
Author: Jorge Ruesga <jorge@ruesga.com>
Change-Id: Ic0bb314b30e42489c45caec29d35d6896c9849eb
Signed-off-by: Michael Bestas <mikeioannina@cyanogenmod.org>
Change-Id: I9699643987c53d8e2538720f33da28de35230dfe
Michael Bestas [Wed, 20 Jan 2016 20:06:11 +0000 (22:06 +0200)]
vold: Honor mount options for f2fs partitions
* Based on
1436fc7ea3b349283a021e75fdd4f3478a2ca2e8
Change-Id: Id9491ada3bd34275a95ef9855167db6ae7a9b30f
Sam Mortimer [Mon, 18 Jan 2016 17:58:58 +0000 (09:58 -0800)]
Fix mounting ext4 adopted storage
Change-Id: I36cb858b96968a949632017874addb278679b3a4
Sam Mortimer [Fri, 27 Nov 2015 23:27:03 +0000 (15:27 -0800)]
vold ext4/f2fs: do not use dirsync if we're mounting adopted storage
Change-Id: I6f8ca75385c2d4080b1430c0b6545b61e6632e2c
myfluxi [Wed, 13 Jan 2016 21:36:18 +0000 (22:36 +0100)]
cryptfs: Set HW FDE flags when building libvold
Change-Id: I62e8fb77e60944edfb2a626c99df516cf959c4cc
Sam Mortimer [Fri, 18 Dec 2015 13:17:13 +0000 (05:17 -0800)]
Also change emulated device id separator from comma to underscore
Needed to fix emulated primary storage on adopted storage.
Change-Id: I22114698e480fc829090261b79824c8b65b009c3
morckx [Tue, 24 Nov 2015 21:45:01 +0000 (22:45 +0100)]
vold: dont't use commas in device names
Fuse supports commas escaped by '\' in fs names, but exfat and ntfs-3g
currently don't support the escaping.
This fixes mounting of exFAT and NTFS public volumes.
Change-Id: I72005489956e59e7f889267114fee3921d289984
dhacker29 [Sun, 6 Dec 2015 10:32:30 +0000 (05:32 -0500)]
vold: Native NTFS kernel driver support
Change-Id: I825b2840a03e5cdab9b68f13fd5170acbbcec2e5
Michael Bestas [Sun, 6 Dec 2015 21:53:55 +0000 (23:53 +0200)]
vold: Fix fsck on public volumes
* Fsck was hitting a neverallow on public volumes not formatted in vfat
because it was always using the trusted context
* Always run trusted fsck for private volumes and untrusted for public
* Exfat/ntfs are always untrusted, because they are not supported for
private volumes, like vfat
Change-Id: I0a6ee9aea907bae9ed097b920df0559df7b45d7d
Ketut Putu Kumajaya [Sat, 5 Dec 2015 12:04:21 +0000 (19:04 +0700)]
vold: Fix native exfat driver support
Change-Id: I772368c0ec054a2ba86cf0ba0e37f07ba2b82fd2
Ketut Putu Kumajaya [Wed, 2 Dec 2015 09:17:23 +0000 (16:17 +0700)]
vold: Native exfat driver support
* exfat-nofuse https://github.com/dorimanx/exfat-nofuse
Change-Id: I0b7d7b3f3e21defa83e08564b3fdb67a9957edc0
dhacker29 [Sun, 29 Nov 2015 09:08:11 +0000 (04:08 -0500)]
f2fs: Fix kMkfsPath to match location of CM binary
In https://github.com/CyanogenMod/android_external_f2fs-tools/commit/
c227ae2f76318cabb81d11293c01cd48e883a3c1
the location of the binary was changed to /system/bin/mkfs.f2fs
Change-Id: Ic097cd378a608fcce09c9ce819e61df215995ee3
Tom Marshall [Wed, 2 Dec 2015 23:25:27 +0000 (15:25 -0800)]
minivold: Build as static library for linkage into recovery
Change-Id: I76045b8e95534e32e1304d535cd0b7d09eeebffc
Christopher R. Palmer [Thu, 26 Nov 2015 01:53:45 +0000 (20:53 -0500)]
vold: Fix crash on startup
Change-Id: Ib4d1be706b8d9bddc46aa71140fdb89d4ac2e0d1
Tom Marshall [Wed, 25 Nov 2015 21:49:40 +0000 (13:49 -0800)]
Don't try to unmount ASEC and FUSE paths in recovery
Change-Id: Ia693dffeb2865e9849b1c237b619777f61beca2f
Tom Marshall [Wed, 25 Nov 2015 21:46:25 +0000 (13:46 -0800)]
Do not overwrite existing metadata with empty values
This fixes an issue in recovery where storage descriptions go blank.
Change-Id: I8b324c49dbd1aef9a8831496b313ae8c2153bba8
Tom Marshall [Thu, 5 Nov 2015 19:20:54 +0000 (11:20 -0800)]
vold: Honor mount options for ext4 partitions
* Save mount options and fstype for DiskPartition objects
* Pass mount options and fstype to PublicVolume ctor
* Pass mount options to Ext4::Mount
* Use specified/default fstype if blkid fails
This is trivially extensible for other fs types.
Change-Id: Ie5dd27f26a4a7129dd9efe6a7ad0a589928282a0
Tom Marshall [Wed, 4 Nov 2015 23:44:44 +0000 (15:44 -0800)]
vold: Support internal storage partitions
* Support nonremovable disks and expose a nonremovable flag in the
DiskCreated message.
* New DiskPartition class to hold single partitions. DiskPartition is
used when the fs_mgr entry has a partnum (eg. when fs_mgr_flags
contains voldmanaged=label:#). Override disk partitioning methods
to prevent destroying the emmc.
Change-Id: Id7ec3ea409b5c96e691730604e4b1e9cc3aa9d33
Dan Pasanen [Wed, 28 Oct 2015 03:52:37 +0000 (22:52 -0500)]
vold: add support for more filesystems for public storage
* Add exfat and ntfs support based off f2fs and ported to use
fuse
* Add support for both along with f2fs and ext4 to PublicVolume
* Also attempt to mount any volume if it's been determined that
the kernel supports it
Change-Id: I0a83761cefd97791e3ec84a18e199dfd27a5ed0b
Tom Marshall [Wed, 4 Nov 2015 23:35:09 +0000 (15:35 -0800)]
vold: minivold for recovery
* Build static linked minivold
* Adjust tool paths for recovery
* Skip ASEC and FUSE in recovery
* Default volume label to fstab label
* Add label "emulated" to emulated volume
* Always send VolumeFsLabelChanged on volume creation
* Add detach option to volume unmount
Change-Id: I1a943dd3e606caa6bee6a0ec1df54fed365f769a
Steve Kondik [Fri, 16 Oct 2015 13:52:14 +0000 (06:52 -0700)]
vold: Add linkage for fs_mgr changes
Change-Id: Id6623ee558a43600e474ef89f318574bdc6ba25f
Linux Build Service Account [Thu, 15 Dec 2016 10:07:46 +0000 (03:07 -0700)]
Merge
4e4aba51e53251b781cb0502818a1cf7fde6e5e9 on remote branch
Change-Id: I0d31346588551659dad3fe5a95cfe8f323dcc453
Naveen Kumar [Wed, 7 Dec 2016 14:43:41 +0000 (20:13 +0530)]
Merge N-MR1 to remote branch.
Change-Id: I060c4e830d3f27dec7c6544440cb2281da818494
Lalit Kansara [Tue, 6 Dec 2016 11:09:14 +0000 (16:39 +0530)]
Merge N-MR1 to remote
Change-Id: I593fd928e94dc4f2005890ebf0e6ad230dd46862
Linux Build Service Account [Tue, 6 Dec 2016 07:56:14 +0000 (00:56 -0700)]
Merge
71997ef71d975cd2a805ccb5955f5feeb4d993b6 on remote branch
Change-Id: Ia69cdb55067fd507d0cd543939d44e580eb9b462
Linux Build Service Account [Thu, 3 Nov 2016 19:38:26 +0000 (13:38 -0600)]
Promotion of android-framework.lnx.2.0-00017.
CRs Change ID Subject
--------------------------------------------------------------------------------------------------------------
1075994 I2dd7112d46b89f53870b9f9fcd25061c321c9d22 cryptfs: fix wrong password set by user during bootup
Change-Id: I66101e5181c91291698a2da992aa3348cd30ef04
CRs-Fixed:
1075994
Brahmaji K [Fri, 14 Oct 2016 09:12:35 +0000 (14:42 +0530)]
cryptfs: fix wrong password set by user during bootup
As per current implementation, When encryption is triggered from
settings, the scrypted intermediate key is created by using the
actual password but actual master key is encrypted with
default_password. Added changes to compare the current scrypted
intrmediate key with the stored intermediate key, so that the
password will be validated with actual password during bootup.
CRs-Fixed:
1075994
Change-Id: I2dd7112d46b89f53870b9f9fcd25061c321c9d22
Chih-Wei Huang [Fri, 12 Aug 2016 17:58:29 +0000 (01:58 +0800)]
vold3: support the old SDCARD=xxx function
By specifying SDCARD=xxx in kernel cmdline, vold will try to mount
that disk or partition as a sdcard. This is an old function we've
added to vold 2.0. Now re-implement it in vold 3.0. Some people
still like and use it.
Linux Build Service Account [Thu, 22 Sep 2016 12:24:43 +0000 (05:24 -0700)]
Merge
31ba6d52253561e213a436ec813a48cdaebc8bf6 on remote branch
Change-Id: I0857ef2f1e87c78d0acf41479c70b9398d02dca4
Linux Build Service Account [Thu, 15 Sep 2016 09:08:05 +0000 (03:08 -0600)]
Promotion of android-framework.lnx.2.0-00009.
CRs Change ID Subject
--------------------------------------------------------------------------------------------------------------
1060472 Ib867180d9e54a0a27211fc5037d0f20b8d91423d cryptfs: fix issue that caused problems with forced HW e
1034358 Ife656f3d4e8344522691ed1897a38a4da1540cbc cryptfs: Fix double counting of decryption failure
Change-Id: Ib6eb9c594b64297c70cbf5c3a5ea3efe32be8434
CRs-Fixed:
1034358,
1060472
Linux Build Service Account [Tue, 13 Sep 2016 22:21:17 +0000 (15:21 -0700)]
Merge "cryptfs: Fix double counting of decryption failure"
Andrey Markovytch [Tue, 13 Sep 2016 06:04:36 +0000 (09:04 +0300)]
cryptfs: fix issue that caused problems with forced HW encryption
when device is encrypted from GUI (FORCE flag is on) the behaviour
is slightly different during the first boot for SW and HW encryption.
In case of HW encryption cryptfs_check_passwd needs to be called only
once for DEFAULT_PASSWORD. Fixed.
Change-Id: Ib867180d9e54a0a27211fc5037d0f20b8d91423d
Wei Wang [Wed, 7 Sep 2016 17:53:30 +0000 (17:53 +0000)]
Update fs_mgr_mount_all function
am:
84c985e275
Change-Id: Ia2d7410d092d7569c8f8873a101140db9320c019
Wei Wang [Fri, 26 Aug 2016 03:58:37 +0000 (20:58 -0700)]
Update fs_mgr_mount_all function
This is part of the change to support early/late fstab mounting in order
to support starting key services before /data mounting
fs_mgr_mount_all function updated with a parameter to support mounting mode
More information refer to init/readme.txt
(cherry picked from commit
1d6476c3c848ebc8fbdfa6945e1c3be447beb5a3)
Bug:
30118894
Change-Id: I5e925b900fd477f230a90514cc2b561c7a7e9f49
Brahmaji K [Fri, 6 May 2016 13:21:21 +0000 (18:51 +0530)]
cryptfs: Fix double counting of decryption failure
Update decrypt count to increment only once when the device
is upgraded from L to M and wrong Password is entered.
Change-Id: Ife656f3d4e8344522691ed1897a38a4da1540cbc
Chih-Wei Huang [Mon, 5 Sep 2016 04:21:22 +0000 (12:21 +0800)]
cryptfs: fix null pointer crashing
Since android-x86 usually doesn't have the data mount point defined
in the fstab, we will get a null pointer of fstab_rec. This causes
unable to open Settings Developer options.
Jeff Sharkey [Wed, 31 Aug 2016 23:35:13 +0000 (23:35 +0000)]
DO NOT MERGE. Block adoptable storage when using FBE.
am:
84be704af4
Change-Id: If12088f04915fb4e7c239a7d0d90aa945183611d
Jeff Sharkey [Tue, 23 Aug 2016 19:48:50 +0000 (13:48 -0600)]
DO NOT MERGE. Block adoptable storage when using FBE.
For adoptable storage and FBE to coexist we need a new dm-biocrypt
kernel feature which isn't ready yet. So for now, prevent devices
from being adopted on FBE devices.
Bug:
30770036
Change-Id: I47639209161ee403ce13ea9a60da235e97c3fc30
(cherry picked from commit
157175110948b3cf604e40420059aa5265039847)
Brahmaji K [Mon, 18 Jul 2016 09:19:08 +0000 (14:49 +0530)]
cryptfs: Fix mount failure when encryption triggered from settings
When the encryption is triggered from settings, the key is getting
created before the reboot and that key is not getting used to
encrypt the data. So create the key during the encryption not
before the encryption.
Change-Id: I9f4f244f433b16b5d319c9dbe757c8219a6cfc7f
Amit Blay [Sun, 10 Jul 2016 12:13:53 +0000 (15:13 +0300)]
Added cypto_complete states to reflect MDTP state.
Also, fixed bug in the wipe option in cryptfs_enable_internal.
Change-Id: I5b441df6fd55b9c1d40797b25c4a5d6b3bfddcc8
zljing [Thu, 28 Apr 2016 05:54:18 +0000 (13:54 +0800)]
vold: optimze delay for shutdown
when some process occupy files, call kill and delay 5s
no matter kill success or fail. We shoud delay 5s when
send kill signal failed, else delay hundreds of mill-
seconds enough to get process killed.
CRs-fixed:
1010836
Change-Id: Id66056d5a828fface49a74325ef7de0711a19b1b
AnilKumar Chimata [Mon, 16 May 2016 10:16:01 +0000 (15:46 +0530)]
cryptfs: Fix compilation error
Fix compilation error, which was hit with the password changes.
Change-Id: I79c8f909a4c93dd702c629135ad3de2a2e6adafc
Dinesh K Garg [Thu, 6 Aug 2015 23:31:16 +0000 (16:31 -0700)]
vold: Port HW FDE features
Following changes for HW FDE are missing which needs to be ported:
- Restart Android framework after HW FDE key has been created
- Add support of Inline Cryto Engine
- Use new HW FDE apis to update password
- vold: Tie HW FDE keys with Root of Trust(ROT)
- vold: Fix HW FDE OTA support on SW FDE encrypted device
- vold: Fix return value from get_keymaster_hw_fde_passwd()
- vold: Remove creation of new keymaster key for password update
- vold: Fix password update bug with HW FDE
- vold: hw_fde: fix OTA issues from L to M
- vold: Branch out SW and HW FDE paths to improve boot up time
- cryptfs: Use lower case alphabets for hex key during OTA upgrades
- vold: Improve device boot up time (Tune sleep calls)
- Retry mount if mount fails after setting HW FDE key
Change-Id: I1295b873bcf3e00d9af78b50a42f080768d87ecb
Lalit Kansara [Wed, 27 Apr 2016 14:16:03 +0000 (19:46 +0530)]
Bootup issue: While refreshing AOSP from NRC91E to NRD14C
Block device creation is delayed by some reasons so as
opening of fd for crypto blk also delayed and timed out
resulting bootup issue. Hence retry mount attempts
increased to avoid the issue.
Change-Id: I2a78537d17f9a527564bf9185a1bb78ede09dbd1
Paul Crowley [Mon, 25 Jul 2016 22:55:36 +0000 (15:55 -0700)]
Don't try to fixate CE keys for ephemeral users
Ephemeral users don't have keys stored on disk at all, so it's neither
necessary nor possible to manipulate the disk keys here.
Bug:
30038313
Change-Id: Idc7ec1bfe1e8a6ffa6cee2f284dbe378097b08da
Paul Crowley [Tue, 19 Jul 2016 22:29:53 +0000 (15:29 -0700)]
Don't fail if a key we want to delete is already deleted
This can happen when cleaning up stale users at boot time.
Bug:
30158800
Change-Id: I2733d8d525fc79b7f05eb2225b7e6e14c4da277f
Paul Crowley [Tue, 19 Jul 2016 23:00:35 +0000 (16:00 -0700)]
Don't evict keys when we delete users
Work around a kernel bug that was causing lockups.
Bug:
30225438
Change-Id: Ia6eb60774037e692351af8eaed98b79596ea3635
Jeff Sharkey [Fri, 15 Jul 2016 22:20:22 +0000 (16:20 -0600)]
Only restorecon CE storage after unlocked.
On FBE devices, the filenames inside credential-encrypted directories
are mangled until the key is installed. This means the initial
restorecon at boot needs to skip these directories until the keys
are installed.
This CL uses an existing facility to request that init run a
recursive restorecon over a given path, and it requests that
operation for the CE directories that would have been omitted by
the SKIPCE flag earlier during boot.
Bug:
30126557
Change-Id: I8c7abea27215075a091f615a7185a82a2f4a4a95
Paul Crowley [Wed, 13 Jul 2016 19:49:52 +0000 (19:49 +0000)]
Merge "Run secdiscard on encrypted key and key blob too" into nyc-mr1-dev
Paul Crowley [Wed, 13 Jul 2016 19:49:20 +0000 (19:49 +0000)]
Merge "Zero out blocks if BLKSECDISCARD fails" into nyc-mr1-dev
Paul Crowley [Thu, 7 Jul 2016 17:06:30 +0000 (10:06 -0700)]
Run secdiscard on encrypted key and key blob too
Don't rely on cryptographic binding of secdiscard to key; securely
delete the other information needed to reconstruct the key too.
Bug:
26021231
Change-Id: If03d2c051b0ec2fdcb5c6f70bde7e3287424f216
Paul Crowley [Tue, 28 Jun 2016 21:24:07 +0000 (14:24 -0700)]
Zero out blocks if BLKSECDISCARD fails
On a device where we can't BLKSECDISCARD sectors, we "overwrite" them
with zeroes. This changes the FTL to remap those sectors to new
locations. With this done, the old contents are accessible only given
a compromise of flash firmware or a die level attack.
Bug:
26021231
Change-Id: Ia065921389886fac1ba456c19c138187237c2561
Henrik Baard [Thu, 17 Dec 2015 12:58:42 +0000 (13:58 +0100)]
Failing to "Migrate data" leaves target unusable
When "migrating" data failes due to insufficient space
at target location, the data copied so far is left in
target location, which in practice is now filled to the
brim.
If copy fails clean up the data copied so far since user
has the data in original location.
Bug:
26322200
Change-Id: Iab29a7f9e653e6857ee0e2723d151dfec81b14dd
Henrik Baard [Thu, 26 Nov 2015 11:05:13 +0000 (12:05 +0100)]
Migrating data sometimes leaves emulated unmounted
Sometimes migrating data fails to mount the target
volume after operation is finished.
MoveTask is running in its own thread, copying data
between external card and internal memory.
After copying the data the method "bringOnline" is
run. This method destroys and creates the volumes.
When VolumeBase::create() is run it will notify
MountService, who upon receiving this notification
will send a mount command to mount the new primary
storage.
This command will sometimes run before
setState(State::kUnmounted); is called on the newly
created volume. This will cause the mount command to
fail.
VoldConnector: SND -> {10 volume mount emulated 3 -1}
vold : emulated flags change requires state unmounted or unmountable
vold : emulated user change requires state unmounted or unmountable
vold : emulated mount requires state unmounted or unmountable
Lock bringOnline so no volume commands will be processed
until volumes are (re-)created and have correct state.
Bug:
26322200
Change-Id: I4aba85c226d904c42ae9edcdfec21619218939d6
Jeff Sharkey [Mon, 27 Jun 2016 17:17:51 +0000 (11:17 -0600)]
Fix copy/paste error in benchmark code.
This had minimal impact on the results, since 95% of the writes were
performed through pwrite(), but it's important to fix this for future
benchmark suites.
Bug:
29759783
Change-Id: Ic628aab98b9f9def78508cc722899afdefed84ae
Yabin Cui [Fri, 24 Jun 2016 21:48:49 +0000 (14:48 -0700)]
Use libbootloader_message.
Bug:
29582118
Change-Id: I8de2cfbc62908011dba2ab86d17f977ebcfadac0
Paul Lawrence [Wed, 22 Jun 2016 16:24:51 +0000 (09:24 -0700)]
Stop dropping caches now we have kernel fix
Only merge once
https://partner-android-review.googlesource.com/#/c/619829/1
has been merged into kernel.
Bug:
28779973
Change-Id: Icef78d1e4381e89e07797c36f6f650033d313557
Paul Lawrence [Tue, 24 May 2016 21:20:38 +0000 (14:20 -0700)]
Set encryption mode in mode file
Bug:
28905864
Change-Id: Ie2a5c3e029075d53a86ef3afb7fe364c16d8d52b
Paul Lawrence [Mon, 23 May 2016 22:03:20 +0000 (22:03 +0000)]
Revert "Add fileencrypted=software/ice to fstab options"
This reverts commit
01f1bc725475098e5ae07fd8f440abcd55b154c4.
Bug:
28905864
Change-Id: I489f5d073530438829038630af7af6b2a5cbdbbe
The Android Automerger [Thu, 19 May 2016 07:04:19 +0000 (00:04 -0700)]
merge in nyc-release history after reset to nyc-dev
Paul Crowley [Wed, 18 May 2016 22:59:57 +0000 (22:59 +0000)]
Two phases to set the password for disk encryption
am:
a363036b44
* commit '
a363036b44f7f140aa9a943578f56abff5880a60':
Two phases to set the password for disk encryption
Change-Id: Ia28823079d8c0bda220238339f28095b234a0ae5
Paul Crowley [Tue, 17 May 2016 21:17:56 +0000 (14:17 -0700)]
Two phases to set the password for disk encryption
Revert "Revert "Two phases to set the password for disk encryption""
This reverts commit
d402389290eeef86be7eb9241e20fdd125d44eb1.
In addition, fix the bug in the original commit.
Bug:
28154455
Bug:
28694324
Change-Id: I885f1d73e739416347c135d79979941c2bbdbe62
Paul Lawrence [Thu, 5 May 2016 18:02:07 +0000 (11:02 -0700)]
Add fileencrypted=software/ice to fstab options
Bug:
28616054
Change-Id: If3fddd62f069c7e3e8369a1db68e69c390059d63
The Android Automerger [Wed, 11 May 2016 07:04:20 +0000 (00:04 -0700)]
merge in nyc-release history after reset to nyc-dev
Paul Crowley [Tue, 10 May 2016 20:36:43 +0000 (20:36 +0000)]
Revert "Two phases to set the password for disk encryption"
This reverts commit
92c5eeb46779f0fa1c9e6db6b0d632d960cbb2e4.
Bug:
28694324
Change-Id: Ibbbaff287f4dd28f4a13e122a3617987a8875a44
Paul Crowley [Tue, 10 May 2016 22:17:38 +0000 (22:17 +0000)]
Merge "e4crypt_is_native has been moved into system/extras." into nyc-dev
am:
cfa03d4a4c
* commit '
cfa03d4a4c53acf41dca2c41a2efd00de06043bb':
e4crypt_is_native has been moved into system/extras.
Change-Id: I345475c44fb2d8812a25c9f2195c748cddc55bfe
Paul Crowley [Tue, 10 May 2016 22:12:49 +0000 (22:12 +0000)]
Merge "e4crypt_is_native has been moved into system/extras." into nyc-dev
Paul Crowley [Tue, 10 May 2016 21:19:47 +0000 (21:19 +0000)]
Revert "Two phases to set the password for disk encryption"
am:
d402389290
* commit '
d402389290eeef86be7eb9241e20fdd125d44eb1':
Revert "Two phases to set the password for disk encryption"
Change-Id: I53a3804fc7bff9c99840aeee36fc4b7ff8e46ac1
Paul Crowley [Tue, 10 May 2016 20:36:43 +0000 (20:36 +0000)]
Revert "Two phases to set the password for disk encryption"
This reverts commit
92c5eeb46779f0fa1c9e6db6b0d632d960cbb2e4.
Bug:
28694324
Change-Id: Ibbbaff287f4dd28f4a13e122a3617987a8875a44
Paul Crowley [Wed, 27 Apr 2016 17:25:12 +0000 (10:25 -0700)]
e4crypt_is_native has been moved into system/extras.
Bug:
28318405
Change-Id: Id962764cf7fb5f58b769bf99aeb6d3d69cb66991
The Android Automerger [Tue, 10 May 2016 07:04:09 +0000 (00:04 -0700)]
merge in nyc-release history after reset to nyc-dev
Paul Crowley [Mon, 9 May 2016 21:51:33 +0000 (21:51 +0000)]
Two phases to set the password for disk encryption
am:
92c5eeb467
* commit '
92c5eeb46779f0fa1c9e6db6b0d632d960cbb2e4':
Two phases to set the password for disk encryption
Change-Id: I82c1cfa2874ac4709e42f5c2047c832cbcaccb91
Paul Crowley [Fri, 22 Apr 2016 19:09:54 +0000 (12:09 -0700)]
Two phases to set the password for disk encryption
In one phase, we make the new password work, and in the second we make
it the only one which works ("fixation"). This means that we can set
the password in Gatekeeper between these two phases, and a crash
doesn't break things. Unlocking a user automatically fixates the
presented credential.
Bug:
28154455
Change-Id: I54623c8652f0c9f72dd60388a7dc0ab2d48e81c7