Commit graph

84753 commits

Author SHA1 Message Date
Daniel Zheng
d3445d98f0 Merge "Rename basic_v2_writer" into main 2023-10-17 20:40:24 +00:00
Daniel Zheng
f0a28dae28 Add write_cow functionality
Adding gflags + some basic functionality to this binary. We should be
able to use this to write v2 or v3 cow, and then use inspect_cow to
inspect the contents

Test: write_cow
Change-Id: I44bf5a8c807c4c4759e54624c51e966f2ea18ce9
2023-10-17 12:47:19 -07:00
Daniel Zheng
06c086dd73 Rename basic_v2_writer
Gonna add to this binary options to write v2 + v3 cow, + some additional
configurations (for testing purposes). I think this binary can serve as
something to use in parallel with inspect_cow

Test: m write_cow
Change-Id: I93c703b246baa5b400044436a94b33a32e03ea68
2023-10-17 09:39:40 -07:00
Elliott Hughes
3aee719660 Merge "init: don't use magic numbers for RLIMIT_ constants." into main 2023-10-17 15:34:56 +00:00
Akilesh Kailash
57b34ae34c Merge "libsnapshot: Remove consistency check after merge" into main 2023-10-17 01:31:07 +00:00
Elliott Hughes
7a19bf8e0d init: don't use magic numbers for RLIMIT_ constants.
Also, why are we accepting the completely made-up "RLIM_AS" but not the
real "RLIMIT_AS" in .rc files?

Bug: http://b/293894041
Test: treehugger
Change-Id: I18b10b6dd77265a9a14b88bfdf1cc0b474800a94
2023-10-16 22:29:47 +00:00
Steven Moreland
d9edd67b19 Merge changes from topic "libutils_binder_split" into main
* changes:
  libutils: split out libutils_binder
  libutils: remove unused 'CALLSTACKS'
2023-10-16 21:12:48 +00:00
Raymond Hernandez
00a14801bf Merge "Add monicamwang and rayhdez to system/core/libstats/OWNERS" into main 2023-10-16 20:40:40 +00:00
David Anderson
3c7d480214 Merge "snapuserd: Test both async and sync paths." into main 2023-10-16 20:23:53 +00:00
David Anderson
f7d07db679 snapuserd: Test both async and sync paths.
Rather than split this into two binaries as we did for libsnapshot, this
uses test parameterization. I went this route because even for async
builds, the sync path must always work as a fallback.

Bug: N/A
Test: snapuserd_test
Change-Id: Ib68c8fd831c345f41a4e14a99fd0a0b8b1d47b6d
2023-10-16 20:23:46 +00:00
Akilesh Kailash
e02b831aef libsnapshot: Remove consistency check after merge
Merge thread will mark merge-completion after msync on header is
complete. This should be definitive enough to track the completion
status.

Bug: 305187301
Test: OTA on Pixel
Change-Id: I366dc5052fa91a6eacf394a1970200cdebc0e135
Signed-off-by: Akilesh Kailash <akailash@google.com>
2023-10-16 11:32:54 -07:00
Daniel Zheng
452f176ca8 Merge "Add v3 to CreateCowWriter" into main 2023-10-16 15:20:47 +00:00
Yi-Yo Chiang
c0281978b0 Merge "fs_mgr: Don't run clean_scratch_files on non-dynamic devices" into main 2023-10-16 10:24:55 +00:00
Kelvin Zhang
9c949326bd Merge "Make partition metadata write atomic" into main 2023-10-14 00:01:41 +00:00
David Anderson
5233181ded Merge "Remove unused variable in snapuserd_core." into main 2023-10-13 23:03:26 +00:00
Kelvin Zhang
78d5352289 Make partition metadata write atomic
We have seen multiple OTA failures with invalid geometry magic
signature. Make partition metadata write atomic by writing to a tmpfile
first and then do a rename.

