Commit graph

84527 commits

Author SHA1 Message Date
Yurii Shutkin
f75464d65e acvp: handle flush commond in modulewrapper as stated in BoringSSL.
Change-Id: Ife655f0764851cf2d9677abd507daec3f531031e
Bug: 287626912
Test: ACVP test
2023-10-09 15:37:29 +02:00
T.J. Mercier
af5de39039 Merge "libprocessgroup: Don't sleep after last cgroup removal attempt" into main 2023-10-07 00:34:39 +00:00
T.J. Mercier
b02f94490d libprocessgroup: Don't sleep after last cgroup removal attempt
Currently we sleep for 5ms before decrementing retries for the last
time. This is a waste of time, so bail out of the loop if the last
rmdir attempt fails.

Change-Id: Ia20840d27592b4eb3d9762647b19c111ff94209f
2023-10-06 23:11:09 +00:00
Sophia Coldren
d32b562ee9 Merge "Add an include" into main 2023-10-06 21:14:22 +00:00
Sophia Coldren
5880692ae2 Add an include
Change-Id: I0a6c64d9f1ddd9211de994fd4c6c44d53499775f
2023-10-06 18:46:17 +00:00
Xin Li
37e9952c93 Merge "Merge Android 14" into main 2023-10-06 05:34:13 +00:00
Xin Li
4f9ed9366f Merge Android 14
Bug: 298295554
Merged-In: Id86bcb915c8e2857bda26f64738dd5b643048e98
Change-Id: I6315e675753ec07fa1f67b69bcd05b831eeae6f0
2023-10-05 15:45:15 -07:00
Daniel Zheng
ad1ee13cec Merge "Removing is_retrofit code path" into main 2023-10-05 20:58:50 +00:00
Daniel Zheng
7248d1b0d8 Merge "Refactor off V2 Cow Ops" into main am: adad3dbefe
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2736101

Change-Id: I0344daaa43ed555c0bcdd377629c70a167f2afa4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-05 19:39:28 +00:00
Daniel Zheng
3e9b88d504 Removing is_retrofit code path
This code path was never invoked. is_logical will return false on
secondary partitions in retrofit devices, so nothing actually is ever
deleted. If we manage to call the delete, the device side code will
fail with "cannot open the super partition"

Test: fastboot flashall on sargo device
Change-Id: I20b430c5c30bf992506190ea4e00b0b69c7b1005
2023-10-05 12:37:57 -07:00
Daniel Zheng
adad3dbefe Merge "Refactor off V2 Cow Ops" into main 2023-10-05 19:12:56 +00:00
Arun Sharma
828d85ae89 Merge "FastbootDevice::boot1_1 null pointer dereference" into main am: 608e33f736
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2768099

Change-Id: Id99a4a6aceaedfdbc67311d6f7234c3334fc0209
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-05 17:45:17 +00:00
Daniel Zheng
4cda9ec9bb Merge "Adding test for reader compatibility" into main am: 4b3b6e2ff5
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2762279

Change-Id: I3720f7f966c54408c1c4dbe72222dac73ef6dbae
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-05 17:45:07 +00:00
Arun Sharma
608e33f736 Merge "FastbootDevice::boot1_1 null pointer dereference" into main 2023-10-05 17:33:34 +00:00
Daniel Zheng
4b3b6e2ff5 Merge "Adding test for reader compatibility" into main 2023-10-05 17:04:17 +00:00
Elliott Hughes
5cc875126a Merge "s/master/main/" into main am: b533f531df
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2772867

Change-Id: Ide151a5572106cb6e071ecdb70d97968d2a4a8a0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-05 16:41:39 +00:00
Arun Sharma
1a3456f0bc FastbootDevice::boot1_1 null pointer dereference
FastbootDevice::boot1_1 attempts to dereference a null pointer when the
boot_control_hal_ is not set. It needs a guard statement to prevent
that.

Test: Manually tested on device without BootControl.
Bug: 301682120
Change-Id: Id86bcb915c8e2857bda26f64738dd5b643048e98
2023-10-05 16:35:24 +00:00
Elliott Hughes
b533f531df Merge "s/master/main/" into main 2023-10-05 16:09:46 +00:00
Akilesh Kailash
0d38654b34 Merge "snapuserd: I/O request on overlapping blocks during snapshot-merge." into main am: 743c4cdb1c
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2769106

Change-Id: Ie5a42ec523a948382b25200d92cfb1105d972138
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-05 14:18:31 +00:00
Akilesh Kailash
743c4cdb1c Merge "snapuserd: I/O request on overlapping blocks during snapshot-merge." into main 2023-10-05 13:42:30 +00:00
Akilesh Kailash
cffa413de4 snapuserd: I/O request on overlapping blocks during snapshot-merge.
This fixes the case when all the following conditions are true:

