Commit graph

68307 commits

Author SHA1 Message Date
Jim Pollock
fdac598f63 Merge "threads.h: avoid defining gettid on glibc >= 2.32" 2021-03-05 15:16:18 +00:00
Alexander Potapenko
66b93e3328 Merge "init.rc: set up a tracing instance for BootReceiver.java" 2021-03-05 13:01:36 +00:00
Adrian Ratiu
a742158667 threads.h: avoid defining gettid on glibc >= 2.32
Glibc >=2.32 exposes a gettid() which clashes with libcutils
thread.h, so add a check to not expose it if building against
newer glibc (ChromiumOS will still use glibc 2.27 besides 2.32).

Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1182060
Test: Builds without errors on both glibc 2.32 and 2.27.

Change-Id: Ib71fa1bc9fa185e3668002407dbed05a80c87740
2021-03-05 09:55:15 +00:00
Alexander Potapenko
439608bfb0 init.rc: set up a tracing instance for BootReceiver.java
This instance will be used to monitor the error_report_end tracing
events sent by kernel tools in the case of a memory corruption.

Bug: 172316664
Bug: 181778620
Test: manual runs with KFENCE enabled
Signed-off-by: Alexander Potapenko <glider@google.com>
Change-Id: Ibc5cd3b60fb99030cc55db6b490d6d4bbbca3963
2021-03-04 10:36:51 +01:00
David Anderson
3aab337293 Merge "libsnapshot: Use the compression algorithm specified in the DeltaArchiveManifest." 2021-03-04 03:05:43 +00:00
David Anderson
cbc204b39b libsnapshot: Use the compression algorithm specified in the DeltaArchiveManifest.
update_engine and libsnapshot must agree on CowOptions parameters,
otherwise the COW size estimation may be incorrect.

Bug: N/A
Test: vts_libsnapshot_test
      apply OTA, snapshotctl dump
Change-Id: I219ae458dfa19e4b3c96360d3b847edb2a01ebc8
2021-03-03 18:27:54 -08:00
Wonsik Kim
e886702132 Merge "Revert "init.rc: set up a tracing instance for BootReceiver.java"" 2021-03-04 00:44:58 +00:00
Wonsik Kim
5e53f90cdd Revert "init.rc: set up a tracing instance for BootReceiver.java"
Revert "Selinux policy for bootreceiver tracing instance"

Revert submission 1572240-kernel_bootreceiver

Reason for revert: DroidMonitor: Potential culprit for Bug 181778620 - verifying through Forrest before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.
Reverted Changes:
Ic1c49a695:init.rc: set up a tracing instance for BootReceive...
I828666ec3:Selinux policy for bootreceiver tracing instance

Change-Id: I5c2ccfe3eeb8863086b7cb9b3de43c6e076d995a
2021-03-03 22:47:02 +00:00
George Burgess IV
c08abac855 Merge "snapuserd: fix a use of an uninitialized value" 2021-03-03 22:43:36 +00:00
Xin Li
fd8bbd4820 Merge "Merge RQ2A.210305.007" 2021-03-03 21:41:39 +00:00
Xin Li
f3b0383b22 Merge RQ2A.210305.007
Bug: 180401296
Merged-In: I133f4e1357cbfe7f2a2a0eb612292613c8ca6956
Change-Id: I070347c7650410abf1f90a2d1ff4affe9e1eb76c
2021-03-03 09:12:27 -08:00
Tri Vo
24ad66e3db Merge changes I1e1e2c70,I9c86a12c
* changes:
  trusty: Fuzzer for ConfirmationUI messages
  trusty: Use a simple TIPC fuzzer for ConfirmationUI
2021-03-03 00:05:02 +00:00
Treehugger Robot
9539282751 Merge changes Ifcb52754,I29f79097
* changes:
  COW file size: better explain the exception size
  libsnapshot: COW size is computed within the container capability
2021-03-02 22:35:48 +00:00
Alexander Potapenko
08f0076160 Merge "init.rc: set up a tracing instance for BootReceiver.java" am: ef239b7517
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1572240

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I133f4e1357cbfe7f2a2a0eb612292613c8ca6956
2021-03-02 22:26:30 +00:00
Tri Vo
64af1279fb Merge "trusty: Apploader fuzzer" am: 427706675c
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1602493

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8f9fe393152e5dee8f96d724a495d5f9bbc14fba
2021-03-02 22:25:09 +00:00
David Anderson
67881fb4d1 Merge changes Idcb30151,I0f746870 am: 04502383f6
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1611274

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0c8906d9523ab7d1217c40959954365c6e098883
2021-03-02 22:24:46 +00:00
Treehugger Robot
835640f275 Merge "libdebuggerd: delete unused code." am: d3ffa8acd5
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1612830

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9bc5ea741d87f51ea5eac643bb94f878e41f129a
2021-03-02 21:50:54 +00:00
Treehugger Robot
e80974742b Merge "[libprocessgroup] Use new jsoncpp API" am: ff02909cf7
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1607098

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I96876a4e235a04bf8fbc7ae24dc834f15b9b3447
2021-03-02 21:50:47 +00:00
Treehugger Robot
900c6010e0 Merge "Detect the absence of the default fstab" am: d9b7c9b4a7
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1607906

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1f5b467eab74cc86c525a09210811e51459dab97
2021-03-02 21:50:30 +00:00
Alexander Potapenko
ef239b7517 Merge "init.rc: set up a tracing instance for BootReceiver.java" 2021-03-02 20:45:51 +00:00
Tri Vo
5ff073e832 trusty: Fuzzer for ConfirmationUI messages
ConfirmationUI messages are a higher-level abstraction than TIPC
messages (which is what TIPC fuzzer fuzzes).

