Commit graph

64806 commits

Author SHA1 Message Date
Wenhao Wang
a560b76faa Merge "rpmb_dev: Fix RPMB_REQ_DATA_READ command" 2020-10-03 05:11:27 +00:00
Arve Hjønnevåg
fe090a4686 trusty: keymaster: set_attestation_key: Change wrapped key
Remove WrappedPrivateKey and select wrapped vs plaintext key command
based on format instead.

Bug: 154033394
Test: send wrapped test key. Not yet accepted by trusty
Change-Id: I3b0a29be78f2a8e84ebd990713f66788256d8e3f
2020-10-02 16:55:16 -07:00
Ryan Prichard
9b8f545920 libunwindstack: Support signal frame CIEs.
Mark a CIE with a S in its augmentation string as signal frame.
This allows the code to properly handle signal frame data if none
of the signal frame pattern matchers work.

For a signal frame, DwarfSectionImpl<AddressType>::Eval needs to
continue the unwinding even if PC is zero. A zero PC means that the
program has crashed, and we should try to recover the real PC using the
return address on the stack or LR. This behavior is tested by
UnwindOffline.signal_{x86,x86_64}, which modify the libc.so files
so that the signal frame pattern matcher fails and the CIE/FDE
data is used instead.

Test: libunwindstack_test
Change-Id: I4655b070028fd984345311a5e743796f8c30ed36
2020-10-02 16:34:14 -07:00
Steven Moreland
967bacd0dd Merge "Adds license header" am: 754c6b2924
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1446918

Change-Id: Ibed5835575417218a4ac3f51b8576b42a24334df
2020-10-02 21:04:33 +00:00
Akilesh Kailash
ca5c44a4ba Merge "libcutils_static: Make ramdisk available for snapuserd daemon" am: ecfbd8ef09
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1440765

Change-Id: I3cb9749687cfaf60796bc519a5ef9a99f5d2d510
2020-10-02 21:04:04 +00:00
Akilesh Kailash
47014a7514 Merge "libsnapshot:snapuserd: Transitions for snapuserd" am: e19df50b75
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1437277

Change-Id: I50d4f6d0bc2ad83cf7c8782df637ce027206dabd
2020-10-02 21:03:52 +00:00
Steven Moreland
754c6b2924 Merge "Adds license header" 2020-10-02 20:32:31 +00:00
Akilesh Kailash
ecfbd8ef09 Merge "libcutils_static: Make ramdisk available for snapuserd daemon" 2020-10-02 20:20:43 +00:00
Akilesh Kailash
e19df50b75 Merge "libsnapshot:snapuserd: Transitions for snapuserd" 2020-10-02 20:20:43 +00:00
Wenhao Wang
62855c3985 rpmb_dev: Switch to RPMB provisioning scheme
Remove the --key option part to disable the initial setting of rpmb key
on the mock rpmb device.
The RPMB provisioning scheme will program the RPMB key into the mock
rpmb device.

Bug: 152901318
Test: Trusty storage tests
Change-Id: I03b9cfbbd10e2e5364405319a57e2ecc4ee0f48e
2020-10-02 12:39:30 -07:00
Wenhao Wang
975491be09 rpmb_dev: Fix RPMB_REQ_DATA_READ command
Add ".check_key_programmed = true." for RPMB_REQ_DATA_READ such that
we can check whether the rpmb key has been programmed before executing
RPMB_REQ_DATA_READ command.

"JEDEC STANDARD Universal Flash Storage (UFS) Version 3.0" specifies
that data access before the key has been programmed should return
“Authentication Key not yet programmed” (0007h)..

Bug: 152901318
Test: Trusty storage tests
Change-Id: I4759fbce5f37234090a22a1d9dc3b38072f6ecaf
2020-10-02 12:32:30 -07:00
Akilesh Kailash
01085dc1b4 libsnapshot:snapuserd: Transitions for snapuserd
1: Create a static library which exposes APIs
to manage snapuserd daemon.

2: Snapuserd daemon creates communication socket.

Bug: 168258493
Test: cow_snapuserd_test tests all the library API
along with the IO path from dm-snapshot.

Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: I8aaedf89d75e793c145fdad248a4d88e0ce8348c
2020-10-02 18:41:11 +00:00
Dylan Katz
50ed92a7e0 Adds license header
Missed a review point made, added the license header to FuzzFormatTypes
Test: Compiled code

Signed-off-by: Dylan Katz <dylan.katz@leviathansecurity.com>
Change-Id: Ib8f32b802ec207d0483772c38a0a741e0dd1f151
2020-10-02 11:08:15 -07:00
Akilesh Kailash
dfb1e08ab3 libcutils_static: Make ramdisk available for snapuserd daemon
Bug: 168258493
Test: cow_snapuserd_test
Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: I0fef4009e86ee93b7c2a752c7dba43914342d943
2020-10-02 15:49:16 +00:00
Christopher Ferris
fd43e423b7 Merge "Fix an error when overflows occur." am: 483364a7ec
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1446118