1: Incremental OTA
2: When there are sequence of overlapping COPY operations within one merge-window
   (510 blocks)
3: Device is rebooted when snapshot-merge is in-progress of this
   merge-window. When device reboots, the state of merge-window (of 510 blocks) was
   merge-in-progress (aka - only partial set of blocks were merged in
   this window thereby the state of the base device is in-complete for
   this window)
4: During the next boot, if there any I/O request from the filesystem
   which maps to the merge-window in (3):
   	a: The data has to be retrieved from the scratch space of the
	COW until the snapshot-merge for that window is completed.

	b: Once the snapshot-merge is complete for that window, data
	has to be retrieved from base device.

The bug was in step 4(a) wherein I/O request was getting routed to base
device.

This patch addresses the above flow by fixing step 4(a).

A new vts test has been added to explicitly track this issue.

Additionally, there is no need to re-scan the partition if partition is in merge resume path. This should cut down the overhead of the scan.

Bug: 275296365
Test: 1: 100 iterations of ./vts_snapuserd_test --gtest_filter=SnapuserdTest.Snapshot_COPY_Overlap_Merge_Resume_IO_Validate_TEST
2: Incremental OTA on Pixel 6 Pro with multiple iterations of device
   reboot when merge is in progress

Change-Id: Ib53be7f07ff192a84ec7f7049b2c6be01dad1041
Signed-off-by: Akilesh Kailash <akailash@google.com>
2023-10-05 05:32:31 +00:00
Kiyoung Kim
bf65cd213e Merge "Remove libbinder_rpc_unstable from system required libs" into main am: 7cf712ab3b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2762986

Change-Id: I73895850a5c23318f309895a0e91802e7231a270
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-05 04:27:36 +00:00
Kiyoung Kim
7cf712ab3b Merge "Remove libbinder_rpc_unstable from system required libs" into main 2023-10-05 03:54:36 +00:00
Daniel Zheng
c9770b29b9 Refactor off V2 Cow Ops
Refactor writer, reader + parser to work off v2 version of
CowOperations.

Test: m libsnapshot. ota on cuttlefish
Change-Id: Iec59be91e5f54782272b37702d645942df38c771
2023-10-04 18:09:35 -07:00
Treehugger Robot
72ba5c12be Merge changes Ib7509508,I7e256e8d into main am: 310e7ae496
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2767639

Change-Id: I7a3c878979b3d47963549b78df7d95509ec467a8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-05 00:42:27 +00:00
Christopher Ferris
448b784898 Merge "Change source to be a unique_ptr." into main am: e9f4feaf7e
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2768490

Change-Id: I754a47b102834e1a20ca1091af36854a0c6ec33f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-05 00:42:02 +00:00
Daniel Zheng
a16436d5d7 Adding test for reader compatibility
Reader + Parser v3 should be able to read V2 cow format written to disk.
This test reads in a small cow file written by basic_v2_cow_writer and
parses it to ensure this compatibility checks out.

Test: cow_api_test
Change-Id: I46ebf4e3f12cdb3e4716ca5b624aab5836086733
2023-10-04 17:37:26 -07:00
Treehugger Robot
310e7ae496 Merge changes Ib7509508,I7e256e8d into main
* changes:
  snapuserd: Add an extractor tool.
  inspect_cow: Add an --extract-to argument.
2023-10-05 00:25:50 +00:00
Christopher Ferris
e9f4feaf7e Merge "Change source to be a unique_ptr." into main 2023-10-05 00:13:19 +00:00
Elliott Hughes
716ff7b55a s/master/main/
Test: treehugger
Change-Id: Iabb23436d92686b934f2f2609217714b64ae75de
2023-10-04 23:31:09 +00:00
David Anderson
c942daf179 snapuserd: Add an extractor tool.
This is similar to inspect_cow --extract-to, except it uses snapuserd.
It is a diagnostic host tool and uses the tooling added for host
testing.

Usage: snapuserd_extractor -cow COW_FILE -base BASE_FILE -out OUT_FILE
                           -num_sectors NUM_SECTORS

Unlike inspect_cow, this supports xor/copy operations.

The extractor code is separated into a utility file so we can use it for
additional tests later on.

Bug: N/A
Test: manual test
Change-Id: Ib7509508cba45e6c3a0db8c75454e33c2a503e03
2023-10-03 19:54:28 -07:00
David Anderson
8a28163d33 inspect_cow: Add an --extract-to argument.
This adds an --extract-to argument to inspect_cow to verify that full
OTA snapshots contain correct data. It does not yet work for ordered
ops.

Test: inspect_cow
Bug: N/A
Change-Id: I9014da3e83fd4fb5ea54ac1d36e527b3e3e6c9d5

