Commit graph

69987 commits

Author SHA1 Message Date
Woody Lin
106eb02fe6 Merge "Add init.svc_debug.no_fatal.<svc_name> to skip SVC_CRITICAL" am: 81bf17ce0f am: 1d24da452d am: 568cd24f41
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1554980

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I7244d08c7956d28b664e17057b9f587d38ef7498
2021-01-23 01:43:11 +00:00
Woody Lin
568cd24f41 Merge "Add init.svc_debug.no_fatal.<svc_name> to skip SVC_CRITICAL" am: 81bf17ce0f am: 1d24da452d
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1554980

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I24d7311db98edd38ae5b58c5943c1f5851b64594
2021-01-23 01:27:57 +00:00
Woody Lin
1d24da452d Merge "Add init.svc_debug.no_fatal.<svc_name> to skip SVC_CRITICAL" am: 81bf17ce0f
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1554980

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iece3de95103e59aa2ce04689f93fa7bdc0cc9801
2021-01-23 01:07:35 +00:00
Elliott Hughes
56ba1540f2 [automerger skipped] Merge "libadf: delete libadf & libadfhwc" am: ad5b717c5b am: 33073c81b6 am: 6f79cbe47e -s ours
am skip reason: Change-Id Ib6e1ce2db016e97a165a59b28b9fab5e3ef8f255 with SHA-1 dd377ccefd is in history

Original change: https://android-review.googlesource.com/c/platform/system/core/+/1556786

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic2aa86364563d7d98199cdaf61c5cf05ea81a124
2021-01-23 01:06:56 +00:00
Woody Lin
81bf17ce0f Merge "Add init.svc_debug.no_fatal.<svc_name> to skip SVC_CRITICAL" 2021-01-23 00:34:06 +00:00
Elliott Hughes
6f79cbe47e Merge "libadf: delete libadf & libadfhwc" am: ad5b717c5b am: 33073c81b6
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1556786

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie9f4f5d8d0c75e6408234f74e074183166f6ea6a
2021-01-23 00:15:36 +00:00
Elliott Hughes
33073c81b6 Merge "libadf: delete libadf & libadfhwc" am: ad5b717c5b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1556786

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Idac17b8503f7485e3fb6b51deec33bcfd5e688aa
2021-01-22 23:54:11 +00:00
Elliott Hughes
ad5b717c5b Merge "libadf: delete libadf & libadfhwc" 2021-01-22 23:37:48 +00:00
Marissa Wall
254d753f34 libadf: delete libadf & libadfhwc
libadf is a helper library for adf (android display framework)
kernel drivers. The last Android Common Kernel to support adf was
4.4. Delete this helper library since we do not support any kernels
that can use it.

If a vendor needs this library, they can fork it.

If you have any concerns, please contact adelva@google.com.

Bug: 150467766
Test: Compiles
Change-Id: Ib6e1ce2db016e97a165a59b28b9fab5e3ef8f255
Merged-In: Ib6e1ce2db016e97a165a59b28b9fab5e3ef8f255
2021-01-22 19:30:47 +00:00
I-Chih Lu
6f01bf3c10 Merge "Secure DPU: add folder for common headers" am: e0826c75df am: 6e35140f05 am: 2e6b4f3ad1
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1556719

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I51da58927a734c224e06d4800e9386b110d03923
2021-01-22 09:53:50 +00:00
I-Chih Lu
2e6b4f3ad1 Merge "Secure DPU: add folder for common headers" am: e0826c75df am: 6e35140f05
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1556719

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I931bb4543673fcc9d8cc3878c94dd572bc64737a
2021-01-22 09:19:55 +00:00
I-Chih Lu
6e35140f05 Merge "Secure DPU: add folder for common headers" am: e0826c75df
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1556719

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I86421b1ba8e878657afc114dd9eafc7c5819e4cf
2021-01-22 08:47:50 +00:00
I-Chih Lu
e0826c75df Merge "Secure DPU: add folder for common headers" 2021-01-22 08:13:42 +00:00
Woody Lin
ef9d460ea8 Add init.svc_debug.no_fatal.<svc_name> to skip SVC_CRITICAL
For user who would like to retain the crash symptom and avoid device
from power cycle for live debugging, set
init.svc_debug.no_fatal.<svc_name> to "true" to skip FATAL reboot.