Test: th
Bug: 303770065
Bug: 298149189
Change-Id: Id1d565de73439b95b665144c2f02fc97273d341c
2023-10-13 15:46:28 -07:00
David Anderson
7e407514dd Remove unused variable in snapuserd_core.
Bug: N/A
Test: builds
Change-Id: I8fc3bd2dd8eb3cfa3c6bfe513f054a4d6a674de1
2023-10-13 21:34:12 +00:00
Bradley Furman
c6941de738 Merge "Update the fastboot command size from 64 to 4096 to cover the changes from https://android-review.git.corp.google.com/c/platform/system/core/+/2214970" into main 2023-10-13 18:28:17 +00:00
Dennis Shen
f307ee0767 Merge "apply staged property value when loading persistent props" into main 2023-10-13 18:22:56 +00:00
Dennis Shen
678d268848 apply staged property value when loading persistent props
Bug: b/300111812
Change-Id: I81b6bd984aad8f7ddec93ce74f4543e4f71be508
Merged-In: I81b6bd984aad8f7ddec93ce74f4543e4f71be508
2023-10-13 13:18:50 +00:00
Kalesh Singh
d469fdcd93 Merge "trusty: Remove explicit page-alignment of mmap and dmabuf allocations" into main 2023-10-12 22:19:26 +00:00
Treehugger Robot
58e7eda0b0 Merge "libtrusty: Remove PAGE_SIZE usage" into main 2023-10-12 21:32:33 +00:00
Treehugger Robot
8eda323bc2 Merge "trusty: tipc_fuzzer: Remove use of PAGE_SIZE" into main 2023-10-12 21:11:25 +00:00
Daniel Zheng
cab8646a07 Add v3 to CreateCowWriter
Adding v3 writer as a return type to CreateCowWriter

Test: write_cow
Change-Id: Ia68ddf17b9f5f9fae27da4d6ab5fb150078d0c38
2023-10-12 14:10:50 -07:00
Treehugger Robot
99414ad00b Merge "keymaster: Remove usage of PAGE_SIZE" into main 2023-10-12 20:58:34 +00:00
Kalesh Singh
623d140cc0 trusty: Remove explicit page-alignment of mmap and dmabuf allocations
bionic hard codes the PAGE_SIZE macro as 4096. This is going away as
Android begins to support larger page sizes.

trusty uses PAGE_SIZE to round up the allocation size of the DMA
buffers and mmap sizes. This is not explicitly needed since the kernel
will always give you a page-aligned and page-sized multiple allocation
when allocating a dmabuf or mmap-ing.

Remove this PAGE_SIZE usage from TrustyApp, app_fuzzer, coverage,
line-coverage, modulewrapper.

Bug: 294914413
Test: Boot test on 16k device
Change-Id: Iad922e0a152cb80db2e59e696d7556602fd17d67
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
2023-10-12 13:50:31 -07:00
Kalesh Singh
efeb096c40 libtrusty: Remove PAGE_SIZE usage
bionic provides PAGE_SIZE macro which happens to also match the
4096 chunk size in the tips_test.

PAGE_SIZE is being removed as no other libc provides this and
Android is moving towards being page-size-agnostic.

Use 4096 chunk size for tipc-tests; fix incorrect size in
munmap cleanup; and add failure log for send-fd test.

Test: tipc-test -t "send-fd"
Bug: 294914413
Change-Id: I7e5ec6480fff6bc1b4e8eed57eadf081cf82a72f
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
2023-10-12 13:35:29 -07:00
Kalesh Singh
bbc4bc54f2 keymaster: Remove usage of PAGE_SIZE
bionic provides PAGE_SIZE macro which happens to also match the
size keymaster send buffer (4096) and half the size of the recv
buffer.

PAGE_SIZE is being removed as no other libc provides this and
Android is moving towards being page-size-agnostic.

Use a 4096 constant instead.

Test: Boot 16k device
Bug: 294914413
Change-Id:  I2dc10b48811e24d25ba08cfe4ffb514e94d42a8f
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
2023-10-12 20:03:08 +00:00
Kalesh Singh
5a2b8794fc trusty: tipc_fuzzer: Remove use of PAGE_SIZE
tipc_fuzzer writes random data of length 'size' and then
attempts to read back data up to 'TIPC_MAX_MSG_SIZE' in length.

