Commit graph

1509 commits

Author SHA1 Message Date
Wei Wang
1d58bcf6d4 Merge "Update fs_mgr_mount_all function" 2016-09-06 20:05:57 +00:00
Wei Wang
84c985e275 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 1d6476c3c8)

Bug: 30118894
Change-Id: I5e925b900fd477f230a90514cc2b561c7a7e9f49
2016-09-06 12:53:38 -07:00
Wei Wang
c03f1798f7 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 1d6476c3c8)

Bug: 30118894
Change-Id: I5e925b900fd477f230a90514cc2b561c7a7e9f49
2016-09-06 11:42:15 -07:00
Wei Wang
0b71e6faf5 Merge "Update fs_mgr_mount_all function" 2016-09-06 18:23:54 +00:00
Jeff Sharkey
28e3a0a4d7 DO NOT MERGE. Block adoptable storage when using FBE. am: 84be704af4 am: 1fbe38f424
am: 697cd037ad  -s ours

Change-Id: Ie92c12f205634ff4658ebfc7511eefd65495ad5b
2016-09-01 01:08:16 +00:00
Jeff Sharkey
697cd037ad DO NOT MERGE. Block adoptable storage when using FBE. am: 84be704af4
am: 1fbe38f424

Change-Id: I7331a05a5d40d8cf1d946971e86097e716580094
2016-08-31 23:56:45 +00:00
Jeff Sharkey
1fbe38f424 DO NOT MERGE. Block adoptable storage when using FBE.
am: 84be704af4

Change-Id: If12088f04915fb4e7c239a7d0d90aa945183611d
2016-08-31 23:35:13 +00:00
Jeff Sharkey
84be704af4 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 1571751109)
2016-08-31 21:42:32 +00:00
Wei Wang
1d6476c3c8 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

Bug: 30118894
Change-Id: I5e925b900fd477f230a90514cc2b561c7a7e9f49
2016-08-30 17:14:44 -07:00
TreeHugger Robot
f8b14520ca Merge "Blocking mode for debugging purposes." 2016-08-23 22:45:59 +00:00
Jeff Sharkey
1571751109 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
2016-08-23 13:49:00 -06:00
Paul Crowley
dff8c727c1 Support Keymaster 2 configuration and key upgrading
Bug: 27212248
Change-Id: I96bd9a442f4f535ba6ea44c9e81bcc1fee0ec471
2016-08-15 13:58:37 -07:00
Jeff Sharkey
fce701b5f1 Blocking mode for debugging purposes.
The default non-blocking mode doesn't log stdout/err from the
commands exec'ed during a move.

Bug: 29923055
Change-Id: I9de3fe9bfcfa3c1d39a32ecc89dd765202460376
2016-08-10 17:41:19 +00:00
Chih-Hung Hsieh
0fe14bdd1c Merge "Fix google-explicit-constructor warnings in system/vold." am: a3bcf26d93 am: 9bf2a320e7 am: 1c1c4edb98
am: 3634db02a4

Change-Id: I4ce806283833c3fe8bcb713726e7fc3c0d087c90
2016-08-02 20:46:54 +00:00
Chih-Hung Hsieh
3634db02a4 Merge "Fix google-explicit-constructor warnings in system/vold." am: a3bcf26d93 am: 9bf2a320e7
am: 1c1c4edb98

Change-Id: I0493425398506c29c364965eb20e45cdaa1f9f1f
2016-08-02 20:37:24 +00:00
Chih-Hung Hsieh
1c1c4edb98 Merge "Fix google-explicit-constructor warnings in system/vold." am: a3bcf26d93
am: 9bf2a320e7

Change-Id: I8e1288bd16b8a1c968d890412b5d1bdf03e9ae7a
2016-08-02 20:34:51 +00:00
Chih-Hung Hsieh
9bf2a320e7 Merge "Fix google-explicit-constructor warnings in system/vold."
am: a3bcf26d93