Change-Id: If9b85c1c1a316b18af92b23fca2ffd0c14f7eb6a
2020-10-02 08:03:23 +00:00
Christopher Ferris
483364a7ec Merge "Fix an error when overflows occur." 2020-10-02 07:51:20 +00:00
Christopher Ferris
9b6abd50d8 Fix an error when overflows occur.
Bug: 169657723

Test: Ran original test case and verified it does not leak.
Change-Id: I7a315bc3a2c380c207696ce06cc4aeb5b27937ac
2020-10-01 18:40:44 -07:00
Treehugger Robot
8819b90d32 Merge "Start tombstoned early in post-fs-data." am: 77dfd99beb
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1445776

Change-Id: I8804b3b51898c334a4c5d40db8e360d384b6710b
2020-10-02 01:30:07 +00:00
Treehugger Robot
77dfd99beb Merge "Start tombstoned early in post-fs-data." 2020-10-02 01:20:35 +00:00
Josh Gao
81c94cdce6 Start tombstoned early in post-fs-data.
Bug: http://b/169659307
Test: manual
Change-Id: Ie19de31e7e2b6cd43402cfd3a2e9274728e9e6b4
2020-10-01 14:25:36 -07:00
Treehugger Robot
c950673062 Merge "Improve error message in debuggerd fallback handler." am: d0642a373d
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1439573

Change-Id: I1e4c6ac7e23c9b590242767c6b2252404d3149f5
2020-10-01 21:12:50 +00:00
Treehugger Robot
d0642a373d Merge "Improve error message in debuggerd fallback handler." 2020-10-01 21:00:16 +00:00
Tom Cherry
6ac7f00e2b Merge "init: guarantee the ordering that actions are executed in" am: 7cfc944195
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1444495

Change-Id: I14e6e53ddf4674a50dee1f3c8ca320b65a0d519a
2020-10-01 20:42:02 +00:00
Tom Cherry
7cfc944195 Merge "init: guarantee the ordering that actions are executed in" 2020-10-01 20:27:40 +00:00
Tom Cherry
b48cfffa61 Merge "logd: drop logs about pruning and compression to VERBOSE" am: 8ba33eb34b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1440264

Change-Id: I5cdac4ac3d3ab4171c890a544c93a0b8437ad667
2020-10-01 18:19:08 +00:00
Tom Cherry
34ee04762a init: guarantee the ordering that actions are executed in
The README.md states that this ordering is not guaranteed to give
flexibility for the future, however it's time to state that this
ordering is guaranteed, especially since:

1) We have a tests, EventTriggerOrder and
   EventTriggerOrderMultipleFiles, which have guaranteed this ordering
   since 2017.
2) We have users requesting and depending on this order

Also update some slightly out of date parts of the documentation:
1) We import /system/etc/init/hw/init.rc instead of /init.rc as the
   first import
2) We additionally import /system_ext/etc/init and /product/etc/init

Test: n/a
Change-Id: I6d7b8d9e52f0d52bee320d5074ebb74a537f9150
2020-10-01 11:07:43 -07:00
Tom Cherry
8ba33eb34b Merge "logd: drop logs about pruning and compression to VERBOSE" 2020-10-01 17:22:47 +00:00
josephjang
2906975399 fastboot: add new oem command for post wipe userdata
When Android userdata partition has been erased in fastbootd, call
oem specific API doOemSpecificErase() to wipe other userdata in
device.

If oem doesn't implement this specific API in fastboot_hal lib,
fastbootd will receive 'NOT_SUPPORTED' return status.

Bug: 169173873
Change-Id: I9b6a5a4aaed31d1168e633418b189f9bb6d34d01
2020-10-01 05:09:26 +00:00
Treehugger Robot
7c1fafd7a0 Merge "libsnapshot: Implement OnlineKernelSnapshotWriter::OpenReader." am: b9795757e9
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1434794

Change-Id: I7d44602dbedfabdbfb5769d363edc5f6663e109f
2020-09-30 00:30:09 +00:00
Treehugger Robot
b9795757e9 Merge "libsnapshot: Implement OnlineKernelSnapshotWriter::OpenReader." 2020-09-29 23:39:09 +00:00
Treehugger Robot
b7b2d1255d Merge "libsnapshot: Partially implement OpenSnapshotWriter." am: 15f97700c2
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1433573

Change-Id: Ibd3488f7f1d40fb75616e82dd9aa44c064cb558b
2020-09-29 22:41:54 +00:00
Treehugger Robot
15f97700c2 Merge "libsnapshot: Partially implement OpenSnapshotWriter." 2020-09-29 21:52:07 +00:00
David Anderson
d116e250f0 Merge "libsnapshot: Add a maximum block count to CowWriter." am: 2be4a85a2e
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1432900

Change-Id: Ib9195dad176e4e1d9768c62df486fe6b97bed964
2020-09-29 20:53:00 +00:00
David Anderson
2be4a85a2e Merge "libsnapshot: Add a maximum block count to CowWriter." 2020-09-29 20:23:17 +00:00
Steven Moreland
ee59f6b3b3 Merge "Fixes to String8 fuzzer" am: 3e3e44c740
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1439322

