Commit graph

81063 commits

Author SHA1 Message Date
Devin Moore
5729d860cd Remove libdiskconfig as it is no longer used
Test: m
Bug: 280829178
Change-Id: I1da275ef13dea92b8c1021aa3d658569c4cf782e
2023-05-23 00:24:04 +00:00
Pawan Wagh
82c4ce215b Merge "Added defaults for storaged fuzzers" 2023-05-08 22:53:03 +00:00
Mitchell Wills
dab6a32b2e Merge "Fix the return values of DmTable::valid to match the expected type" 2023-05-08 22:05:34 +00:00
Mitchell Wills
2da7808bad Fix the return values of DmTable::valid to match the expected type
Test: make libdm
Change-Id: Id2be81eafe5168be9bfb37a5bcabfbdba3de8fa7
2023-05-08 13:26:35 -07:00
Pawan Wagh
bef5f65494 Added defaults for storaged fuzzers
- Added cc_defaults
- Disabled leak detection
- Adding triage_assigneer

Test: m storaged_service_fuzzer storaged_private_service_fuzzer
Bug: 280444808
Change-Id: Id885f2f86850a77d2dc6503788e921756393f299
2023-05-05 23:55:27 +00:00
Maciej Żenczykowski
1f7c08e241 Merge "remove inprocess tethering" 2023-05-05 20:31:58 +00:00
Daniel Zheng
f47f3f7584 Merge "Fail on fastboot-info.txt format error" 2023-05-05 19:37:18 +00:00
Daniel Zheng
d441d52540 Fail on fastboot-info.txt format error
If fastboot-info.txt has wrong format we should not fall back on
hardcoded list silently. Instead we should LOG(FATAL) and fail.
Hardcoded list should only be used when fastboot-info.txt is not found
or is empty 

Test:  fastboot flashall 
Bug: 194686221
Change-Id: I1cada102f3ff12c1f3002d0b61d3785fc25543c1
2023-05-05 10:50:17 -07:00
Daniel Zheng
d7150ea505 Merge changes from topic "fastboot_version"
* changes:
  Adding fastboot-info version to host tool
  Updating fastboot-info version check
2023-05-04 17:49:07 +00:00
Dmitrii Merkurev
82899e4190 Merge "remount: Increase scratch size from 50% to 85% of available data" 2023-05-04 04:29:04 +00:00
David Anderson
c274088e5c Merge changes I7ec850b5,I62aa8c7b
* changes:
  libsnapshot: Use pointers instead of references in ICowOpIter.
  libsnapshot: Move BLOCK_SZ to snapuserd.
2023-05-04 02:51:29 +00:00
David Anderson
f16b2f7988 Merge "snapuserd: Remove dead code from legacy snapuserd." 2023-05-03 22:53:17 +00:00
Steven Moreland
b8304d1502 Merge changes I138f3ace,I19f7fc51
* changes:
  init: V devices need to specify user
  init.usb.rc: specify user manually
2023-05-03 17:45:01 +00:00
David Anderson
f9bdc146ff Merge changes Ie8ac02ad,I876f858a,Iccfd6e72
* changes:
  libsnapshot: Improve inspect_cow output.
  libsnapshot: Rename and clarify some methods in ICowOpIter.
  libsnapshot: Remove fallible ICowReader::GetHeader.
2023-05-03 16:52:11 +00:00
Dmitrii Merkurev
9292c09c06 remount: Increase scratch size from 50% to 85% of available data
adb remount clearly indicates that the user will use
a scratch partition to modify RO content. In this CL we're
trying to be more aggressive and take more space from
data to scratch to improve the developers experience.

Bug: 228945443
Test: launch cvd with updated value and check it reflects
Change-Id: Ied9cee6e98d3b2dd594babcf213071a80bd3cf14
Signed-off-by: Dmitrii Merkurev <dimorinny@google.com>
2023-05-03 05:39:51 +01:00
David Anderson
1318e76655 libsnapshot: Use pointers instead of references in ICowOpIter.
Most callers already converted the reference to a pointer, and pointers
will make it much easier to move around the op list.

Bug: 280529365
Test: builds
Change-Id: I7ec850b58a79c33e57b0e2602e1be953484daa46
2023-05-02 19:45:31 -07:00
David Anderson
4485a6dfa4 libsnapshot: Move BLOCK_SZ to snapuserd.
Block sizes should not be hardcoded, since the value is set in the
cow header. Move this to snapuserd to isolate use.

Bug: 280529365
Test: builds
Change-Id: I62aa8c7b795f9d258d4b6deb0779a536cba65d52
2023-05-02 19:45:25 -07:00
David Anderson
de20e57f08 libsnapshot: Improve inspect_cow output.
Clean up the formatting and unit display, and add a line displaying how
long it took to parse the COW.

Example of new output:

    Version: 2.0
    Header size: 38
    Footer size: 84
    Block size: 4096
    Merge ops: 0
    Readahead buffer: 2097152 bytes
    Footer: ops usage: 1005680 bytes
    Footer: op count: 50284
    Parse time: 6.77921ms
    Data ops: 50015
    Replace ops: 50015
    Zero ops: 0
    Copy ops: 0
    Xor ops: 0

