Commit graph

86236 commits

Author SHA1 Message Date
Daniel Zheng
563fbeac6a Merge "Update API usage for source" into main am: a065e8739e am: 79693491d1 am: dcdab5ec9b am: aa1950c45e
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2779370

Change-Id: Ib1eef77413f1cf35a83f5abdec1c0b4ea9611605
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-10 22:59:34 +00:00
Treehugger Robot
1ba34689cd Merge "rpc_binder: Change trusty_tipc_fuzzer to support multiple connections and messages" into main am: c2671853ae am: ab45061067
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2737933

Change-Id: Id3cc843eb89dd1073513c72cace12ee783f79484
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-10 22:56:34 +00:00
Daniel Zheng
2a0ee301ef Merge "Rename BLOCK_SZ to block_size" into main am: b3cd361bfd am: dd4f283fa6
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2781729

Change-Id: I969b14a4114f8d2c1c01f56c5192ae8ecae9c6d5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-10 22:56:25 +00:00
Daniel Zheng
9d67604c0d Merge "Move ReadCowHeader to CowReader" into main am: f5f0a10541 am: 2457e0b7e8
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2781728

Change-Id: I7cc4efa0be980783b1116b5af6a6848e1dfddcb5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-10 22:56:15 +00:00
Daniel Zheng
a961ebc25f Merge "Shove type into source_info" into main am: a3646037c2 am: 4833be3517
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2775834

Change-Id: I9d7be0b99d0b63ef45f32f1a1c8b2a2d43b2ae17
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-10 22:56:03 +00:00
Daniel Zheng
dd3d34ffa7 Merge changes Ibe310d58,If88dceda into main
* changes:
  Move Cow Header child writer
  Add v3 Cow Header
2023-10-10 22:50:11 +00:00
Treehugger Robot
ab45061067 Merge "rpc_binder: Change trusty_tipc_fuzzer to support multiple connections and messages" into main am: c2671853ae
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2737933

Change-Id: Iab2a5643aa3af028068ff9f0973a0ddb984a001c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-10 22:23:31 +00:00
Treehugger Robot
c2671853ae Merge "rpc_binder: Change trusty_tipc_fuzzer to support multiple connections and messages" into main 2023-10-10 22:13:42 +00:00
Daniel Zheng
bb45742ba1 Move Cow Header child writer
v2 writer and v3 writer will write different versions of the header.
It's better to have each writer hold it's own header.

Test: th
Change-Id: Ibe310d58b830950ad556aabcd0c1009483fc8d86
2023-10-10 15:06:26 -07:00
Daniel Zheng
ed1a7d5faf Add v3 Cow Header
Adding Version 3 of CowHeader. This will inherit from original
CowHeader and add a compression field. We are no longer supporting
different compressions per operation so having this one field is enough.

Test: cow_api_test
Change-Id: If88dceda139807cc5e647b706ddeb2b3e83c024f
2023-10-10 15:06:26 -07:00
Daniel Zheng
dd4f283fa6 Merge "Rename BLOCK_SZ to block_size" into main am: b3cd361bfd
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2781729

Change-Id: I839577ab392ba09703e0e3f49e020808459fb877
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-10 22:06:06 +00:00
Daniel Zheng
2457e0b7e8 Merge "Move ReadCowHeader to CowReader" into main am: f5f0a10541
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2781728

Change-Id: I7eeb57433a1d55d4a95bdac452dac03b816c4b2d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-10 22:05:54 +00:00
Daniel Zheng
b3cd361bfd Merge "Rename BLOCK_SZ to block_size" into main 2023-10-10 21:56:16 +00:00
Daniel Zheng
f5f0a10541 Merge "Move ReadCowHeader to CowReader" into main 2023-10-10 21:56:11 +00:00
Daniel Zheng
aa1950c45e Merge "Update API usage for source" into main am: a065e8739e am: 79693491d1 am: dcdab5ec9b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2779370

Change-Id: Id35682e8a0f012e966bbc2d65ff35c15b5404927
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-10 21:53:32 +00:00
Daniel Zheng
4833be3517 Merge "Shove type into source_info" into main am: a3646037c2
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2775834

Change-Id: Ied9569159c2d3c6e5ca3a234adf3188444588034
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-10 21:49:03 +00:00
Daniel Zheng
dcdab5ec9b Merge "Update API usage for source" into main am: a065e8739e am: 79693491d1
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2779370

Change-Id: I22afbb4ab68a8a5026108464ad2f4631c42d8e42
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-10 21:18:37 +00:00
Daniel Zheng
a3646037c2 Merge "Shove type into source_info" into main 2023-10-10 21:11:33 +00:00
Daniel Zheng
79693491d1 Merge "Update API usage for source" into main am: a065e8739e
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2779370