Change-Id: I7e256e8ddec626980cdcf8680bbeac3c2e9d8de1
2023-10-03 16:02:26 -07:00
Christopher Ferris
9dabc9ef32 Change source to be a unique_ptr.
The current code keeps a pointer to a local variable which doesn't
work too well. Change this to a unique_ptr and allocate the source
object that will be used instead.

Test: All unit tests pass.
Test: fastboot -w flashall on a mokey which crashed without this change.
Change-Id: Ief5437374181e514928c45dd540b42898901a137
2023-10-02 17:02:51 -07:00
Treehugger Robot
95879d3e8b Merge "Log the CowOperation when decompression failed" into main am: e877885533
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2768488

Change-Id: Ic4b424caa8183140e53dc28c89990f5883f1e163
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-02 21:18:27 +00:00
Treehugger Robot
e877885533 Merge "Log the CowOperation when decompression failed" into main 2023-10-02 20:45:38 +00:00
Kelvin Zhang
ab4c9621d4 Log the CowOperation when decompression failed
Test: th
Bug: 302992208
Change-Id: I617062d75a79ae73dfdff13c2e9d2a62c5dfcfc0
2023-10-02 11:08:18 -07:00
Elliott Hughes
fd605f23d1 Merge "Remove obsolete <linux/capabilities.h> workarounds." into main am: b0bff22429
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2770138

Change-Id: I15862cbef6b2c0cdf0a70d2ba636a63b5e98c708
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-02 16:25:38 +00:00
Elliott Hughes
b0bff22429 Merge "Remove obsolete <linux/capabilities.h> workarounds." into main 2023-10-02 15:09:26 +00:00
Treehugger Robot
63a7d5bcbf Merge "Adjust unit tests for supporting chain partition with no ab" into main am: b90cd3b5ab
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2765270

Change-Id: I42ca902df13dd623561dcab721c73c45be153cdc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-02 04:49:23 +00:00
Treehugger Robot
b90cd3b5ab Merge "Adjust unit tests for supporting chain partition with no ab" into main 2023-10-02 03:28:37 +00:00
Elliott Hughes
7d46c3fd7a Remove obsolete <linux/capabilities.h> workarounds.
We've updated the glibc header (and musl will just use the bionic uapi
headers), so this is obsolete (and getting in the way of someone trying
to use the PERFMON capability).

Test: treehugger
Change-Id: Ife7ee076179e1db6246738aa41c2b82bd8546265
2023-09-29 22:45:59 +00:00
Xin Li
f43377946b Merge "Merge UP1A.231005.007" into aosp-main-future 2023-09-29 06:40:58 +00:00
Treehugger Robot
4e1a1f05a6 Merge "Add the missing copyright headers to the .S files." into main am: aadb2046fd
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2767705

Change-Id: If0e4e49aa1e5a9a9614c6c46b9702d357c657841
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-28 20:41:25 +00:00
Treehugger Robot
aadb2046fd Merge "Add the missing copyright headers to the .S files." into main 2023-09-28 20:13:37 +00:00
Treehugger Robot
668c95919a Merge "Keep fs_mgr_vendor_overlay_test in internal cf." into main am: ec74e27a61
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2765988

Change-Id: I8e861c8f49cb21acd45ef97c9009ccfb65658870
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-28 18:22:23 +00:00
Elliott Hughes
041afb2883 Add the missing copyright headers to the .S files.
Dates taken from `git log --follow`.

Test: treehugger
Change-Id: I80e9ea6aa01f8e0553295453749afcbc3af827f9
2023-09-28 10:41:21 -07:00
Treehugger Robot
ec74e27a61 Merge "Keep fs_mgr_vendor_overlay_test in internal cf." into main 2023-09-28 17:13:01 +00:00
wuhaitao3
250aa5ed72 Adjust unit tests for supporting chain partition with no ab
Test: libfs_avb_internal_test
      libfs_avb_test
Signed-off-by: wuhaitao3 <wuhaitao3@xiaomi.corp-partner.google.com>
Change-Id: I5f91510e72776ed2ed53756ae94a87b1417ae1a5
2023-09-28 11:19:55 +00:00
Dan Shi
69f57f98c5 Keep fs_mgr_vendor_overlay_test in internal cf.
Bug: 302382476
Change-Id: I369927033b407660d2c0e7bdb85494c826c0b406
Test: presubmit
2023-09-28 06:32:31 +00:00
Treehugger Robot
b5ce7aa444 Merge "disable sync_on_suspend when flag is set" into main am: cfec879ad6
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2762661

Change-Id: I44e9af64a4562ede087007cfb19e070ad0ed3a6a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-28 00:52:03 +00:00