Commit graph

73339 commits

Author SHA1 Message Date
Treehugger Robot
6565f9fcb4 Merge "Configure Trusty KeyMint devices to use attest_keys." am: 1d02ce9ad4
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1875215

Change-Id: If74e366ead8b86793e9c61e4391d1e8903ce896a
2021-11-22 18:30:46 +00:00
David Anderson
b833669434 Merge "overlayfs: Use userxattrs on supporting kernels." am: 92b3b3fff6
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1897866

Change-Id: I77c231fb1e56b513442ba228d10df06e77eed318
2021-11-22 18:30:31 +00:00
Treehugger Robot
1d02ce9ad4 Merge "Configure Trusty KeyMint devices to use attest_keys." 2021-11-22 18:21:09 +00:00
David Anderson
92b3b3fff6 Merge "overlayfs: Use userxattrs on supporting kernels." 2021-11-22 18:16:10 +00:00
Shawn Willden
b440e0c077 Configure Trusty KeyMint devices to use attest_keys.
Change-Id: If86133e7648b601a4a61ea5614e6971a2bb8d264
Bug: 197096139
Test: Manual
2021-11-22 16:52:30 +00:00
Jeff Vander Stoep
eb74938269 Mark fs-verity support for /metadata if first_api_level >= R
fs-verity is required for new devices launched with R.

This allows files stored on /metadata to be protected by fsverity.

Bug: 199914227
Test: mini-keyctl padd asymmetric fsv-sepolicy .fs-verity \
< /system/etc/security/com.android.sepolicy.cert.der
cp /apex/com.android.sepolicy.apex/app/SEPolicy-33/SEPolicy-33.apk \
/metadata/sepolicy/
fsverity enable /metadata/sepolicy/SEPolicy-33.apk \
--signature=/apex/com.android.sepolicy.apex/etc/SEPolicy-33.apk.fsv_sig

Change-Id: I44434e3d026f1dbe6e261c365b3c70d3556a80b1
2021-11-22 10:26:51 +01:00
Treehugger Robot
c8f2724978 Merge "Check vendor namespace for SPHAL namespace" am: ba3ae06a15
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1895033

Change-Id: I94aadf19ba77b8aa26f6e39a68ddf0ad9db0e398
2021-11-22 09:00:02 +00:00
Treehugger Robot
ba3ae06a15 Merge "Check vendor namespace for SPHAL namespace" 2021-11-22 08:47:18 +00:00
Kiyoung Kim
b77377e62f Check vendor namespace for SPHAL namespace
Vendor APEX section should not separate SPHAL in generic, and also
default namespace does not contain vendor libs in the scope. This change
updates libvndksupport to check 'vendor' namespace when there is no
sphal namespace for vendor APEX section case.

Bug: 193861508
Test: AOSP CF x86_64 boot succeeded
Change-Id: I04cefc12be4c8ec261efb1688a8307b7061bf068
2021-11-22 10:57:44 +09:00
David Anderson
3927785881 Merge "init: Add a way to class_restart only enabled services." am: 4993168f9c
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1886238

Change-Id: I0f7ef072173ce8347da809d0e99f19360284bcb1
2021-11-20 03:33:08 +00:00
David Anderson
4993168f9c Merge "init: Add a way to class_restart only enabled services." 2021-11-20 03:16:22 +00:00
David Anderson
70d057448d overlayfs: Use userxattrs on supporting kernels.
In previous kernels, overlayfs stored its xattrs with a "trusted."
prefix. This requires CAP_SYS_ADMIN. As a workaround, we carried
out-of-tree kernel patches to bypass the security checks on these attrs.

The 5.15 kernel however has a new mount option "userxattr". When this is
set, the "trusted." prefix is replaced with "user.", which eliminates
the CAP_SYS_ADMIN requirement.

On kernels >= 5.15 we can use this feature and drop some of our
out-of-tree patches.

Bug: 204981027
Test: adb remount on cuttlefish with >=5.15
Change-Id: I3f0ca637a62c949fe481eea84f2c682f1ff4517a
2021-11-19 16:03:52 -08:00
Akilesh Kailash
a781512188 snapuserd: Add unit test for test merge code path
Most of the test cases are similar to dm-snapshot-merge.