Bug: 177593855
Change-Id: I0bdb6191e5963c08e1ea301a60060acf916dd49b
2021-01-22 15:01:36 +08:00
ichihlu
9ee8a75e6b Secure DPU: add folder for common headers
The header SecureDPU.h is moved out from the device specific folder as
it can be shared for different devices.

Bug: 176508588
Test: Pass TUI VTS test on the emulator.
Change-Id: I7695b49c4f7a247b570ced61145471efef3d0a3d
2021-01-22 06:31:37 +00:00
Yo Chiang
861a031155 Merge "adb-remount-test.sh: Filter out administrative mount: securityfs" am: f5835fa714 am: f52825ee8d am: 0c2693c0de
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1553824

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I7736413592367a037e46179f1a80c9567ac82a99
2021-01-22 05:39:15 +00:00
Yo Chiang
0c2693c0de Merge "adb-remount-test.sh: Filter out administrative mount: securityfs" am: f5835fa714 am: f52825ee8d
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1553824

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8e2f26348512c8eb07ef4dd03abf78e546da753c
2021-01-22 05:04:48 +00:00
Yo Chiang
f52825ee8d Merge "adb-remount-test.sh: Filter out administrative mount: securityfs" am: f5835fa714
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1553824

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I7cdec0ab18b305567b391d4d85800a99fa8d744a
2021-01-22 04:25:00 +00:00
Yo Chiang
f5835fa714 Merge "adb-remount-test.sh: Filter out administrative mount: securityfs" 2021-01-22 03:15:18 +00:00
Yo Chiang
ec8f9dd1f1 adb-remount-test.sh: Filter out administrative mount: securityfs
securityfs /sys/kernel/security securityfs rw,relatime 0 0

is causing the noatime check in adb-remount-test.sh to fail.

Bug: 165925766
Test: Create an aosp_cf_x86_phone-userdebug AVD && adb-remount-test.sh
Test: Use DSU to install GSI on the AVD && adb-remount-test.sh
Change-Id: Ibae0d4bbbbc78fb74f4ad82f2313251598c77f72
2021-01-22 03:15:10 +00:00
David Anderson
8cfb74b8d8 Merge changes I06043f8e,I872f271c am: 4787c1fa28 am: 6365f57979 am: 04a00de0f6
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1554941

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I99b9acdd713f76650752766da5b2c4241c2417c9
2021-01-22 00:48:48 +00:00
David Anderson
d852b0e781 Merge "libsnapshot: Removed the unused "linear" optimization." am: 531e15e38c am: ba5da0d7d1 am: b5c2ec8843
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1554777

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0d3ee5ff20e03d93795b3c0b83dc4feda7af3575
2021-01-22 00:48:04 +00:00
David Anderson
04a00de0f6 Merge changes I06043f8e,I872f271c am: 4787c1fa28 am: 6365f57979
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1554941

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iae7e3d0dc03e5612e240e694dad3021bfdeea34c
2021-01-21 23:54:29 +00:00
David Anderson
b5c2ec8843 Merge "libsnapshot: Removed the unused "linear" optimization." am: 531e15e38c am: ba5da0d7d1
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1554777

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Idb6388d43a68d294956337dcea8e144e8eade976
2021-01-21 23:53:44 +00:00
David Anderson
6365f57979 Merge changes I06043f8e,I872f271c am: 4787c1fa28
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1554941

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id1c978d37af6816dbf2a542604caa49bd7779362
2021-01-21 23:42:02 +00:00
Treehugger Robot
dfed025daa Merge "trusty: keymaster-hal: Reconnect on failed VERSION" am: 1433d42cea am: c1ec38f7be am: 547bb7ba76
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1553887

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4093f75e74fd40f506443618fb6da5d0194d886d
2021-01-21 23:35:26 +00:00
David Anderson
ba5da0d7d1 Merge "libsnapshot: Removed the unused "linear" optimization." am: 531e15e38c
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1554777

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ieef44055e61c5152a43106f86f5c897ef46274e4
2021-01-21 23:28:27 +00:00
Treehugger Robot
547bb7ba76 Merge "trusty: keymaster-hal: Reconnect on failed VERSION" am: 1433d42cea am: c1ec38f7be
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1553887

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I224c448c513fc12bfaaaf45fc32096cefd86cb10
2021-01-21 23:23:07 +00:00
Treehugger Robot
c1ec38f7be Merge "trusty: keymaster-hal: Reconnect on failed VERSION" am: 1433d42cea
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1553887

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1c49e35912d4992562d7aa2e9df9c5cf3ff56919
2021-01-21 23:08:42 +00:00
David Anderson
4787c1fa28 Merge changes I06043f8e,I872f271c
* changes:
  libsnapshot: Use a two-phase merge for VABC.
  libsnapshot: Pass the correct source device to snapuserd.
