Commit graph

2435 commits

Author SHA1 Message Date
Daniel Rosenberg
6a1c15cf5b Merge "Fix error reporting in cp_commitChanges" am: 2a683d4ce6 am: b0b31d360d
am: bc03daec62

Change-Id: I5f223c94f436e33c74272f0364e11697f3b7838e
2018-11-20 15:04:44 -08:00
Daniel Rosenberg
bc03daec62 Merge "Fix error reporting in cp_commitChanges" am: 2a683d4ce6
am: b0b31d360d

Change-Id: I71ba57abf41afaae7b9f08ed4490fb2c08b5dfe4
2018-11-20 14:54:14 -08:00
Daniel Rosenberg
b0b31d360d Merge "Fix error reporting in cp_commitChanges"
am: 2a683d4ce6

Change-Id: Ie997ca2fac3a6cd8421fdae6617e016b4533486f
2018-11-20 14:14:41 -08:00
Daniel Rosenberg
2a683d4ce6 Merge "Fix error reporting in cp_commitChanges" 2018-11-20 21:58:20 +00:00
Daniel Rosenberg
4b86df1426 Fix error reporting in cp_commitChanges
Only trys to commit if necessary, and reports errors
if commiting fails. RemoveFileIfExists returns true on
success.

Test: vdc checkpoint startCheckpoint, reboot, and then
      vdc checkpoint commitChanges
Bug: 111020314

Change-Id: Ie1b3e49beb3ca04f2881fcc595882c607368b477
2018-11-19 23:47:03 +00:00
TreeHugger Robot
3abbde0027 Merge "Revert "Revert "Revert "vold now prepares a subdirectory for face data."""" 2018-11-19 21:13:34 +00:00
Nick Kralevich
8973e2d5d0 Revert "Revert "Revert "vold now prepares a subdirectory for face data."""
This reverts commit 9dcf54929f.

Reason for revert: Device fails to boot after OTA.

Bug: 116528212
Bug: 119747564
Change-Id: I32bfbc2c2fd560f090e078426315111f241e76cf
2018-11-19 18:47:47 +00:00
Kevin Chyn
7e6560402b Merge "Revert "Revert "vold now prepares a subdirectory for face data.""" 2018-11-16 07:19:56 +00:00
Kevin Chyn
9dcf54929f Revert "Revert "vold now prepares a subdirectory for face data.""
This reverts commit a70d237a05.

Reason for revert: Submitting together or after SELinux policy is in place

Change-Id: I952f94df99496ced04adba1ec28d42be53202982
2018-11-15 23:08:14 +00:00
Kevin Chyn
5792935a8e Merge "Revert "vold now prepares a subdirectory for face data."" 2018-11-15 22:53:45 +00:00
Kevin Chyn
a70d237a05 Revert "vold now prepares a subdirectory for face data."
This reverts commit 21b3b37af3.

Reason for revert: device not booting

Change-Id: Ia76b8454268d70dcd9d9f1ad0d291aaec63b3fd4
2018-11-15 22:46:35 +00:00
Jie
ef733754e7 Merge "Add fsync for renaming user ce key path" am: 622585b11b am: c26ff35858
am: fd2eabf1e6

Change-Id: I89cc0d8bc3ddaf757c6d4704d7097662a5fbda8c
2018-11-15 13:58:40 -08:00
Jie
fd2eabf1e6 Merge "Add fsync for renaming user ce key path" am: 622585b11b
am: c26ff35858

Change-Id: Ia569027d46e853adeb868f5c4bd83b4619452c61
2018-11-15 13:52:21 -08:00
Jie
c26ff35858 Merge "Add fsync for renaming user ce key path"
am: 622585b11b

Change-Id: Ic110b6725790398a235d0766330b0899ab52bedb
2018-11-15 13:45:12 -08:00
Treehugger Robot
622585b11b Merge "Add fsync for renaming user ce key path" 2018-11-15 21:35:25 +00:00
Kevin Chyn
cb7fd49601 Merge "vold now prepares a subdirectory for face data." 2018-11-15 18:59:16 +00:00
Ben Murdoch
0a0cda395b Merge changes from topics "appfuse-revert", "appfuse"
* changes:
  Revert "Change AppFuse mount location to vold namespace"
  Merge commit 'c4381df50a0f226a60a63c786f57ed74e9c4fc6b' into manual_merge_c4381df50a0f226a60a63c786f57ed74e9c4fc6b
2018-11-15 13:19:16 +00:00
Jie
b6698d56ac Add fsync for renaming user ce key path
Device can't start up after the following steps:
1. set screen lock to PIN/Pattern/Password
2. set screen lock to Swipe/None
3. power down immediately after pressing "YES, REMOVE"
4. reboot

failed log:
Failed to read from /data/misc/vold/user_keys/ce/0/current/keymaster_key_blob

root cause:
flushing data failed because of power down