Additional test cases have been added primarily to test
I/O's in parallel with merge.

Bug: 193863397
Test: snapuserd_test
Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: I2764e6971989c121be873cc425cac464f31ce85f
2021-11-19 23:47:26 +00:00
Akilesh Kailash
6e35cb89ff libsnapshot: Add vts_userspace_snapshot_test
Toggle virtual_ab.userspace.snapshots.enabled to test
both:

1: vts_libsnapshot_test - testing kernel dm-snapshot
2: vts_userspace_snapshot_test - testing user-space snapshot

Bug: 193863443
Test: vts_userspace_snapshot_test
Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: I873e7476d71feb9a2e12054e968443bd22ee817c
2021-11-19 23:47:04 +00:00
Akilesh Kailash
3b874456fc libsnapshot: Integrate userspace snapshots APIs
dm-user block device will be the snapshot device; thus, no
more explicit call to MapSnapshot(). Additionally, block device
name for dm-user will be the snapshot name so that mount works
seamlessly.

API's to query the snapshot status, merge progress has been
integrated. Since daemon requires base device for merge, we pass
additional parameter during initialization.

Add a new virtual a/b property flag to enable/disable
user-snapshots feature. Propagate this flag to init layer
for first stage mount during boot process.

Some minor cleanup and renaming of variables.

Bug: 193863443
Test: 1: Full OTA on CF and pixel and verify the merge completion.
Tested merge-resume path by rebooting device during merge.
2: Incremental OTA on CF and pixel

Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: I5088f40a55807946cd044b3987678ead3696d996
2021-11-19 23:45:43 +00:00
Christopher Ferris
7412b62a7f Merge "Remove non-protobuf path." am: bad9f5fd89
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1897226

Change-Id: Ief1a198021cd83702680a246cf3be414579c242f
2021-11-19 18:36:06 +00:00
Christopher Ferris
bad9f5fd89 Merge "Remove non-protobuf path." 2021-11-19 18:22:46 +00:00
Christopher Ferris
bdea3bb56b Remove non-protobuf path.
It is expensive to keep the non-protobuf path around and it hasn't
been used for an entire release without anyone noticing, so remove it.

Create new end-to-end unit tests that cover tests of the non-proto
code paths that are being deleted.

Bug: 197981919

Test: Unit tests pass.
Change-Id: Ia1c45572300bd63e5f196ad61e5e5386830c8ece
2021-11-19 02:07:30 +00:00
Yi-Yo Chiang
53c82487eb Merge changes I3f56a83e,Icce8c1b5 am: adae766986
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1894973

Change-Id: I88b1c0101adad361117c2c6aa9a00d2f21f27541
2021-11-18 08:41:44 +00:00
Yi-Yo Chiang
adae766986 Merge changes I3f56a83e,Icce8c1b5
* changes:
  Reland "Add ParseFstabFromString(), remove ReadFstabFromFp()"
  Reland "Replace strtok_r() with C++-style android::base::Tokenize()"
2021-11-18 08:24:41 +00:00
Daniel Norman
b3856494f5 Merge "Revert^2 "Load persist props before starting apexd."" am: 9eeffa42e6
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1894205

Change-Id: I2ed45131e583caaa07a60464ece8fb006eeec611
2021-11-17 21:38:45 +00:00
Daniel Norman
9eeffa42e6 Merge "Revert^2 "Load persist props before starting apexd."" 2021-11-17 21:24:28 +00:00
TreeHugger Robot
e7bb1bcf4b Merge "Merge sc-qpr1-dev-plus-aosp-without-vendor@7810918" into stage-aosp-master 2021-11-17 18:58:09 +00:00
Yi-Yo Chiang
97f2fdff68 Reland "Add ParseFstabFromString(), remove ReadFstabFromFp()"
ReadFstabFromFp() have two callers right now, ReadFstabFromFile() and
ReadFstabFromDt(). ReadFstabFromFile() opens a FILE* and pass it to
ReadFstabFromFp(), and ReadFstabFromDt() wraps a std::string::c_str()
buffer in a FILE* adaptor with fmemopen().

There's no need for such adaptor, just change ReadFstabFromFp() to
accept std::string and we're good.