2021-01-21 21:10:38 +00:00
David Anderson
531e15e38c Merge "libsnapshot: Removed the unused "linear" optimization." 2021-01-21 20:49:42 +00:00
Treehugger Robot
1433d42cea Merge "trusty: keymaster-hal: Reconnect on failed VERSION" 2021-01-21 20:36:45 +00:00
Akilesh Kailash
4ff7efb172 Merge "libsnapshot: Merge completion for sector 0" am: c7e586a7bf am: 55dd7ce355 am: aa14acc2c6
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1555468

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9f866d2fc1745d25c0e19ce9dc5435cf60449ae9
2021-01-21 18:55:45 +00:00
Akilesh Kailash
aa14acc2c6 Merge "libsnapshot: Merge completion for sector 0" am: c7e586a7bf am: 55dd7ce355
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1555468

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I760c8bb3a470c37c95faee036d9b25fc2001341d
2021-01-21 17:46:23 +00:00
Akilesh Kailash
55dd7ce355 Merge "libsnapshot: Merge completion for sector 0" am: c7e586a7bf
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1555468

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I7c8881edcc3ecd09a85e2caeb2fb9033b15ec9ae
2021-01-21 17:26:13 +00:00
Akilesh Kailash
c7e586a7bf Merge "libsnapshot: Merge completion for sector 0" 2021-01-21 16:25:15 +00:00
Akilesh Kailash
ae0783f4c7 libsnapshot: Merge completion for sector 0
Snapuserd daemon parses the merge completion request based on
how the dm-snapshot merge is done. dm-snapshot marks the merge as
complete by zeroing out the metadata viz old-chunk and new-chunk id's.

If we have a sector 0 operation such as copy/replace op,
then old-chunk id will be 0 and new-chunk id will be a non-zero
pseudo number. Once the merge is complete, then old-chunk and new-chunk will be 0.

The problem is that daemon used to track the merge completion just by checking
if old-chunk was non-zero. This check is not sufficient and ends up
tripping the assert in the daemon.

Bug: 178061207
Test: Modify cow_snapuserd_test to test this case and validate the
      IO path.
Reported-by: Kelvin Zhang <zhangkelvin@google.com>
Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: I6603af1c7b55e487dc3aec0c30c0a9dea0fedb56
2021-01-21 06:27:55 +00:00
Treehugger Robot
0f713899bd Merge "Fix failure of libvbmeta_test" am: 5e9fb35ba8 am: 68d642f4d5 am: dd24bf277e
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1554978

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id09762f17e604cbe5811085e92a725feba9d558b
2021-01-21 04:42:04 +00:00
Treehugger Robot
dd24bf277e Merge "Fix failure of libvbmeta_test" am: 5e9fb35ba8 am: 68d642f4d5
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1554978

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iea7898209e8669351c018941d389a1ad19513a40
2021-01-21 03:43:49 +00:00
Treehugger Robot
68d642f4d5 Merge "Fix failure of libvbmeta_test" am: 5e9fb35ba8
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1554978

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic4b80712bf62a630ac7f5a93f299e6537f38089d
2021-01-21 03:12:22 +00:00
Treehugger Robot
5e9fb35ba8 Merge "Fix failure of libvbmeta_test" 2021-01-21 02:17:44 +00:00
David Anderson
86ba14be16 libsnapshot: Use a two-phase merge for VABC.
If a partition shrinks in an update, it must be merged before any other
partitions. Otherwise, a copy operation may source from the tail of the
shrunk partition, which could be overwritten by a merge operation in
another partition.