issue:
https://partnerissuetracker.corp.google.com/u/1/issues/119382750
2018-11-15 06:25:37 +00:00
Risan
e9f7bc3e20 Revert "Change AppFuse mount location to vold namespace"
This reverts commit 5f53cd3b79.

Test: Presubmit
Change-Id: Ib2b349018c9e57cb7f5e6f755dcf8f97e9b2f255
2018-11-15 15:15:14 +09:00
Sudheer Shanka
105fd6ff0f Merge "Update shared sandbox prefix to "shared-"." 2018-11-14 18:02:00 +00:00
Risan
7c7d05f1c9 Merge commit 'c4381df50a0f226a60a63c786f57ed74e9c4fc6b' into manual_merge_c4381df50a0f226a60a63c786f57ed74e9c4fc6b
Test: presubmit
Change-Id: I031fbde20b8e66e7ef1255a1ff3a3c15644070f9
2018-11-14 23:57:23 +09:00
Risan
c4381df50a Merge "Change AppFuse mount location to vold namespace" am: b2455747a9
am: 996963c938

Change-Id: I416009aac32118613ffdade06280a1a848e9ec18
2018-11-14 00:10:35 -08:00
Risan
996963c938 Merge "Change AppFuse mount location to vold namespace"
am: b2455747a9

Change-Id: I59cb49859d9622dd460e61e1b55220dd04585ad5
2018-11-13 23:45:19 -08:00
Treehugger Robot
b2455747a9 Merge "Change AppFuse mount location to vold namespace" 2018-11-14 07:27:38 +00:00
Sudheer Shanka
637457d502 Update shared sandbox prefix to "shared-".
":" is not allowed in filenames by vfat.

Bug: 119525489
Test: sm set-virtual-disk true

Change-Id: I22945f2b359b6523ed0a058ca4015dcfef7f7d0e
2018-11-13 17:49:26 -08:00
Risan
5f53cd3b79 Change AppFuse mount location to vold namespace
Previously, AppFuse is mounted in system_server's mount namespace. This
CL moves the mount location to vold namespace.

Bug: 110379912
Test: testOpenProxyFileDescriptor passes
Change-Id: Id93c26d5a98842c78f27850c83e15df619cec1ab
2018-11-13 22:46:23 +00:00
Risan
4d8ba07231 Merge "StubVolume as first class Volume in Vold" am: dcbce84fed am: 14955896e5
am: a294e197b4

Change-Id: Iaec41c8ffe6feaa59163987c914fa21edc7ae2cd
2018-11-13 12:13:23 -08:00
Risan
a294e197b4 Merge "StubVolume as first class Volume in Vold" am: dcbce84fed
am: 14955896e5

Change-Id: Ia19e2984d9b2fe3f9c44abf40ea94463988ed910
2018-11-13 11:58:02 -08:00
Risan
14955896e5 Merge "StubVolume as first class Volume in Vold"
am: dcbce84fed

Change-Id: Ib8b824d0a9b68864988277d803e094a73f7e7905
2018-11-13 11:45:19 -08:00
Treehugger Robot
dcbce84fed Merge "StubVolume as first class Volume in Vold" 2018-11-13 19:20:38 +00:00
TreeHugger Robot
7f5f1b12ff Merge "Avoid double close in delete_dir_contents." 2018-11-12 23:46:41 +00:00
Zachary Iqbal
21b3b37af3 vold now prepares a subdirectory for face data.
Change-Id: I32ec05942aac03b95b2abe5d042833197d69706b
Fixes: 116528212
Test: Built and tested locally.
2018-11-08 22:10:05 -08:00
Risan
8c9f33242f StubVolume as first class Volume in Vold
StubVolume is a Volume that is maintained by external party such as the
ChromeOS processes in ARC++.

Bug: 110380403
Test: Tested on ARC++

Change-Id: I3198bd7283d5f60a524da3707dea7385ffec599d
2018-11-08 07:40:43 +00:00
Paul Crowley
148bf21531 [automerger skipped] Merge "Wait for dm device to be ready before format" am: b3001b9f28 am: 65faa9850c
am: f56ae9c612  -s ours

Change-Id: I8ee90035b74dc822677a72f350af40ae5116082f
2018-11-05 15:19:44 -08:00
Paul Crowley
f56ae9c612 Merge "Wait for dm device to be ready before format" am: b3001b9f28
am: 65faa9850c

Change-Id: I3ab6bd7fd3c216b647b9a7552b28c2f2be285fdb
2018-11-05 15:14:34 -08:00
Paul Crowley
65faa9850c Merge "Wait for dm device to be ready before format"
am: b3001b9f28

Change-Id: Ifa756a04027932a99ec35732f9f91f31bc1bcc9e
2018-11-05 15:09:32 -08:00
Treehugger Robot
b3001b9f28 Merge "Wait for dm device to be ready before format" 2018-11-05 22:53:27 +00:00
Josh Gao
e3c32e0d2f Avoid double close in delete_dir_contents.
fdopendir takes ownership of the file descriptor, leading to it being
closed by both unique_fd's destructor and closedir.