Change-Id: Ic9b9d120391ff2cf45399e894c079578b7dcb952
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-10 20:08:49 +00:00
Daniel Zheng
73b3428e1c Rename BLOCK_SZ to block_size
BLOCK_SZ name to block_size as we should reserve all caps for compile
time constants

Test: th
Change-Id: I542632662e81b272ffec50d6b50c290d701b08e3
2023-10-10 12:55:28 -07:00
Daniel Zheng
e90a39aee2 Shove type into source_info
We can shove type into source info to save 8 bits in per cow operation.
We only need 4 bits inside of source_info to enumerate all the types of
Cow Operation:

static constexpr uint8_t kCowCopyOp = 1;
static constexpr uint8_t kCowReplaceOp = 2;
static constexpr uint8_t kCowZeroOp = 3;
static constexpr uint8_t kCowLabelOp = 4;
static constexpr uint8_t kCowClusterOp = 5;
static constexpr uint8_t kCowXorOp = 6;
static constexpr uint8_t kCowSequenceOp = 7;
static constexpr uint8_t kCowFooterOp = -1;

Test: critical ota paths on pixel
Change-Id: I22049db0b39a55bd8f863339f3751d3146d5c1e9
2023-10-10 12:55:27 -07:00
Daniel Zheng
76b1e83fad Move ReadCowHeader to CowReader
Moving this function to cow reader first we have to read the version of
cow from the header before deciding which parser to use. This is a more
logical place for this code to be in

Test: th
Change-Id: Ie5ba53439b4fc3c4c409426b818a2d53c0cbc3e5
2023-10-10 12:55:27 -07:00
Daniel Zheng
a065e8739e Merge "Update API usage for source" into main 2023-10-10 19:29:10 +00:00
Daniel Zheng
31f8a58f88 Merge "Move Sync to base class" into main am: 2d5ec079be am: 8a41f54079 am: 6dc934c695 am: 1155016e7d
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2779867

Change-Id: I5e3b483a0054bcfa900a7d921596e2d8638f8c1c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-10 05:23:09 +00:00
Daniel Zheng
6264bcd3c4 Merge "Removing compression bit from v3 op" into main am: f7f3b62f24 am: 8f594c12ea am: 814fb325c4 am: c1ff85670c
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2775901

Change-Id: Ib33fc5f93e6da148dec58e3c4bdd9adea0ec19bf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-10 05:22:36 +00:00
Daniel Zheng
c94bfdb466 Merge "Add v3 writer" into main am: 3062a64f06 am: 82e5bde2a1 am: e5573d47ab am: 3ed84cdfee
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2750004

Change-Id: I678e5d017c54df81617403d877b3ce3146162005
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-10 05:21:57 +00:00
Daniel Zheng
1155016e7d Merge "Move Sync to base class" into main am: 2d5ec079be am: 8a41f54079 am: 6dc934c695
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2779867

Change-Id: I7d44a01fd21d8faef8a10441ffa2c037baf92f9f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-10 04:47:09 +00:00
Daniel Zheng
c1ff85670c Merge "Removing compression bit from v3 op" into main am: f7f3b62f24 am: 8f594c12ea am: 814fb325c4
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2775901

Change-Id: I06826ca09914ddf992939e3527e2dd9bb9cafc50
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-10 04:47:00 +00:00
Daniel Zheng
3ed84cdfee Merge "Add v3 writer" into main am: 3062a64f06 am: 82e5bde2a1 am: e5573d47ab
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2750004

Change-Id: Ic2894b012cda6a6123aac1e1deeb8e2457f0006b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-10 04:46:51 +00:00
Daniel Zheng
6dc934c695 Merge "Move Sync to base class" into main am: 2d5ec079be am: 8a41f54079
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2779867

Change-Id: Ie0fa0083addc9a4a74e8443fe7036cdab31aa89c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-10 03:57:11 +00:00
Daniel Zheng
814fb325c4 Merge "Removing compression bit from v3 op" into main am: f7f3b62f24 am: 8f594c12ea
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2775901

Change-Id: Id9ef6bada48a47787682bda0cfe6d283d99fe4e0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-10 03:57:03 +00:00
Daniel Zheng
e5573d47ab Merge "Add v3 writer" into main am: 3062a64f06 am: 82e5bde2a1
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2750004

Change-Id: Ice7bc49e0bcd0e9d2b3e0ed73a4ee961b0977405
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-10 03:56:53 +00:00
Treehugger Robot
234de3df8d Merge "init: Remove arbitrary delay in async persist writes." into main am: 1258dabac7 am: 4ba12afcd5 am: de52214f54 am: d5d429062b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2777581

Change-Id: I6e1c1153bb2b09917ceeaf1c3a0a6ae06b11be7b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-10 03:55:03 +00:00
Daniel Zheng
8a41f54079 Merge "Move Sync to base class" into main am: 2d5ec079be
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2779867