Change-Id: I109b4e68954de019827eddca2001f4bcac91130d
2016-08-02 20:32:22 +00:00
Treehugger Robot
a3bcf26d93 Merge "Fix google-explicit-constructor warnings in system/vold." 2016-08-02 20:20:58 +00:00
Chih-Hung Hsieh
a4353671b1 Fix google-explicit-constructor warnings in system/vold.
Bug: 28341362
Change-Id: I14344b0cba134570bf87e7d61aa03503735dd794
Test: build with WITH_TIDY=1
2016-08-02 11:41:54 -07:00
Chih-hung Hsieh
0955770f88 Merge \\\\"Fix clang-tidy performance warnings in system/vold.\\\\" am: e24d4eef9b am: aa668f3d13 am: ed1c4cf456
am: 73a3576ef9

Change-Id: I7aa15c236ba857833b392e2eb5646f468761749a
2016-07-28 00:50:26 +00:00
Chih-Hung Hsieh
73a3576ef9 Merge \\\"Fix clang-tidy performance warnings in system/vold.\\\" am: e24d4eef9b am: aa668f3d13
am: ed1c4cf456

Change-Id: I345cfce27a2b20048953d85bb2dd39adc34190d8
2016-07-28 00:30:43 +00:00
Chih-hung Hsieh
ed1c4cf456 Merge \\"Fix clang-tidy performance warnings in system/vold.\\" am: e24d4eef9b
am: aa668f3d13

Change-Id: I7f175785ab17ad9107bd11e9cd4ff0a9a7cbd460
2016-07-27 23:20:23 +00:00
Chih-Hung Hsieh
aa668f3d13 Merge \"Fix clang-tidy performance warnings in system/vold.\"
am: e24d4eef9b

Change-Id: I8e882391fb343a5dd8b5cd32b2e7c087219334dc
2016-07-27 23:17:57 +00:00
Chih-hung Hsieh
e24d4eef9b Merge "Fix clang-tidy performance warnings in system/vold." 2016-07-27 22:42:50 +00:00
Chih-Hung Hsieh
11a2ce8da3 Fix clang-tidy performance warnings in system/vold.
* Use const reference type for for-loop index variables
  to avoid unnecessary copy.

Bug: 30413223
Change-Id: Id4d980ae8afec1374fc3be0b23f1c6a39bff86e0
Test: build with WITH_TIDY=1
2016-07-27 14:11:02 -07:00
Paul Crowley
a345c88826 Don\\'t try to fixate CE keys for ephemeral users am: 25a713873c
am: 048d4c8518

Change-Id: I0d612f2fda4595181331d0463a3080383cfb5950
2016-07-26 16:35:39 +00:00
Paul Crowley
048d4c8518 Don\'t try to fixate CE keys for ephemeral users
am: 25a713873c

Change-Id: I7ecf1fcc6763943c124a93c433f49274579851ae
2016-07-26 16:32:36 +00:00
Paul Crowley
25a713873c 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
2016-07-25 15:55:36 -07:00
Paul Crowley
05863d294e Don\\'t fail if a key we want to delete is already deleted am: ab0b56aef3
am: 2fa4435fae

Change-Id: Ia94ef7372900449af7fabd2bffeb592f831b073d
2016-07-22 16:53:07 +00:00
Paul Crowley
2fa4435fae Don\'t fail if a key we want to delete is already deleted
am: ab0b56aef3

Change-Id: I08920a3e330443e7466f0acc924cd21dbebba4c4
2016-07-22 16:50:31 +00:00
Paul Crowley
ab0b56aef3 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
2016-07-21 11:27:15 -07:00
Paul Crowley
77d41a0ab7 Don\\'t evict keys when we delete users am: abc253884f
am: 00256b54f2

Change-Id: Ia1d169adbfc93b7b588384b7655c82ed6338214d
2016-07-20 04:16:21 +00:00
Paul Crowley
00256b54f2 Don\'t evict keys when we delete users
am: abc253884f