Bug: 174402999
Test: trusty_confirmationui_msg_fuzzer
Change-Id: I1e1e2c7070b87b78d6236993330df65202840ce6
2021-03-02 12:21:49 -08:00
Tri Vo
fcfa3cd9b5 trusty: Use a simple TIPC fuzzer for ConfirmationUI
Bug: 174402999
Test: trusty_confirmationui_tipc_fuzzer
Change-Id: I9c86a12cba75a2b5ae78621373aa39f299abfe0a
2021-03-02 12:20:10 -08:00
Treehugger Robot
7a2c31ef92 Merge "Search fstab also from /first_stage_ramdisk" am: 937611f843
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1611758

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ifc4e34d34eceb545d15e1726bfb40f6ef5699e6d
2021-03-02 20:15:33 +00:00
Tri Vo
48c48867fc Merge changes I94a1cc28,Ib3f40e7d am: ce519b8a97
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1611337

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Idde5f44af041e3f9012a476a626479f4384e8113
2021-03-02 19:07:32 +00:00
Tri Vo
427706675c Merge "trusty: Apploader fuzzer" 2021-03-02 18:31:33 +00:00
David Anderson
04502383f6 Merge changes Idcb30151,I0f746870
* changes:
  libsnapshot: Harden merge-in-recovery for factory data resets.
  libsnapshot: Quell error spam during factory data resets.
2021-03-02 17:51:57 +00:00
Treehugger Robot
d3ffa8acd5 Merge "libdebuggerd: delete unused code." 2021-03-02 16:23:21 +00:00
Treehugger Robot
ff02909cf7 Merge "[libprocessgroup] Use new jsoncpp API" 2021-03-02 16:21:08 +00:00
Alexander Potapenko
2ec6c68ce9 init.rc: set up a tracing instance for BootReceiver.java
This instance will be used to monitor the error_report_end tracing
events sent by kernel tools in the case of a memory corruption.

Bug: 172316664
Test: manual runs with KFENCE enabled
Signed-off-by: Alexander Potapenko <glider@google.com>
Change-Id: Ic1c49a695ff7df4147a7351051db7b6707c86e0a
2021-03-02 16:50:16 +01:00
Treehugger Robot
d9b7c9b4a7 Merge "Detect the absence of the default fstab" 2021-03-02 12:26:48 +00:00
Tri Vo
5c1d2e1dff trusty: Apploader fuzzer
Bug: 181630912
Test: trusty_apploader_tipc_fuzzer
Test: trusty_apploader_app_fuzzer
Change-Id: I1cc2329ca2a4e983f6ded45810d4c34e1433c5b0
2021-03-01 23:29:03 -08:00
Josh Gao
8b0a9e06ba libdebuggerd: delete unused code.
Test: none
Change-Id: I87b62f306d287e9356c639f6d0c49566c71f7f29
2021-03-01 23:07:40 -08:00
Treehugger Robot
937611f843 Merge "Search fstab also from /first_stage_ramdisk" 2021-03-02 06:20:37 +00:00
Tri Vo
ce519b8a97 Merge changes I94a1cc28,Ib3f40e7d
* changes:
  trusty: Fuzz keymaster TA using generic TIPC fuzzer
  trusty: Fuzz gatekeeper TA using generic TIPC fuzzer
2021-03-02 06:18:29 +00:00
Jiyong Park
7e7b7a156a Search fstab also from /first_stage_ramdisk
I828ce999be6d786bf46dd5655dfda81d046906ab made a slight behaviral change
that fstab is searched and read before /first_stage_ramdisk is mounted
as root. Without this change, the attempt to read fstab from / fails at
the moment, leaving an empty fstab object. But as a side effect of the
attempt, DoCreateDevices() is not called again even after
/first_stage_ramdisk is mounted as root and the fstab is found under /.

This change fixes the problem by adding /first_stage_ramdisk to the list
of places to find the fstab file.

Bug: N/A
Test: Watch TH
Change-Id: I9826610cce436ba706aaea14c9a991822d2bae96
2021-03-02 12:42:09 +09:00
Treehugger Robot
78a996a029 Merge changes I57c4aacc,I8430579f am: 5060516c6f
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1607844

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I435c30c7a156f0102637bf99266b7c59e31b129d
2021-03-02 00:12:34 +00:00
Treehugger Robot
5060516c6f Merge changes I57c4aacc,I8430579f
* changes:
  trusty: Generic parameterizable TIPC fuzzer
  trusty: coverage: Add UUID helpers
