Commit graph

2380 commits

Author SHA1 Message Date
Bill Yi
e101e8712e Merge pi-qpr1-release PQ1A.181105.017.A1 to pi-platform-release
Change-Id: I090e55f0f34ff556118caaecbb21169580c66ab6
2018-11-28 18:35:05 -08:00
Treehugger Robot
396040ca2c Merge "Use setmntent with "e" option" 2018-11-28 17:49:17 +00:00
LongPing.WEI
4f04606811 Use setmntent with "e" option
Otherwise it will cause selinux warning in children processes sometimes

Change-Id: I41239c3f9779140622076c644a5f63051d00eaa8
2018-11-23 19:27:35 +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
622585b11b Merge "Add fsync for renaming user ce key path" 2018-11-15 21:35:25 +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
dcbd4fcad2 ARC++ swap for AppFuseUtil
Bug: 110379912
Test: Compiled.
Change-Id: Ib7910ba4df6c60d7125a07b07c62612ed4146ddb
Merged-In: Ib7910ba4df6c60d7125a07b07c62612ed4146ddb
2018-11-14 07:28:36 +00:00
Risan
ac02a4863f Extract AppFuse as a util
Bug: 110379912
Test: testOpenProxyFileDescriptor
Change-Id: I0429a498d7b54682efe9b05815f3470e8745609e
2018-11-14 07:28:06 +00:00
Treehugger Robot
b2455747a9 Merge "Change AppFuse mount location to vold namespace" 2018-11-14 07:27:38 +00: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
Treehugger Robot
dcbce84fed Merge "StubVolume as first class Volume in Vold" 2018-11-13 19:20:38 +00: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
Treehugger Robot
b3001b9f28 Merge "Wait for dm device to be ready before format" 2018-11-05 22:53:27 +00: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
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
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
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
Bill Yi
0016efbc44 Merge pie-platform-release to aosp-master - DO NOT MERGE
Change-Id: I112d144eac39f426e22d3a66e4fe298306010c13
2018-10-24 14:48:22 -07:00
android-build-team Robot
96ac6dd24d Merge cherrypicks of [5317808, 5317809, 5318498, 5317873, 5318338, 5318195, 5318499, 5317874, 5317875, 5317876, 5318243, 5318244, 5318537, 5318538, 5318539, 5318540, 5318541, 5318542, 5318543, 5318544, 5318545, 5318546, 5315210, 5317756, 5318557, 5318558, 5318559, 5318560, 5318561, 5318339, 5318547, 5318548, 5318549, 5318562, 5318563, 5318564, 5318565, 5318566, 5318172, 5318173, 5318174, 5318550, 5318401, 5318196, 5317889, 5318175, 5318176, 5318577, 5318578, 5318579, 5318580, 5318581, 5318503, 5318390, 5318505, 5318341, 5318551] into pi-qpr1-release
Change-Id: Ia6434abde93ea6328659f8f08c3d5dbe4e69291d
2018-10-20 00:21:03 +00:00
Rubin Xu
94b9956824 [DO NOT MERGE] Fix signedness mismatch and integer underflow
persist_get_max_entries() is supposed to return an unsigned integer as the
maximum number of entries but it also wrongly returns "-1" as an error
condition. Also fix an issue where an unsigned subtraction in this routine
could lead to integer underflow.

Bug: 112731440
Test: manual
Change-Id: I9672e39bef2c12156dda7806a08c52044962c178
(cherry picked from commit 19ef1ae99a)
2018-10-20 00:18:34 +00:00
Bill Yi
8b1136c831 Merge pi-dr1-dev to aosp-master
Change-Id: I5f9eb0c7ea0a3ba88865854e28b73806011d323e
2018-10-19 12:20:56 -07:00
Daniel Rosenberg
aeac5d5f57 [automerger skipped] Merge "Remove spurious function declaration"
am: 090e05bd02  -s ours

Change-Id: I919eeb0ec529c444ea0a32835a4b0306c07fab45
2018-10-16 17:12:32 -07:00
Treehugger Robot
090e05bd02 Merge "Remove spurious function declaration" 2018-10-16 23:55:28 +00:00
Daniel Rosenberg
bc6c1ff8df Merge "Switch to exceptions for most cp calls"
am: ece7e231a6

