Commit graph

2946 commits

Author SHA1 Message Date
Sudheer Shanka
023b5391f9 Remove sandbox specific bind mounts from root namespace.
Update vold to only create package sandboxes and not do any bind mounts.
After zygote forks, all the necessary bind mounts will be setup for
the process.

Bug: 124009234
Test: manual
Test: atest cts/hostsidetests/appsecurity/src/android/appsecurity/cts/ExternalStorageHostTest.java
Test: atest DownloadProviderTests
Test: atest cts/tests/app/src/android/app/cts/DownloadManagerTest.java
Test: atest MediaProviderTests
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*

Change-Id: Ia42209cb74cbc423bb09c1c51cb7a164f7c568da
2019-02-06 19:36:11 -08:00
Paul Crowley
4928819dd5 Merge "Fix search for values in blkId output" am: 0fbc5af676 am: 56715503b5
am: 464ff37019

Change-Id: I5d47ddedc29cafa05424e6bfcfd6b99885614d7c
2019-02-05 19:42:50 -08:00
Paul Crowley
464ff37019 Merge "Fix search for values in blkId output" am: 0fbc5af676
am: 56715503b5

Change-Id: I9b24f0bd748a38ca29e2b258a54cd2b9bdcb7cc3
2019-02-05 19:38:50 -08:00
Paul Crowley
56715503b5 Merge "Fix search for values in blkId output"
am: 0fbc5af676

Change-Id: Ica4be0ea315c0aa6a2d6289139a88a8fa944deac
2019-02-05 19:33:46 -08:00
Treehugger Robot
0fbc5af676 Merge "Fix search for values in blkId output" 2019-02-06 03:19:32 +00:00
Paul Crowley
95abfa0cfd Fix search for values in blkId output
Bug: 122497152
Test: atest tests/Utils_test.cpp
Test: adb shell sm partition disk:7,32 private ; adb logcat -d
Change-Id: Ic7d32bdbc0c55ce1d21f7f9e74c6a6fb3dcf332a
2019-02-05 16:57:40 -08:00
Daniel Rosenberg
886915bb6f Mark A/B Boot success before committing checkpoint
This marks the slot as successful within commitChanges, increasing the
available roll back window significantly.

Test: When taking an update on a checkpoint enabled device, it
      marks the slot as successful just before committing the
      checkpoint. Visible in logs as call to vdc commitChanges,
      followed by "Marked slot as booted succesfully."
Bug: 123260515
Change-Id: If71fcde57b3bdee2cfaabb590f123a2d00da3228
2019-02-05 16:56:55 -08:00
Daniel Rosenberg
c06a6f3eb4 Merge "Use global default_fstab instead of re-reading" am: 64f5e5bb38 am: fd5d1b173c
am: 8442c10304

Change-Id: I218e252ff21f51cb87bbd1bddc9a0c1048072476
2019-02-04 15:34:06 -08:00
Daniel Rosenberg
8442c10304 Merge "Use global default_fstab instead of re-reading" am: 64f5e5bb38
am: fd5d1b173c

Change-Id: I7ec6ba24f23b3ab62317802422eb2b01e616bce1
2019-02-04 15:30:00 -08:00
Daniel Rosenberg
fd5d1b173c Merge "Use global default_fstab instead of re-reading"
am: 64f5e5bb38

Change-Id: Ief94647963db3c48f1aeb89e7d8ccd5f7cb63da7
2019-02-04 15:25:00 -08:00
Daniel Rosenberg
64f5e5bb38 Merge "Use global default_fstab instead of re-reading" 2019-02-04 23:14:51 +00:00
Daniel Rosenberg
253b44ea6d Use global default_fstab instead of re-reading
VoldUtils already has a pre-parsed fstab. Use it instead.

Test: Checkpoint functions continue to work
Change-Id: I96cbab467a7b809c92c4f6cdf7a06abca8c5aa5e
2019-02-01 19:41:46 -08:00
Tom Cherry
1464410580 Merge "Move over to the C++ Fstab class" am: b6d5cd20d7 am: 4e8e70a949
am: f61f61a6a0

Change-Id: I90f0f0e1161463cef8542a586b53274ec5a2f5ee
2019-01-31 17:23:24 -08:00
Tom Cherry
f61f61a6a0 Merge "Move over to the C++ Fstab class" am: b6d5cd20d7
am: 4e8e70a949

Change-Id: I08d7937f718739f6444780cbd0cc72634dba841c
2019-01-31 17:18:20 -08:00
Tom Cherry
4e8e70a949 Merge "Move over to the C++ Fstab class"
am: b6d5cd20d7