2021-03-01 23:26:35 +00:00
Haibo Huang
d9ac92a739 [libprocessgroup] Use new jsoncpp API
Reader / StyledWriter are deprecated upstream

Bug: 170642246
Change-Id: Iadc944af17cad9640ed31364116d16f2b971434f
2021-03-01 23:09:26 +00:00
Treehugger Robot
5774f8288c Merge "fastboot: Bring back legacy A/B support" am: 71a17ff717
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1579087

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I7a9a1cd5bbd13200ecfa5c5d66659aedfece0e31
2021-03-01 21:49:18 +00:00
Treehugger Robot
71a17ff717 Merge "fastboot: Bring back legacy A/B support" 2021-03-01 21:06:44 +00:00
Tri Vo
123c038e1a trusty: Fuzz keymaster TA using generic TIPC fuzzer
Bug: 171750250
Test: trusty_keymaster_fuzzer
Change-Id: I94a1cc28276d198f698906212a8a5d15ac07ae1e
2021-02-27 14:09:06 -08:00
Paul Crowley
d8ea8267c7 Merge "Set an initial keystore.boot_level" am: 75a2bba158
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1584716

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib59b089049708ce99f622b26ff14e37bb0cfaaef
2021-02-27 07:25:37 +00:00
Paul Crowley
75a2bba158 Merge "Set an initial keystore.boot_level" 2021-02-27 05:05:50 +00:00
Tri Vo
e4a80fe066 trusty: Fuzz gatekeeper TA using generic TIPC fuzzer
Bug: 171750250
Test: trusty_gatekeeper_fuzzer
Change-Id: Ib3f40e7d2c01cdd2ca8df35f4b84234ddf7dbe50
2021-02-26 20:24:58 -08:00
Tri Vo
f41fee5879 trusty: Generic parameterizable TIPC fuzzer
Bug: 171750250
Test: trusty_test_fuzzer
Change-Id: I57c4aacc6725689d16dd88db2faa8ead59bcc49a
2021-02-26 19:14:47 -08:00
Tri Vo
3c8a004a8d trusty: coverage: Add UUID helpers
Function to parse string was borrowed from Trusty.

Bug: 171750250
Test: trusty_test_fuzzer
Change-Id: I8430579f142db2c174874aff373bce6bb868de31
2021-02-26 19:14:47 -08:00
LuK1337
dae48ef41e fastboot: Bring back legacy A/B support
Some devices, such as the Essential PH-1, don't have an
updated bootloader and the bootloader is appending an extra
underscore.

This patch works around that issue by sanitizing the slot to be
inline with modern expectations.

Offending commit: 42b18a518b

Most of the commit above is not needed because an underscore + slot
is automatically appended when flashing to a partition. Normally, this
would result in something like boot__b instead of boot_b, where b is the
current slot.

Test: flash an image on mata without specifying slot, boots

Change-Id: Ia0b7cee603a4f9ba2e3a61ce6e369ca8c07a7caf
2021-02-26 18:49:59 -08:00
David Anderson
2a55e81166 libsnapshot: Harden merge-in-recovery for factory data resets.
This addresses bugs where unexpected edge cases in the snapshot state
could prevent a merge or data wipe from completing in recovery.

Invalid snapshots (eg on the wrong slot) are now ignored in
CheckMergeState(). This prevents those snapshots from being detected as
"cancelled" and thus falling into RemoveAllUpdateState.

ProcessUpdateState will no longer call RemoveAllUpdateState in recovery.
Furthermore, when RemoveAllUpdateState fails, we will no longer return
the "old" state. If this state is Merging, ProcessUpdateState can
infinite loop.

Finally, HandleImminentDataWipe now guarantees the final state will be
either MergeFailed or None. For testing purposes, the old mechanism was
too susceptible to state machinery changes. And for practical purposes,
either we're going to wipe data (which removes the OTA), or a merge
failed and we can't. So the effective outcome is always no update or a
failed update.

Bug: 179006671
Test: vts_libsnapshot_test
Change-Id: Idcb30151e4d35cbeccf14369f09707ae94a57c66
2021-02-26 17:28:06 -08:00
David Anderson
4e936b4b6e libsnapshot: Quell error spam during factory data resets.
QuerySnapshotStatus assumes IsSnapshotDevice() would return true.

Additionally, recovery does not have access to /dev/loop-control, which
cannot be used by libfiemap anyway. Access it on-demand instead of
preemptively.

Bug: N/A
Test: manual test
Change-Id: I0f746870d7a8ec6d666f0bdd2fef3464b214928b
2021-02-26 17:27:42 -08:00
Treehugger Robot
167752311b Merge "trusty: Export ConfirmationUI helper classes" am: 1d9764209f
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1606534

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If8ecc22745eec7df4aee419fd9a524c44f07a134
2021-02-26 23:32:34 +00:00