Bug: 206740783
Bug: 204056804
Test: atest CtsFsMgrTestCases
Test: m libfstab_fuzzer
Change-Id: I3f56a83ec5baf7b0d97a618a2c2bb6e31b67b5d9
2021-11-17 16:52:17 +00:00
Martin Stjernholm
b33b3ab71e Merge changes from topic "revert-1890098-KOOTTLPTTT" am: fec41dda67
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1895142

Change-Id: I8c8175967d1f90396c3495069a4f20500a629791
2021-11-17 16:45:46 +00:00
Yi-Yo Chiang
b8837396df Reland "Replace strtok_r() with C++-style android::base::Tokenize()"
android::base::Tokenize() is like android::base::Split() but ignores
empty tokens. Think strtok_r() and strsep().
C++-ify parsing code by replacing strtok_r() with Tokenize(), which
results in more concise and readable code.

Bug: 204056804
Test: atest CtsFsMgrTestCases
(cherry picked from commit 3c1b581fd5)

Change-Id: Icce8c1b5ad074421052f68fa138d90adb85cca27
2021-11-17 16:40:01 +00:00
Martin Stjernholm
fec41dda67 Merge changes from topic "revert-1890098-KOOTTLPTTT"
* changes:
  Revert "Replace strtok_r() with C++-style android::base::Tokenize()"
  Revert "Add ParseFstabFromString(), remove ReadFstabFromFp()"
2021-11-17 16:22:28 +00:00
Martin Stjernholm
867916e8b5 Revert "Replace strtok_r() with C++-style android::base::Tokenize()"
Revert submission 1890098

Reason for revert: Breaks tests, b/206740783
Reverted Changes:
I71190c735:Add ParseFstabFromString(), remove ReadFstabFromFp...
Ic1dd0eb97:Replace strtok_r() with C++-style android::base::T...

Change-Id: I1eecdc43d504385b00caec17db626eb1d623c8ef
2021-11-17 15:51:01 +00:00
Martin Stjernholm
62291bfd5c Revert "Add ParseFstabFromString(), remove ReadFstabFromFp()"
Revert submission 1890098

Reason for revert: Breaks tests, b/206740783
Reverted Changes:
I71190c735:Add ParseFstabFromString(), remove ReadFstabFromFp...
Ic1dd0eb97:Replace strtok_r() with C++-style android::base::T...

Change-Id: I1ded0217670a9bf3f2485120ee0dddf3e854a6fb
2021-11-17 15:51:01 +00:00
Alan Stokes
83c7d72809 Merge "mkdir /metadata/sepolicy" am: 82d6d124f3
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1895136

Change-Id: I184c3b9df96bd25b3d40fbbc99d0a2a27e30b87d
2021-11-17 14:26:21 +00:00
Alan Stokes
82d6d124f3 Merge "mkdir /metadata/sepolicy" 2021-11-17 14:11:14 +00:00
Jeff Vander Stoep
75d0b33d0f mkdir /metadata/sepolicy
Test: make -j; launch_cvd; adb shell ls -laZ /metadata/sepolicy
Bug: 199914227
Change-Id: I005d3eee0e047da9a7f671e87a0274fedaf59447
2021-11-17 10:45:34 +00:00
Yi-Yo Chiang
9276e88b4b Merge changes I71190c73,Ic1dd0eb9 am: e2316bb11c
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1890098

Change-Id: I1887a7478285f116e58de138eac3e8edb93d9757
2021-11-17 04:36:02 +00:00
Yi-Yo Chiang
e2316bb11c Merge changes I71190c73,Ic1dd0eb9
* changes:
  Add ParseFstabFromString(), remove ReadFstabFromFp()
  Replace strtok_r() with C++-style android::base::Tokenize()
2021-11-17 04:21:55 +00:00
Daniel Norman
ebaa3e5146 Revert^2 "Load persist props before starting apexd."
f106650b04

Change-Id: I8a774130d178dbf56ba23d152c82a57751de4b6b
2021-11-16 20:28:29 +00:00
Owen Kim
c6d988c60f Merge "Revert "Load persist props before starting apexd."" am: 5f77edac5b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1893460