Change-Id: Ie2756baeaddaf24ea4b9bbde5dec1ec67eb2e608
2020-09-28 23:20:48 +00:00
Steven Moreland
3e3e44c740 Merge "Fixes to String8 fuzzer" 2020-09-28 22:35:38 +00:00
Tom Cherry
4ab009f0e7 logd: drop logs about pruning and compression to VERBOSE
These logs are not generally useful and can be considered to be spam
by some.  Drop them to VERBOSE so that we can be selectively enabled
when debugging logd.

Test: these logs do not appears by default.
Change-Id: Ic2bb12552d6f191478777c21f500794de29c8b0a
2020-09-28 13:05:32 -07:00
Christopher Ferris
89f54f6f86 Merge "Add arch member into Unwinder object." am: 087552a89b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1437275

Change-Id: Id44f6fea64d32491f275f5730c8b5f6c33f69abe
2020-09-28 18:50:33 +00:00
Christopher Ferris
087552a89b Merge "Add arch member into Unwinder object." 2020-09-28 18:45:04 +00:00
David Anderson
39f250896a libsnapshot: Implement OnlineKernelSnapshotWriter::OpenReader.
Bug: 168554689
Test: manual test
Change-Id: I91b39c5982c14d80dbe1f38ff6a8bc5745d3e7e8
2020-09-28 11:24:37 -07:00
David Anderson
75b982ad30 libsnapshot: Partially implement OpenSnapshotWriter.
Implement OpenSnapshotWriter for non-compressed Virtual A/B. This is
done by adding an OnlineKernelSnapshotWriter class, which forwards all
writes to a dm-snapshot block device.

This also introduces a new ISnapshotWriter class which extends
ICowWriter, and adds features specific to libsnapshot (versus ICowWriter
which is intended only for the new COW format). The OpenSnapshotReader
call has been moved here since the writer retains all the information
needed to create the reader.

To test the new call, vts_libsnapshot_test has been modified to use
OpenSnapshotWriter.

As part of this change, all consumers of libsnapshot must now link to
libsnapshot_cow.

Bug: 168554689
Test: vts_libsnapshot_test
Change-Id: Ieedfadc557833c1e0540922aabc6e95c80266a64
2020-09-28 11:24:37 -07:00
David Anderson
6560d23765 libsnapshot: Add a maximum block count to CowWriter.
Once COWs are allocated, their size is fixed, and we don't want to
write beyond the end. To make this validation less tedious, the virtual
methods of ICowWriter have been made internal. The user-facing API calls
do validation before calling the internal variants.

Bug: 168554689
Test: cow_writer_test
Change-Id: Ic9ebb5bc4b601180d35d915c47cd9c537bc423fa
2020-09-28 11:24:37 -07:00
Elliott Hughes
e4d33367f9 Merge "cli-test: support checking exit status." am: b3dc6089b0
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1439574

Change-Id: Ia1877b338c9d8d5a5f0883d858522a09dfc2e1cf
2020-09-28 17:16:43 +00:00
Elliott Hughes
b3dc6089b0 Merge "cli-test: support checking exit status." 2020-09-28 16:42:43 +00:00
Rick Yiu
75595e006e Merge changes from topic "revert_androidSetThreadPriority_api" am: 2b1c37a3e4
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1440132

Change-Id: I3c64ef093133dfd98558a41f6d7d14da8412808f
2020-09-28 02:25:26 +00:00
Rick Yiu
2b1c37a3e4 Merge changes from topic "revert_androidSetThreadPriority_api"
* changes:
  Revert "Add choice for changing sched policy when setting thread priority"
  Revert "Fix API for C compatibility"
2020-09-28 02:12:58 +00:00
Rick Yiu
fa02bb9952 Revert "Add choice for changing sched policy when setting thread priority"
This reverts commit 57affbf91d.

Reason for revert: new API is no longer used

Change-Id: I97128c1d367e161aa50deaefa8b73a0f25e29af4
2020-09-27 11:21:11 +08:00
Rick Yiu
290efe38b6 Revert "Fix API for C compatibility"
This reverts commit b473061c5a.

Reason for revert: new API is no longer used

Change-Id: I2c4f9f37736faeb5d0403c2ba531c792d2531505
2020-09-27 11:20:03 +08:00
Elliott Hughes
ac973f63be cli-test: support checking exit status.
Test: new libziparchive (ziptool) tests
Change-Id: If8e74e84340dff29198b5999c45eb2d7220fa93c
2020-09-25 16:43:35 -07:00
Dylan Katz
98e14de057 Fixes to String8 fuzzer
Adds support for format fuzzing, fixes several bugs.
Fix: 163680603
Fix: 162926178
Fix: 157469647
Test: libutils_fuzz_string8 clusterfuzz-testcase-minimized-libutils_fuzz_string8-6188353572306944
Test: libutils_fuzz_string8 clusterfuzz-testcase-minimized-libutils_fuzz_string8-6413754773012480
Test: libutils_fuzz_string8 clusterfuzz-testcase-minimized-libutils_fuzz_string8-5691524777246720

Signed-off-by: Dylan Katz <dylan.katz@leviathansecurity.com>
Change-Id: I7107c3637a4befccab345e17171a1119f8677557
2020-09-25 16:28:49 -07:00