Change-Id: Ia9c8b38cb014f30f0ca609bd71cfe1b0de9c27d3
2019-01-31 17:13:44 -08:00
Tom Cherry
b6d5cd20d7 Merge "Move over to the C++ Fstab class" 2019-02-01 01:02:50 +00:00
Tom Cherry
4c5bde2b92 Move over to the C++ Fstab class
Test: build and boot
Change-Id: Id3850c9c133f6644073a2439368501253a2a94a9
2019-01-31 12:34:39 -08:00
LongPing Wei
4341439292 Merge "Remove secontext.h, secontext.cpp, hash.h" am: eb00112e09 am: f058440b3b
am: b6bd5f21b8

Change-Id: I6e11c6a1d7633ef4e5f9c9d2f7fff19306c7753b
2019-01-30 08:50:43 -08:00
LongPing Wei
b6bd5f21b8 Merge "Remove secontext.h, secontext.cpp, hash.h" am: eb00112e09
am: f058440b3b

Change-Id: I339fb6d110cc76ae7bc650736f94880789b0d5a4
2019-01-30 08:45:42 -08:00
LongPing Wei
f058440b3b Merge "Remove secontext.h, secontext.cpp, hash.h"
am: eb00112e09

Change-Id: Ie24ba4a5336a3a8537b43fa2996e53b0dbd85d74
2019-01-30 08:40:38 -08:00
Treehugger Robot
eb00112e09 Merge "Remove secontext.h, secontext.cpp, hash.h" 2019-01-30 16:29:26 +00:00
LongPing Wei
7f3ab95b8d Remove secontext.h, secontext.cpp, hash.h
cryptfs.cpp and MetadataCrypt.cpp can use android::vold::sFsckContext directly.
hash.h is unuseful.

Test: make
Change-Id: I7acdac97d6ed1c9b2a5dc367fcea8aa2942192e8
2019-01-30 16:28:02 +08:00
Eric Biggers
447ee25b01 Merge "cryptfs: improve logging of dm-crypt device creation" am: f028d279ae am: 26aaaeaf10
am: 71c2640ac0

Change-Id: Ifed1e1242cd0e5e6fec7cbd710a8a9cb1dcb67a6
2019-01-29 13:16:03 -08:00
Eric Biggers
71c2640ac0 Merge "cryptfs: improve logging of dm-crypt device creation" am: f028d279ae
am: 26aaaeaf10

Change-Id: I214cc397a8a20eb3cce0c3f41b069fb4fc4fe3c2
2019-01-29 13:12:23 -08:00
Eric Biggers
26aaaeaf10 Merge "cryptfs: improve logging of dm-crypt device creation"
am: f028d279ae

Change-Id: I348e4a6ac62cdd8575e1cdd0602a73442459d0de
2019-01-29 13:08:12 -08:00
Eric Biggers
f028d279ae Merge "cryptfs: improve logging of dm-crypt device creation" 2019-01-29 20:58:29 +00:00
Eric Biggers
182d358d23 Merge "cryptfs: round down dm-crypt device size to crypto sector boundary" am: e7205eaa44 am: b45636cd35
am: 4b42da8e1a

Change-Id: I350a4a6cc8ed052ec5ac2208add168f6a0b5ba92
2019-01-29 10:51:32 -08:00
Eric Biggers
4b42da8e1a Merge "cryptfs: round down dm-crypt device size to crypto sector boundary" am: e7205eaa44
am: b45636cd35

Change-Id: I8361f350fdc16079e9cff61d161af5f0641865d1
2019-01-29 10:47:27 -08:00
Eric Biggers
b45636cd35 Merge "cryptfs: round down dm-crypt device size to crypto sector boundary"
am: e7205eaa44

Change-Id: I4e1a75d8c34388c1b75ce4d9797f21530d01d1ac
2019-01-29 10:42:28 -08:00
Eric Biggers
e7205eaa44 Merge "cryptfs: round down dm-crypt device size to crypto sector boundary" 2019-01-29 18:30:55 +00:00
Eric Biggers
e1a7e77269 cryptfs: improve logging of dm-crypt device creation
Log the main configuration of the dm-crypt device -- the name, the
cipher, the keysize, the real device, and the length -- in addition to
the extra parameters which we were already logging.

(We can't simply log the actual string passed to the kernel, of course,
 because that includes the key.  So we choose the fields individually.)

Test: booted device configured to use FDE and checked the log message
Change-Id: Ia95de807c4fad68d93b7e7e73508a01e5139dc76
2019-01-25 13:42:07 -08:00
Eric Biggers
ed45ec3ae8 cryptfs: round down dm-crypt device size to crypto sector boundary
This is needed to make adoptable storage volumes work with a 4K crypto
sector size when the block device size is not a multiple of 4K.

It is fine to do this because the filesystem ends on a 4K boundary
anyway and doesn't use any partial block at the end.

Bug: 123375298
Test: booted device configured to use FDE with sector size 4k, ran
      'sm set-virtual-disk true' and formatted the virtual SD card as
      adoptable storage.  Then did the same but with a temporary patch
      that changed kSizeVirtualDisk to be misaligned