Since 'size' is unrestricted we can always write more than the
subsequent read; and in effect the fuzzer only checks that we
can read something.

Remove the read buffer's dependency on PAGE_SIZE.

Bug: 294914413
Test: mma
Change-Id: I909b49fda4e6ebf49f69b3c09ac29ff8629215ef
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
2023-10-12 20:02:34 +00:00
Yi-Yo Chiang
c519d1dde2 Merge "Revert "init_first_stage: Disable ThinLTO"" into main 2023-10-12 10:33:54 +00:00
Treehugger Robot
f7d982ec7f Merge "Skip android14-tests-dev" into main 2023-10-12 06:06:07 +00:00
Raymond Hernandez
786aabd706 Add monicamwang and rayhdez to system/core/libstats/OWNERS
Test: m -j
Bug: N/A
Change-Id: Ifb866dc90818423260c8ff4337edaa2e622d9d56
2023-10-11 17:52:25 -07:00
Steven Moreland
cd9556cb96 Merge "libutils: use log/log.h internally" into main 2023-10-11 22:02:18 +00:00
Kelvin Zhang
d6fe3032a9 Merge "Revert "Shove type into source_info"" into main 2023-10-11 20:50:02 +00:00
Kelvin Zhang
b6153adde1 Revert "Shove type into source_info"
This reverts commit e90a39aee2.

Reason for revert: 304602386

Change-Id: Ib9d31bdadc7511e67f4c7e5731d18e7bf0162bfc
2023-10-11 19:44:38 +00:00
Nolen Johnson
cb33fb4008 fs_mgr: Don't run clean_scratch_files on non-dynamic devices
* This results in a metric ton of denials on some devices and
  eats up valuable resources on boot, plus there's 0 need for it,
  so kill it.

Change-Id: Ic52d5b3f06724430e9505345024cf0041b37ca49
2023-10-11 13:58:40 -04:00
Edward Liaw
da3caeab43 Merge "liblp_test: Add to kernel-presubmit" into main 2023-10-11 16:53:26 +00:00
Edward Liaw
f5736cb42a Merge "libdm_test: Add to kernel-presubmit" into main 2023-10-11 16:53:10 +00:00
Yi-Yo Chiang
1a3dd7eb4b Revert "init_first_stage: Disable ThinLTO"
This reverts commit 4d6fa8ccaf.

Reason for revert: b/295944813 is fixed

Bug: 304290959
Change-Id: I2d6f5216800d6ee26b25623898836dc216c8be18
Test: adb-remount-test.sh
2023-10-11 02:06:26 +00:00
Harry Pan
06949876be Merge "Add new fastbootd battery-soc variable" into main 2023-10-11 00:28:28 +00:00
Xin Li
8f3b94818a Skip android14-tests-dev
Bug: 263910020
Merged-In: Iedb7c32a594c3b1fca2904f3441029aaed7edf2a
Change-Id: Ied477b08d7d23de298ace72ae7ee69dda7c0671b
2023-10-10 16:18:22 -07:00
Edward Liaw
eafffc0c9c liblp_test: Add to kernel-presubmit
Bug: 284307085
Test: atest :kernel-presubmit
Change-Id: I2a138cf55a2af07b5c231f163196266f8b3dd524
Signed-off-by: Edward Liaw <edliaw@google.com>
2023-10-10 23:13:30 +00:00
Edward Liaw
942a31e7be libdm_test: Add to kernel-presubmit
Bug: 284307085
Test: atest :kernel-presubmit
Change-Id: I13ae25f17c943825bdf5ee67c00b7d297cf6e319
Signed-off-by: Edward Liaw <edliaw@google.com>
2023-10-10 23:05:09 +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
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
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
a3646037c2 Merge "Shove type into source_info" into main 2023-10-10 21:11:33 +00:00