This patch adds a "MergePhase" indicator to the update status that is
valid only when the state is MERGING. Partitions that shrink are merged
first, and the phase will be FIRST_PHASE. Once ProcessUpdateState() has
determined that all first-phase snapshots are merged, it will switch to
SECOND_PHASE and remaining snapshots can start merging.

Otherwise, there is no change to the merge algorithm. The phase split is
an implementation detail and not exposed to update_engine.

Bug: 177935716
Test: vts_libsnapshot_test
Change-Id: I06043f8e3b81bdecefb6a4b5944a97b7086eeb49
2021-01-20 18:17:08 -08:00
David Anderson
91c9f56d30 libsnapshot: Pass the correct source device to snapuserd.
When a partition shrinks, it is not correct to use the base device as
the "source" device for the new COW format, because we may need to read
blocks that do not exist in the new partition.

To resolve this, we store a copy of the old partition layout in /metadata,
and use it to create a "source" view of the old partition. The new
stacking looks as follows:

  partition_b (dm-snapshot):
   - partition_b-base (partition_b dm-linear)
   - partition_b-cow-user (dm-user + snapuserd):
      - partition_b-cow (COW image)
      - partition_b-src (partition_a dm-linear)

Bug: 177935716
Test: vts_libsnapshot_test
Change-Id: I872f271cc1f25cc796b94188fdde247cdc4050b4
2021-01-20 18:17:08 -08:00
David Anderson
dc73581e53 libsnapshot: Removed the unused "linear" optimization.
VAB has an unused optimization that allows bypassing snapshots for the
area of a partition that grows during an OTA. The code for this is
entirely unused since the optimization was never enabled. The benefits
are marginal, and making it safe is quite complicated. The "new" region
cannot overlap with any region being relinquished by a shrink operation,
without snapshotting the region that would be overwritten. This would be
burdensome to implement and would minimize space savings.

Let's remove the code related to this optimization until we are
confident we can implement it safely in VABC.

Bug: 177935716
Test: vts_libsnapshot_test
Change-Id: I7d6a68dce57c8a4389ea6bff9f31971276a20db4
2021-01-20 18:17:07 -08:00
Treehugger Robot
0081a14c07 Merge "Remove unnecessary #includes." am: da0f466da2 am: a0c9f25a73 am: bb1767bae8
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1554397

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8a28520d441a47d7ef7eb11797f92ad5a168bf0d
2021-01-20 22:03:39 +00:00
Treehugger Robot
bb1767bae8 Merge "Remove unnecessary #includes." am: da0f466da2 am: a0c9f25a73
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1554397

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0f0715a957d64a2336e0f8552aed2ebd067a27c3
2021-01-20 21:25:07 +00:00
Matthew Maurer
c4abbe6427 trusty: keymaster-hal: Reconnect on failed VERSION
Trusty Keymaster will currently disconnect the client on an invalid
message. This includes the newly introduced GET_VERSION2 message.

While in the future we could change this behavior, this is a backcompat
path and so we can't assume a changed Trusty. Reconnect on failed
GET_VERSION2 before attempting version negotiation.

Bug: 177843218
Test: Set PIN on device using older Trusty
Change-Id: Ie60e4aaafa43e375797e6288b97834cac42413f4
2021-01-20 13:21:37 -08:00
Treehugger Robot
a0c9f25a73 Merge "Remove unnecessary #includes." am: da0f466da2
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1554397

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5068a7f5b3ef05f1e1c9082c9a02e94284c033d7
2021-01-20 20:34:42 +00:00
Treehugger Robot
da0f466da2 Merge "Remove unnecessary #includes." 2021-01-20 19:44:03 +00:00
Bowgo Tsai
5346093a19 Fix failure of libvbmeta_test
The test uses 'external/avb/test/data/testkey_rsa2048.pem' from the
source tree, which is not available when running the test. Copy
the test key with the test case in Android.bp to fix the issue.

Bug: 177906739
Test: atest libvbmeta_test

Change-Id: I528dcdc5b48ed4af36ddd360380eb39631ff4317
2021-01-20 15:41:21 +08:00