Change-Id: I3a8a19d2703cf73d9391d5ae3212ff1b1d431268
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-10 03:26:32 +00:00
Daniel Zheng
8f594c12ea Merge "Removing compression bit from v3 op" into main am: f7f3b62f24
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2775901

Change-Id: I606cfe647db725d3688bc8d3355481a8db54feae
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-10 03:26:22 +00:00
Daniel Zheng
82e5bde2a1 Merge "Add v3 writer" into main am: 3062a64f06
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2750004

Change-Id: Ia4804bc409632b627860e7a7e3896d94824f5e49
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-10 03:26:11 +00:00
Treehugger Robot
d5d429062b Merge "init: Remove arbitrary delay in async persist writes." into main am: 1258dabac7 am: 4ba12afcd5 am: de52214f54
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2777581

Change-Id: I98e47ad943d7a85f978c7a483f2780803af4a39f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-10 03:25:09 +00:00
Daniel Zheng
2d5ec079be Merge "Move Sync to base class" into main 2023-10-10 03:17:38 +00:00
Daniel Zheng
c197df70d8 Update API usage for source
replacing any instance of op->source_info with GetCowSourceinfoData as
that's what we're really looking for. This function will return the 48
bits associated with the source and not the extra bits that will store
type + other information. We should never be making a reference to
op->source_info directly as that has no real meaning, we should be
masking for the data that we really need

Test: cow_api_test
Change-Id: I259c790efdd13c61a4599e9edfc75cf0ba000c61
2023-10-09 20:15:34 -07:00
Daniel Zheng
f9f833066d Move Sync to base class
This function will be called in header write for both v3 and v2 writer.
Seems okay to move to base class as theres no unique functionality to
the v2 writer.

Test: cow_api_test

Change-Id: I70c1b08ce67127c9dcbd0f54b574d2cd5ad1d0b5
2023-10-09 20:15:34 -07:00
Daniel Zheng
f7f3b62f24 Merge "Removing compression bit from v3 op" into main 2023-10-10 03:09:58 +00:00
Daniel Zheng
3062a64f06 Merge "Add v3 writer" into main 2023-10-10 02:25:38 +00:00
Treehugger Robot
de52214f54 Merge "init: Remove arbitrary delay in async persist writes." into main am: 1258dabac7 am: 4ba12afcd5
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2777581

Change-Id: I37967a9cc21991cf5924a1a3107551cd2d199ede
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-10 02:00:02 +00:00
Treehugger Robot
4ba12afcd5 Merge "init: Remove arbitrary delay in async persist writes." into main am: 1258dabac7
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2777581

Change-Id: I29c3ad7690b5505dd103cbfa25c7fcc40a1ae6c6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-10 01:24:09 +00:00
Treehugger Robot
1258dabac7 Merge "init: Remove arbitrary delay in async persist writes." into main 2023-10-10 00:32:04 +00:00
Steven Moreland
7a1ca59839 libutils: split out libutils_binder
Dependencies of libbinder, so we can build
a core libbinder library, libbinder_sdk.

This is preparing the way to move this part of libbinder
together with binder code into a single project.

Bug: 302720583
Change-Id: Icff078ac6e36c7f2b91cf815d5b9ed19b2e706e1
2023-10-09 21:56:15 +00:00
Daniel Zheng
ce57c58e6b Removing compression bit from v3 op
We don't need the compression bit in v3 op since all operations will
have the same compression per COW Device and it will be stored within the COW header.
We can check to see if an operation contains compressioned data by
checking data_length and see if it's less than BLOCK_SZ

Test: 4 critical OTA paths
Change-Id: I3f86756d83bf54bf6efd15d9cb7ac064eefdd949
2023-10-09 13:31:20 -07:00
Daniel Zheng
04e4c2a6c2 Add v3 writer
Adding v3 writer that works off of Cow Operation v3. Adding test file
that will test this new writer. Adding in stub implementations to v3 writer. None of these functions
have to work yet, we just need the implementations here to compile.

Test: m libsnapshot
Change-Id: If86437d5ceb2c33520d4ca26dea5193984f86546
2023-10-09 13:31:19 -07:00
Yurii Shutkin
c30afb5d87 Merge "acvp: handle flush commond in modulewrapper as stated in BoringSSL." into main am: a7dd77670e am: 9405231837 am: 88a6a562e0 am: eea2f49325
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2778528

Change-Id: Ie1cf27f2da091072334c4b5280f9d0da4ae2f5a9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-09 18:23:02 +00:00
Yurii Shutkin
eea2f49325 Merge "acvp: handle flush commond in modulewrapper as stated in BoringSSL." into main am: a7dd77670e am: 9405231837 am: 88a6a562e0
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2778528

Change-Id: I2386792aeb2c571d77c2e390ce0391768ba6506c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-09 17:16:35 +00:00