Bug: 280529365
Test: inspect_cow /dev/block/mapper/product_b-cow
Change-Id: Ie8ac02adc004289cc3a08ef44aa3048280a2407f
2023-05-02 19:45:19 -07:00
David Anderson
82356c3f6a libsnapshot: Rename and clarify some methods in ICowOpIter.
Done and RDone are not exactly symmetrical, so rename them to match
their underlying STL behavior. Done becomes "AtEnd" and RDone becomes
"AtBegin".

Bug: 280529365
Test: builds
Change-Id: I876f858a7bef84d8b37c1c822fb42941fbcded25
2023-05-02 19:45:16 -07:00
David Anderson
359350250b libsnapshot: Remove fallible ICowReader::GetHeader.
This function cannot fail, so replace it with an infallible version.
This is also slightly more efficient since there's no copying involved.

Bug: 280529365
Test: builds
Change-Id: Iccfd6e72bc2192f4e1efda50cf544e1e956a9263
2023-05-02 19:45:12 -07:00
Akilesh Kailash
33ff356a3f Merge "libsnapshot: Turn off vabc_legacy_tests on presubmit" 2023-05-03 02:13:37 +00:00
Steven Moreland
e5349196b2 init: V devices need to specify user
This also specifies user on an adbd service
declaration which was missing before. It seems
that certain services are declared mulitple
times.

Fixes: 276813155
Test: boot (on CF, the only V device in the tree)
Test: remove 'user' specification and see error

Change-Id: I138f3ace72d46f221551ad61e75ba4c01632da59
2023-05-03 01:06:38 +00:00
Steven Moreland
7d53332195 init.usb.rc: specify user manually
Merging as a separate CL due to a log showing up
related to this on hwasan (is a prebuilt pulling
this in?)

Bug: 276813155
Test: boot cf
Change-Id: I19f7fc51c937d0eb1ee17781fc5d201a0972c4b0
2023-05-03 01:06:38 +00:00
Akilesh Kailash
defe8381aa libsnapshot: Turn off vabc_legacy_tests on presubmit
Temporarily turn off these tests until root cause is found.

Bug: 279009697
Test: presubmit
Change-Id: I90f695fac318b71871ff60c1f74c90265437687d
Signed-off-by: Akilesh Kailash <akailash@google.com>
2023-05-02 20:40:25 +00:00
David Anderson
d71f1c7225 Merge "libsnapshot: Remove the IByteSink API." 2023-05-02 18:05:41 +00:00
David Anderson
467af3d67b libsnapshot: Remove the IByteSink API.
Bug: 278637212
Test: builds
Change-Id: I355aa1e7b1f67352848f2659489a7b831ac89cf8
2023-05-02 08:21:06 -07:00
David Anderson
cd1595509d Merge "snapuserd: Remove IByteSink usage from snapuserd." 2023-05-02 03:01:04 +00:00
Daniel Zheng
451e46f1ae Adding fastboot-info version to host tool
Replacing check with PLATFORM_TOOLS_VERSION with FASTBOOT_INFO_VERSION
to indicate waht version of fastboot_info.txt we currently support. This
makes mor sense since PLATFORM_TOOLS_VERSION won't be updated every time
me make a change to the host tool

Test: fastboot flashall
Bug: 194686221
Change-Id: I621b62c92ba129f402857463dae9112a0797ab07
2023-05-01 14:04:13 -07:00
Daniel Zheng
630f29e0db Updating fastboot-info version check
Updating version to just be a single number.  Reason for updating is
to keep format the same as Flashstation's

Test: fastboot_test
Bug: 194686221
Change-Id: I21ab0747e620d3f6d05c5170c3e55707eed0288a
2023-05-01 14:04:12 -07:00
David Anderson
23ff37a038 Merge changes Ia17bcc86,I1954b38f
* changes:
  snapuserd: Remove IByteSink usage from legacy snapuserd.
  libsnapshot: Disable another legacy merge path in tests.
2023-05-01 19:36:34 +00:00
Treehugger Robot
3729536f8e Merge "libprocessgroup: implement task profile validity checks" 2023-05-01 18:46:39 +00:00
Suren Baghdasaryan
8cacb6105c libprocessgroup: implement task profile validity checks
Provide profile validity check functions for cases when user wants to
check whether a profile can be successfully applied before actually
applying it. Add test cases to cover new APIs.

Also add a wrapper function for framework code to call it.

Bug: 277233783
Test: atest task_profiles_test
Test: manually verify freezer with outdated cgroup configuration
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: Li Li <dualli@google.com>
Change-Id: Iefb321dead27adbe67721972f164efea213c06cb
2023-04-29 18:35:20 +00:00
David Anderson
3baad9e820 snapuserd: Remove IByteSink usage from snapuserd.
This added some new failure paths, so the patch also includes an RAII
helper to assist with handling those.

Bug: 278637212
Test: vts_libsnapshot_test
      apply ota on CF