Change-Id: I2628957c50469948e78a5f1f626c3ace44eccbc0
2016-07-20 04:13:49 +00:00
Thurston Dang
b251de0a9b Merge "Call EVP_CIPHER_CTX_cleanup to avoid leaking memory that was allocated in EVP_DecryptInit_ex" 2016-07-20 00:32:01 +00:00
Paul Crowley
abc253884f Don't evict keys when we delete users
Work around a kernel bug that was causing lockups.

Bug: 30225438
Change-Id: Ia6eb60774037e692351af8eaed98b79596ea3635
2016-07-19 16:00:35 -07:00
Thurston Hou Yeen Dang
06dc311817 Call EVP_CIPHER_CTX_cleanup to avoid leaking memory that was allocated in EVP_DecryptInit_ex
Also add matching cleanup to EVP_EncryptInit_ex for symmetry (though I'm not
convinced it actually leaks memory)

Change-Id: Icf72dd9e0295d8b6ea55909266a43e684b16420f
2016-07-18 14:16:37 -07:00
Jeff Sharkey
949969689f Only restorecon CE storage after unlocked. am: d24aeda425
am: e30c22a65b

Change-Id: Id36d43509d13c3ae2371cefa3aa17fda23f383df
2016-07-18 16:09:35 +00:00
Jeff Sharkey
e30c22a65b Only restorecon CE storage after unlocked.
am: d24aeda425

Change-Id: Ia4151dc87769bb4c4b7bee1bb0a09933c74f3d6c
2016-07-18 16:06:34 +00:00
Jeff Sharkey
d24aeda425 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
2016-07-18 09:52:46 -06:00
Paul Crowley
eaa33afd1f Merge \\"Run secdiscard on encrypted key and key blob too\\" into nyc-mr1-dev am: ec813c4e35
am: c79c92ad09

Change-Id: Iac921cc46b197cf7ec3b2b26ec6c393ce69226bd
2016-07-13 19:57:44 +00:00
Paul Crowley
f2bf221d0e Merge \\"Zero out blocks if BLKSECDISCARD fails\\" into nyc-mr1-dev am: d6a39dd78a
am: a1b2949be2

Change-Id: Idf265f2e15fd5c650c73d8c9a1ca7ee26209f29a
2016-07-13 19:57:43 +00:00
Paul Crowley
c79c92ad09 Merge \"Run secdiscard on encrypted key and key blob too\" into nyc-mr1-dev
am: ec813c4e35

Change-Id: I8507fdc7e183a53d3bb129ed346cb649eddffff5
2016-07-13 19:54:02 +00:00
Paul Crowley
a1b2949be2 Merge \"Zero out blocks if BLKSECDISCARD fails\" into nyc-mr1-dev
am: d6a39dd78a

Change-Id: I7ee62f8cb0b2144f4385bd132a3d32ecf3d918d2
2016-07-13 19:54:02 +00:00
Paul Crowley
ec813c4e35 Merge "Run secdiscard on encrypted key and key blob too" into nyc-mr1-dev 2016-07-13 19:49:52 +00:00
Paul Crowley
d6a39dd78a Merge "Zero out blocks if BLKSECDISCARD fails" into nyc-mr1-dev 2016-07-13 19:49:21 +00:00
Paul Crowley
beb33a67e1 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
2016-07-11 17:31:44 -07:00
Paul Crowley
2143ee8d61 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
2016-07-11 17:31:36 -07:00
Henrik Baard
848639bdfc Failing to \\"Migrate data\\" leaves target unusable am: 77f156d9f0
am: 1bc5ab0c4d

Change-Id: I1b93a87bb03039c627a9e057a1d1b56a2304da9e
2016-07-07 01:53:29 +00:00
Henrik Baard
399448345e Migrating data sometimes leaves emulated unmounted am: 7f52bca485
am: 78c63c26a7

Change-Id: I9262b09b9997e8b019b6a7de8d6bdb04279e580f
2016-07-07 01:53:29 +00:00
Henrik Baard
1bc5ab0c4d Failing to \"Migrate data\" leaves target unusable
am: 77f156d9f0

Change-Id: I56e313c68a35fbb67c0ad9d53f08fa24e4e8e742
2016-07-07 01:35:42 +00:00