Change-Id: I95ee6d7dcaaa8989c674aea9988c09116e830b0c
2019-01-25 13:42:02 -08:00
Daniel Rosenberg
c89da3c1c3 Merge "Preserve options on remount in commitChanges" am: aaac873faf am: b6c1c24f86
am: a20b92c0b0

Change-Id: Ifcef103b42a92614db1a5d77951f6bf027b92478
2019-01-24 20:47:52 -08:00
Daniel Rosenberg
a20b92c0b0 Merge "Preserve options on remount in commitChanges" am: aaac873faf
am: b6c1c24f86

Change-Id: I0d7963e307591612e6ab47bff27b49f8f6a1dd2f
2019-01-24 20:42:34 -08:00
Daniel Rosenberg
b6c1c24f86 Merge "Preserve options on remount in commitChanges"
am: aaac873faf

Change-Id: Ie09902ef6111cf2aa57014cb97dcdcbe04ecaf86
2019-01-24 20:39:32 -08:00
Treehugger Robot
aaac873faf Merge "Preserve options on remount in commitChanges" 2019-01-25 04:26:17 +00:00
Daniel Rosenberg
14ca4acd86 Preserve options on remount in commitChanges
Copy the existing mount options when remounting f2fs for checkpointing
mode.

Bug: 123376509
Test: Boot with checkpointing, and ensure entries match fstab
Change-Id: If022d9872a44657b550ab892259230805716dc77
2019-01-24 18:26:53 -08:00
Daniel Rosenberg
38a2899523 Merge "Add supportsCheckpoint" am: 9b2b8fd459 am: 908a4569e9
am: 4cd2102637

Change-Id: I73fea54d60f27468a46bca872ae2f21bdfcb67a1
2019-01-23 22:43:28 -08:00
Daniel Rosenberg
4cd2102637 Merge "Add supportsCheckpoint" am: 9b2b8fd459
am: 908a4569e9

Change-Id: I44edd3fed37f5e41c29b8265eb549ab3d39bb0a6
2019-01-23 22:36:28 -08:00
Daniel Rosenberg
908a4569e9 Merge "Add supportsCheckpoint"
am: 9b2b8fd459

Change-Id: I893b20737f20c0a21be2a4068fb8b49cdb54ed80
2019-01-23 22:30:20 -08:00
Treehugger Robot
9b2b8fd459 Merge "Add supportsCheckpoint" 2019-01-24 06:14:44 +00:00
Daniel Rosenberg
9b667fbe41 Add supportsCheckpoint
This returns true if any entries in the fstab have checkpoint=
set.

Test: Call vdc checkpoint supportsCheckpoint. Should return 1
      iff an fstab entry has checkpoint=fs or checkpoint=block set
Bug: 111020314

Change-Id: Ic79bc96ded4da6605f73992dcff542e7cb50d705
2019-01-22 17:58:03 -08:00
Eric Biggers
03cd2616b2 Merge "cryptfs: check for errors in create_encrypted_random_key()" am: f156c40404 am: 8938607c02
am: d043f574a8

Change-Id: I46e5b938b70b3fada8ced6c63a35d62df6a53354
2019-01-22 11:48:34 -08:00
Eric Biggers
8120a7a670 Merge "Utils: correctly handle read() errors in ReadRandomBytes()" am: a2bd436594 am: 038a274e8a
am: e5296cc04d

Change-Id: I0f81be91efee4512510d9e0422b96d8e75951cd4
2019-01-22 11:38:29 -08:00
Eric Biggers
d043f574a8 Merge "cryptfs: check for errors in create_encrypted_random_key()" am: f156c40404
am: 8938607c02

Change-Id: Iaa851a756275b0027e8415e92a6391d4640bbc1f
2019-01-22 11:00:26 -08:00
Eric Biggers
e5296cc04d Merge "Utils: correctly handle read() errors in ReadRandomBytes()" am: a2bd436594
am: 038a274e8a

Change-Id: I64d09e4a3164749a915b079dcffe56940182a7d2
2019-01-22 11:00:06 -08:00
Eric Biggers
8938607c02 Merge "cryptfs: check for errors in create_encrypted_random_key()"
am: f156c40404

Change-Id: I67871c595dfeab96de3096e0bcf61c69261cb9cc
2019-01-22 10:33:43 -08:00
Eric Biggers
038a274e8a Merge "Utils: correctly handle read() errors in ReadRandomBytes()"
am: a2bd436594

Change-Id: If33693132dd4954135070c2681053a49f885ed0e
2019-01-22 10:33:21 -08:00
Eric Biggers
f156c40404 Merge "cryptfs: check for errors in create_encrypted_random_key()" 2019-01-22 18:18:18 +00:00
Eric Biggers
a2bd436594 Merge "Utils: correctly handle read() errors in ReadRandomBytes()" 2019-01-22 18:14:49 +00:00