Change-Id: I0fab789ae1701febf71995aa236615e438d64f97
2021-11-16 08:55:12 +00:00
Owen Kim
5f77edac5b Merge "Revert "Load persist props before starting apexd."" 2021-11-16 08:39:27 +00:00
Owen Kim
f106650b04 Revert "Load persist props before starting apexd."
Revert "Demonstrate multi-installed APEXes."

Revert "Adds a new prop context for choosing between multi-insta..."

Revert "Adds multi_install_skip_symbol_files field (default fals..."

Revert submission 1869814-vapex-multi-config

Bug: 206551398
Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/tests/view?invocationId=I55600009996329947&testResultId=TR93527797572038984, bug b/206551398
Reverted Changes:
I0cd9d748d:Adds multi_install_skip_symbol_files field (defaul...
I5912a18e3:Demonstrate multi-installed APEXes.
I0e6881e3a:Load persist props before starting apexd.
I932442ade:Adds a new prop context for choosing between multi...
I754ecc3f7:Allow users to choose between multi-installed vend...

Change-Id: I27a4985061b112af7d0e9b95b6d42ccd9b846471
2021-11-16 07:08:15 +00:00
Treehugger Robot
42ef1002f3 Merge "Restart media.tuner when zygote is restarted." am: 469e830cfd
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1892883

Change-Id: I140df64940a1fbd599bc8cb1e67228665a672a5f
2021-11-16 06:19:10 +00:00
Treehugger Robot
469e830cfd Merge "Restart media.tuner when zygote is restarted." 2021-11-16 06:06:31 +00:00
Yi-Yo Chiang
93e910c7bb Merge "Remove std::move() around const variable" am: 833adaf250
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1890101

Change-Id: I5125796611f8cb63452d27eed1fdb4ec1d8ac3e7
2021-11-16 05:32:08 +00:00
Yi-Yo Chiang
833adaf250 Merge "Remove std::move() around const variable" 2021-11-16 05:13:59 +00:00
Hongguang
8d8d9d853a Restart media.tuner when zygote is restarted.
Bug: 206042321
Test: Kill system_server and dumpsys tv_tuner_resource_mgr
Change-Id: Icc83453ef8852a07329757fecd10e8898a9dbdcd
2021-11-16 04:51:49 +00:00
Treehugger Robot
3e8bd5879b Merge "remove 'net.qtaguid_enabled' property" am: 2df049ff26
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1888295

Change-Id: I6658bd54a94bffa38e57ccf4101bc7c209d6cddb
2021-11-16 03:47:22 +00:00
Treehugger Robot
2df049ff26 Merge "remove 'net.qtaguid_enabled' property" 2021-11-16 03:29:56 +00:00
Daniel Norman
54e1b0e149 Merge "Load persist props before starting apexd." am: b3aa2c4691
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1871746

Change-Id: Ibb1122166023900ab5773b427d454eda80a12a2c
2021-11-16 00:56:56 +00:00
Daniel Norman
b3aa2c4691 Merge "Load persist props before starting apexd." 2021-11-16 00:45:32 +00:00
Yi-Yo Chiang
c811d139aa Add ParseFstabFromString(), remove ReadFstabFromFp()
ReadFstabFromFp() have two callers right now, ReadFstabFromFile() and
ReadFstabFromDt(). ReadFstabFromFile() opens a FILE* and pass it to
ReadFstabFromFp(), and ReadFstabFromDt() wraps a std::string::c_str()
buffer in a FILE* adaptor with fmemopen().

There's no need for such adaptor, just change ReadFstabFromFp() to
accept std::string and we're good.

Bug: 204056804
Test: atest CtsFsMgrTestCases
Test: m libfstab_fuzzer
Change-Id: I71190c7356a354aa06d1be3fdc4ca76611b3896d
2021-11-15 14:27:19 +08:00
Yi-Yo Chiang
eee9fe4777 Remove std::move() around const variable
because const variable cannot be moved.

Bug: 204056804
Test: Presubmit
Change-Id: Iec13deb0f306976cfaee88da57a17f857ac35c8a
2021-11-15 13:36:02 +08:00
Eric Biggers
f14c924898 Merge "fs_mgr: allow FDE options in recovery mode" am: d0ed71dcb7
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1891237

Change-Id: Ie56702ae8700975c23324b20bd5082b1c515dbfb
2021-11-12 23:46:17 +00:00