Change-Id: Ib02d0a002f31834bb07cf8dd9446cec942880a77
2018-10-16 14:34:54 -07:00
Daniel Rosenberg
3bfb996597 Remove spurious function declaration
Test: Nothing changes
Change-Id: I27f0d832d33099efe25794987c307d773b5d987c
Merged-In: Icba16578608a6cbf922472e9d4ae5b8cf5f016c6
2018-10-16 21:28:13 +00:00
Treehugger Robot
ece7e231a6 Merge "Switch to exceptions for most cp calls" 2018-10-16 21:14:34 +00:00
Daniel Rosenberg
73680ec382 Switch to exceptions for most cp calls
This switches the checkpoint calls that don't need to return a value
to return 0 on success, and an error on failure. This will be transalted
to exceptions for java binder users. needsCheckpoint and needsRollback
still return a boolean value.

Test: vdc setCheckpoint 2 then reboot 3 times checking state
Bug: 112901762
Change-Id: Idd3b5e6036631562a86d5123f533b86cf3bd6032
Merged-In: Idd3b5e6036631562a86d5123f533b86cf3bd6032
2018-10-16 20:06:47 +00:00
Daniel Rosenberg
e1e3dc3698 Merge "Handle retry count"
am: e74587af4d

Change-Id: I76c8625e58de0efb7b1d937ce7bcb8499c7fc279
2018-10-15 21:19:59 -07:00
Treehugger Robot
e74587af4d Merge "Handle retry count" 2018-10-16 01:25:34 +00:00
Daniel Rosenberg
80d1ca5600 Handle retry count
Test: vdc setCheckpoint 2 then reboot 3 times checking state
Bug: 112901762
Change-Id: I85a71d059bca27b76175b9bd8465cc453f0ddb8d
2018-10-15 22:13:41 +00:00
android-build-team Robot
2ab3b948d7 Snap for 5066295 from 74b92dc85f to pi-qpr2-release
Change-Id: I4408d15c38595eb7903e4a7544da0a4586a743a9
2018-10-12 22:51:12 +00:00
Rubin Xu
74b92dc85f [automerger skipped] Merge "[DO NOT MERGE] Fix signedness mismatch and integer underflow" into oc-dev am: 92e63e3f9b am: b1498d1d87
am: 89858102c2  -s ours

Change-Id: Idf0858840a8472059899bfd565e4182c2c210693
2018-10-11 16:24:06 -07:00
Rubin Xu
a815fe5d4c [automerger skipped] [automerger] [DO NOT MERGE] Fix signedness mismatch and integer underflow am: ef35553d53 am: 08bd47e9a9 am: 279cc3d65e am: 972b5551f6 skipped: ded6cb5910 am: 0d2edbd6ab am: b078fd6b8c
am: 6460a0149b  -s ours

Change-Id: Ie581371ca539f2513758529dad38dca903b8dac9
2018-10-11 16:23:55 -07:00
Rubin Xu
89858102c2 Merge "[DO NOT MERGE] Fix signedness mismatch and integer underflow" into oc-dev am: 92e63e3f9b
am: b1498d1d87

Change-Id: Ic7ef94c42d54d4f29c92bad98001bd6e065f5013
2018-10-11 16:16:03 -07:00
Rubin Xu
6460a0149b [automerger] [DO NOT MERGE] Fix signedness mismatch and integer underflow am: ef35553d53 am: 08bd47e9a9 am: 279cc3d65e am: 972b5551f6 skipped: ded6cb5910 am: 0d2edbd6ab
am: b078fd6b8c

Change-Id: I163ea50aca6838abcf0c58e042a5fe386f661afe
2018-10-11 16:15:48 -07:00
Rubin Xu
b1498d1d87 Merge "[DO NOT MERGE] Fix signedness mismatch and integer underflow" into oc-dev
am: 92e63e3f9b