Change-Id: Ide59c83cb34b6d448fe9afdc1d15c6139a0c99fa
2023-04-28 14:53:41 -07:00
David Anderson
78d8d5d9de snapuserd: Remove IByteSink usage from legacy snapuserd.
Bug: 278637212
Test: vabc_legacy_tests
      apply ota on CF w/ userspace snapshots disabled
Change-Id: Ia17bcc862ed9a7d7b78732139f457cac58fa79b9
2023-04-28 14:53:41 -07:00
David Anderson
ed4c853d14 libsnapshot: Disable another legacy merge path in tests.
Bug: 279009697
Test: presubmit
Change-Id: I1954b38f497bb8e4f7aa288e80541ac9ad5c075c
2023-04-28 14:53:41 -07:00
David Anderson
2e998a43e1 Merge "libsnapshot: Replace IByteSink usage in snapshot_reader." 2023-04-28 18:21:13 +00:00
Vincent Donnefort
954cc2ad2c Merge "ramdisk_node_list: Add urandom node" 2023-04-28 16:32:19 +00:00
Vincent Donnefort
b6e3d145aa ramdisk_node_list: Add urandom node
Bionic requires random numbers to init the shadow call stack. Those
numbers are obtained via the syscall getrandom (non-blocking) and will
fallback to /dev/urandom if the former fails.

When loading pKVM modules, we are so early in the boot process that the
only source of entropy for the linux RNG are the architecture random
number generators... which might be available on some platforms. Without
any source of entropy, the only way of generating a random number is to
try to generate some, which is what the bionic fallback expects via
urandom.

As a consequence, add the urandom node to the initramfs.

Bug: 274876849
Change-Id: I164b08f026a238dad9f27a345bdef96717f2aa74
2023-04-28 09:51:05 +01:00
Maciej Żenczykowski
e37468b295 remove inprocess tethering
Test: TreeHugger
Bug: 279942846
Change-Id: Ia3a5d289cceac96d310e04fbae3588789cc859ca
2023-04-27 19:27:57 +00:00
Pawan Wagh
242d5fb816 Merge "Update return values in main" 2023-04-27 18:21:38 +00:00
David Anderson
112dfd1754 libsnapshot: Replace IByteSink usage in snapshot_reader.
Bug: 278637212
Test: vts_libsnapshot_test
Change-Id: I2e684c91ed4a81c984d4bd6a3a9f1e0221aaee01
2023-04-27 08:03:41 -07:00
David Anderson
cd21e051bd Merge changes I69f41b23,Ib740de5e
* changes:
  libsnapshot: Replace IByteSink usage in inspect_cow.
  libsnapshot: Deprecate the IByteSink API.
2023-04-27 14:28:28 +00:00
Pawan Wagh
ca5c2f8f8a Update return values in main
Test: m gatekeeperd
Bug: N/A
Change-Id: I99fbdbcaf252e89ac38eda7fbc2b296158bd2af1
2023-04-26 20:52:49 +00:00
Daniel Zheng
71c918aa59 Merge "Added Mock function call tests" 2023-04-26 19:57:52 +00:00
Pawan Wagh
3b41a5b46c Merge changes from topic "fuzz_gatekeeperd"
* changes:
  Adding fuzzer for gatekeeperd
  Separating GateKeeperProxy declaration in header
2023-04-26 19:37:15 +00:00
Pawan Wagh
c4bd2afc42 Adding fuzzer for gatekeeperd
Fuzzing AIDL service gatekeeperd with fuzzService API.

Test: m gatekeeperd_service_fuzzer && adb sync data && adb shell /data/fuzz/x86_64/gatekeeperd_service_fuzzer/gatekeeperd_service_fuzzer
Bug: 232439428
Change-Id: I20a451f7981cab312e4c67b11c715198284d0051
2023-04-26 18:06:19 +00:00
Daniel Zheng
ab4723f85f Merge "Removing {userspace} from reboot task'" 2023-04-26 17:57:22 +00:00
Daniel Zheng
f022b2eb41 Merge "Updating Test Suite Names" 2023-04-26 17:56:56 +00:00
Automerger Merge Worker
0981ab4864 Merge changes from topic "am-e6c556c6cc5a445da6801819c9445106"
* changes:
  Merge "[automerger skipped] Merge "Merge "libsnapshot: Fix test failures on certain configurations." into android12-tests-dev am: b880578664" into android12L-tests-dev am: 5141eaf353 -s ours" into android13-tests-dev am: 5658f34653
  [automerger skipped] Merge "Merge "libsnapshot: Fix test failures on certain configurations." into android12-tests-dev am: b880578664" into android12L-tests-dev am: 5141eaf353 -s ours am: 51349daf08 -s ours
2023-04-26 17:50:04 +00:00
Automerger Merge Worker
6d487b24dc Merge "[automerger skipped] Merge "Merge "libsnapshot: Fix test failures on certain configurations." into android12-tests-dev am: b880578664" into android12L-tests-dev am: 5141eaf353 -s ours" into android13-tests-dev am: 5658f34653
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2563951

Change-Id: Idd8743a9ea02c9e630f43b059fd5e991030bdea6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-26 17:49:59 +00:00