Test: treehugger
Change-Id: Ibd193e988c77c5323720531445f334c0795c68b9
2018-11-05 13:59:46 -08:00
Paul Crowley
cfe3972f2d Wait for dm device to be ready before format
It can sometimes take a moment for the dm-device to appear after
creation, causing operations on it such as formatting to fail.
Ensure the device exists before create_crypto_blk_dev returns.

Test: adb sm set-virtual-disk true and format as adoptable.
Bug: 117586466
Change-Id: Id8f571b551f50fc759e78d917e4ac3080e926722
Merged-In: Id8f571b551f50fc759e78d917e4ac3080e926722
2018-11-05 13:59:08 -08:00
Paul Crowley
298fa3264f Wait for dm device to be ready before format
It can sometimes take a moment for the dm-device to appear after
creation, causing operations on it such as formatting to fail.
Ensure the device exists before create_crypto_blk_dev returns.

Test: adb sm set-virtual-disk true and format as adoptable.
Bug: 117586466
Change-Id: Id8f571b551f50fc759e78d917e4ac3080e926722
2018-11-02 15:48:03 -07:00
Eric Biggers
2e4f425995 Merge changes from topic "e4crypt_to_fscrypt" am: ddbd8325f5 am: e6680f17a8
am: 4209eb4138

Change-Id: I4f86e73f46da5e9cfdc3bc76f9833e233c313aaf
2018-10-29 10:41:12 -07:00
Eric Biggers
b288bf0f44 vold: rename from "ext4 encryption" to fscrypt am: a701c458ca am: 10b70834a4
am: a51283d281

Change-Id: I346bca3f23cfe84d77e5de1e8ef601fb7debf620
2018-10-29 10:41:02 -07:00
Eric Biggers
4209eb4138 Merge changes from topic "e4crypt_to_fscrypt" am: ddbd8325f5
am: e6680f17a8

Change-Id: Ie093f99065ac99b31ab92910b5618473057c07e2
2018-10-29 10:36:57 -07:00
Eric Biggers
a51283d281 vold: rename from "ext4 encryption" to fscrypt am: a701c458ca
am: 10b70834a4

Change-Id: I20fc4fef6b5bb5fd9062d0f1c6d83668a32e67dd
2018-10-29 10:36:49 -07:00
Eric Biggers
e6680f17a8 Merge changes from topic "e4crypt_to_fscrypt"
am: ddbd8325f5

Change-Id: Ifbe5a1bfd2d9a4b0e97197ab91358df356b0d0b2
2018-10-29 10:32:57 -07:00
Eric Biggers
10b70834a4 vold: rename from "ext4 encryption" to fscrypt
am: a701c458ca

Change-Id: I2433a349e40e530439bdc84d39b6295213597b9e
2018-10-29 10:32:49 -07:00
Eric Biggers
ddbd8325f5 Merge changes from topic "e4crypt_to_fscrypt"
* changes:
  vold: get the fscrypt kernel API declarations from linux/fs.h
  vold: rename from "ext4 encryption" to fscrypt
2018-10-29 17:19:39 +00:00
Sudheer Shanka
9565b1f157 Merge "Update StorageManagerService handling of packages info." 2018-10-26 17:29:24 +00:00
Eric Biggers
a701c458ca vold: rename from "ext4 encryption" to fscrypt
We support file-based encryption on both ext4 and f2fs now, and the
kernel API is the same.  So rename things appropriately in vold:

    e4crypt => fscrypt
    ext4enc => fscrypt
    Ext4Crypt => FsCrypt
    EXT4_* => FS_*
    ext4_encryption_key => fscrypt_key

Additionally, the common functions shared by 'vold' and 'init' are now
in libfscrypt rather than ext4_utils.  So update vold to link to
libfscrypt and include the renamed headers.

Note: there's a chance of 'fscrypt' being confused with the dm-crypt
based encryption code in vold which is called 'cryptfs'.  However,
fscrypt is the name used in the kernel for ext4/f2fs/ubifs encryption,
and it's preferable to use the same name in userspace.

Test: built, booted device with f2fs encryption
Change-Id: I2a46a49f30d9c0b73d6f6fe09e4a4904d4138ff6
2018-10-25 17:12:32 -07:00
Eric Biggers
ba997ee583 vold: get the fscrypt kernel API declarations from linux/fs.h
bionic now has linux/fs.h from the 4.14 kernel, which has the fscrypt
kernel API declarations.  Replace the manual declarations in vold,
except for FS_AES_256_XTS_KEY_SIZE which is not available.

Test: built, booted device with f2fs encryption
Change-Id: I6a0e3117eaebe3baac7385421afce2169d46ad55
2018-10-25 17:12:32 -07:00