Change-Id: Ia169a9fc152f100a9567f2c47ef5a2e46358aa52
2018-10-11 16:10:57 -07:00
Rubin Xu
b078fd6b8c [automerger] [DO NOT MERGE] Fix signedness mismatch and integer underflow am: ef35553d53 am: 08bd47e9a9 am: 279cc3d65e am: 972b5551f6 skipped: ded6cb5910
am: 0d2edbd6ab

Change-Id: I5f5e7425c927bdc6de7b401995fccc1f626355c7
2018-10-11 16:10:41 -07:00
TreeHugger Robot
92e63e3f9b Merge "[DO NOT MERGE] Fix signedness mismatch and integer underflow" into oc-dev 2018-10-11 23:01:50 +00:00
Rubin Xu
19ef1ae99a [DO NOT MERGE] Fix signedness mismatch and integer underflow
persist_get_max_entries() is supposed to return an unsigned integer as the
maximum number of entries but it also wrongly returns "-1" as an error
condition. Also fix an issue where an unsigned subtraction in this routine
could lead to integer underflow.

Bug: 112731440
Test: manual
Change-Id: I9672e39bef2c12156dda7806a08c52044962c178
2018-10-11 11:12:16 +01:00
Bill Rassieur
87135e28b2 Merge PPR2.181005.003 from pi-release-2 into pi-platform-release.
Change-Id: Ifb0130fa2b413d1b8a769684cffb6c6621ea9859
BUG: 117431430
2018-10-10 17:33:05 +00:00
Android Build Merger (Role)
0d2edbd6ab [automerger] [DO NOT MERGE] Fix signedness mismatch and integer underflow am: ef35553d53 am: 08bd47e9a9 am: 279cc3d65e am: 972b5551f6 skipped: ded6cb5910
Change-Id: I4a1b7a1509d00fba8e35755d2fb198c47e9f3999
2018-10-10 10:26:09 +00:00
Android Build Merger (Role)
ded6cb5910 [automerger] [DO NOT MERGE] Fix signedness mismatch and integer underflow am: ef35553d53 am: 08bd47e9a9 am: 279cc3d65e am: 972b5551f6
Change-Id: I878947630e3cec949dbfa361a379637a30d67a1d
2018-10-10 10:26:07 +00:00
Android Build Merger (Role)
972b5551f6 [automerger] [DO NOT MERGE] Fix signedness mismatch and integer underflow am: ef35553d53 am: 08bd47e9a9 am: 279cc3d65e
Change-Id: If379e03d3998c1267bc66f53b308ea28bcd4c128
2018-10-10 10:26:06 +00:00
Android Build Merger (Role)
279cc3d65e [automerger] [DO NOT MERGE] Fix signedness mismatch and integer underflow am: ef35553d53 am: 08bd47e9a9
Change-Id: Ie536c5dd8c447cd3753725040edbec7ce478ea07
2018-10-10 10:26:04 +00:00
Android Build Merger (Role)
08bd47e9a9 [automerger] [DO NOT MERGE] Fix signedness mismatch and integer underflow am: ef35553d53
Change-Id: I094ac59296a118fbacc70b4ead1230b4d8683fa2
2018-10-10 10:26:02 +00:00
Rubin Xu
ef35553d53 [DO NOT MERGE] Fix signedness mismatch and integer underflow
persist_get_max_entries() is supposed to return an unsigned integer as the
maximum number of entries but it also wrongly returns "-1" as an error
condition. Also fix an issue where an unsigned subtraction in this routine
could lead to integer underflow.

Bug: 112731440
Test: manual
Change-Id: I9672e39bef2c12156dda7806a08c52044962c178
2018-10-10 11:23:54 +01:00
Daniel Rosenberg
0b875d7630 Merge "Add checkpointing support for A/B updates"
am: ba1752008d

Change-Id: I62cb1c6dce6c9eca1c3651b05d23cb893559d370
2018-10-04 18:48:04 -07:00
Daniel Rosenberg
ba1752008d Merge "Add checkpointing support for A/B updates" 2018-10-05 01:31:18 +00:00
Paul Lawrence
1c6d73bfcc Merge "Use unique points for fstab"
am: 1e1893812c

Change-Id: I64ce90c05417b8b96ddc1e96cd505ca2aff86082
2018-10-03 17:28:34 -07:00