Commit graph

88954 commits

Author SHA1 Message Date
Treehugger Robot
ca95bfc10e Merge "Rename functions in libvendorsupport" into main am: f27d8cebbd
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2964824

Change-Id: If033344bccfffd08fadda77c1d2617a788f2815a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-19 00:29:14 +00:00
Treehugger Robot
f27d8cebbd Merge "Rename functions in libvendorsupport" into main 2024-02-18 23:53:22 +00:00
Treehugger Robot
8a10b8a71d Merge "Add check_builtins to libinit_host" into main am: cb09ff33a3
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2966903

Change-Id: Iac72d76a94521b33ce79c7c791b25945a4e05889
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-17 00:44:12 +00:00
Treehugger Robot
cb09ff33a3 Merge "Add check_builtins to libinit_host" into main 2024-02-17 00:13:19 +00:00
Pierre-Clément Tosi
0335dac70d first_stage_console: Fix execv() child error path
If the /first_stage.sh is not present on the system, the child process
which attempted to execv() ends up returning from the function along
with its parent, which can be seen in early logs e.g.

[   10.747576][   T51] init: Attempting to run /first_stage.sh...
[   10.757371][   T52] init: unable to execv /first_stage.sh, returned -1 errno 2
[   10.767527][   T52] init: unable to execv, returned -1 errno 2
                      [...]
[   10.789189][   T51] init: unable to execv, returned -1 errno 2

where both T51 and T52 end up executing the "rest" of StartConsole().

Instead, terminate the child if its execv() failed.

Test: run first_stage_init
Change-Id: I20bc0aeae627761a60fb2b55bae39871ad506f69
2024-02-16 15:23:32 +00:00
Justin Yun
8ce23dc44e Rename functions in libvendorsupport
Follow platform naming conventions for an LLNDK library.

Bug: 325093550
Test: atest libvendorsupport-tests
Change-Id: Id93f7e66a47ae9250191f9827a76ce819e8f6f88
2024-02-16 23:53:04 +09:00
Mitch Phillips
3d7a5c3a9b Merge "Update debuggerd for stack MTE." into main am: acd092ad4e
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2952673

Change-Id: I6f4ea45267397fb694a2f16e2b8784bee3930e0c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-16 09:44:25 +00:00
Mitch Phillips
acd092ad4e Merge "Update debuggerd for stack MTE." into main 2024-02-16 09:01:34 +00:00
Jooyung Han
39e8be43eb Add check_builtins to libinit_host
This requires a bit of refactoring: moving things around.

libinit_host is used by host_apex_verifier which needs check_builtins as
well.

Bug: 325565247
Test: atest host-apex-verifier
Test: m out/target/product/vsoc_x86_64/host_init_verifier_output.txt
Change-Id: Ifed54dd2149afbab2bf63f7e42c410c2354895fc
2024-02-16 17:36:12 +09:00
AleX Pelosi
1cfe984af1 Merge "Revert "healthd: BatteryMonitor: doLogValues: reduce log level to debug"" into main am: 1242da780f
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2965363

Change-Id: I87206087ffdcf74ae115d368c6d2450ff9d0bec2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-15 23:57:57 +00:00
AleX Pelosi
1242da780f Merge "Revert "healthd: BatteryMonitor: doLogValues: reduce log level to debug"" into main 2024-02-15 23:12:47 +00:00
AleX Pelosi
f08aeded81 Revert "healthd: BatteryMonitor: doLogValues: reduce log level to debug"
This reverts commit aeccbb8f3a.

Reason for revert: needed for debug and investigations of battery and charging issues. The tooling depends on these lines (and have been for years). You should have these lines only on SOC changes and in the presence of a serious problem. Please do not remove logging without consulting with the BMS SW team first.

Change-Id: Ife0079a7e0c1499b22e843429832b019139c0d89
2024-02-15 19:28:02 +00:00
Dennis Shen
44d2b204b0 Merge "init.rc: create /metadata/aconfig, /metadata/aconfig/flags and /metadta/aconfig/boot dirs" into main am: 48a452423b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2960463

Change-Id: Ief89fc5892275f3b52b237504aec5ab76341053e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-15 13:53:00 +00:00
Dennis Shen
48a452423b Merge "init.rc: create /metadata/aconfig, /metadata/aconfig/flags and /metadta/aconfig/boot dirs" into main 2024-02-15 13:20:02 +00:00
Akilesh Kailash
321c71426a Merge "create_snapshot: Enable v3 writer + variable block size" into main am: c65b6e62cb
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2954450

Change-Id: Icc1fd3401acdc39cf40eef759b651e56b275206b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-15 09:19:53 +00:00
Akilesh Kailash
c65b6e62cb Merge "create_snapshot: Enable v3 writer + variable block size" into main 2024-02-15 08:33:14 +00:00
Treehugger Robot
26efc75858 Merge "fastboot: Increase maximum usbfs bulk size for writes to 256KiB" into main am: c0e1b607d3
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2961895

Change-Id: Id7e7ca33204aadaba64c9bb870e3df68b33e80c4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-15 05:21:25 +00:00
Treehugger Robot
c0e1b607d3 Merge "fastboot: Increase maximum usbfs bulk size for writes to 256KiB" into main 2024-02-15 03:47:49 +00:00
Peter Collingbourne
ab8cc2f7f3 fastboot: Increase maximum usbfs bulk size for writes to 256KiB
With a device capable of saturating the bus at SuperSpeed+,
the next bottleneck is the fixed (size-independent) overhead of
the usbfs ioctl() system calls, which includes entering/exiting
the kernel, allocating/deallocating a contiguous buffer for DMA,
configuring/deconfiguring the IOMMU and issuing the DMA to the HC. In
order to saturate the bus from the host software perspective, we must
reach the schedule() call in reap_as() before the next interrupt from
the HC indicating the completion of the URB.

In my experimental setup, with an SS+ capable host and device
and 16 KiB URBs, we reach the schedule() call in 25us, but the
URB is serviced in an estimated 16us, so we lose roughly a third
of the bandwidth. Increasing the URB size to 64KiB there are
65us between interrupts and 55us until schedule(). This means
we usually reach schedule() in time but not always, so we lose a
bit of bandwidth. Increasing it again to 128KiB and we have 128us
between interrupts and 65us until schedule(), so we're now comfortably
saturating the bus. In order to account for differences between hosts,
this CL uses a doubled maximum of 256KiB.

With larger allocation sizes we now risk contiguous allocation
failures, so I implemented a fallback where we try smaller sizes if
a larger one fails.

With this CL download speeds on my hosts are now around 980 MB/s over
SS+ and 440 MB/s over SS.

Bug: 325128548
Change-Id: Ie5ad480c73f2f71a50ce7f75ffb4aaa93ded2f0b
2024-02-14 16:09:47 -08:00
Treehugger Robot
e7e3a9efb3 Merge "Check if ALWAYS_INLINE is already defined" into main am: 8097002e09
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2963982

Change-Id: I37f81d8ba382cd3cc7f57a0896b15d713895be5a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-14 21:36:53 +00:00
Florian Mayer
920d95b1c8 use new location of crash_detail API
Bug: 155462331
Change-Id: I862f91368d421363adbbf002fe3c7d446c437b03
2024-02-14 12:58:18 -08:00
Treehugger Robot
8097002e09 Merge "Check if ALWAYS_INLINE is already defined" into main 2024-02-14 20:40:30 +00:00
Florian Mayer
aced3aa5c6 Add tests for android_replace_crash_detail_[name|data]
Bug: 155462331
Change-Id: I1ca4ae6d700dfbaf0bc4e511da0788edd969fca3
2024-02-14 12:01:49 -08:00
Serdar Kocdemir
593b19b5ce Check if ALWAYS_INLINE is already defined
Fixes build errors when using callstack library in gfxstream
project, where the definition is already made.

Test: build
Change-Id: I80d4038160725b5dc70f9af93d338aca66a2f0d5
2024-02-14 17:52:19 +00:00
Florian Mayer
7dddcbbd2a Merge "Read data set by android_add_crash_detail into tombstone." into main am: 75800c9c3a
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2955722

Change-Id: I88829e46f241d0028c4a671b32af5de0f0efedba
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-14 17:40:42 +00:00
Florian Mayer
75800c9c3a Merge "Read data set by android_add_crash_detail into tombstone." into main 2024-02-14 17:06:07 +00:00
Treehugger Robot
b422458e2d Merge "first_stage_console: Address compiler warning" into main am: 619042f207
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2959286

Change-Id: Id019cffe424167ff16eb939a63d8823d215e0583
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-14 16:18:47 +00:00
Treehugger Robot
619042f207 Merge "first_stage_console: Address compiler warning" into main 2024-02-14 15:34:45 +00:00
Snehal Koukuntla
880316f57d Merge "Sync tipc.h with one from trusty" into main am: 66dc1bde80
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2960970

Change-Id: Idde52332b6f82171d55ace13d94046e1d4d8e37e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-14 10:01:04 +00:00
Snehal Koukuntla
66dc1bde80 Merge "Sync tipc.h with one from trusty" into main 2024-02-14 09:07:24 +00:00
Florian Mayer
5fa6663458 Read data set by android_add_crash_detail into tombstone.
Bug: 155462331
Bug: 309446525
Change-Id: I6d01aafca48e0e5e8cbd5ae87add6aec0c429503
2024-02-13 18:13:22 -08:00
Vilas Bhat
89482bd443 Merge "ashmem: Remove hardcoded PAGE_SIZE usage in ashmem_test" into main am: 89fa277dcb
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2954211

Change-Id: I5bbb4901353724821d7a1c06bf1df37986f804b4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-14 01:11:32 +00:00
Treehugger Robot
e233ba1d0e Merge "Change debuggerd client param from pid to tid" into main am: 222ba3e8bd
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2941065

Change-Id: I1fcad6a0a9fa5299a09e8acd1dd19cab9c525ba4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-14 01:10:24 +00:00
Vilas Bhat
89fa277dcb Merge "ashmem: Remove hardcoded PAGE_SIZE usage in ashmem_test" into main 2024-02-14 00:51:11 +00:00
Treehugger Robot
222ba3e8bd Merge "Change debuggerd client param from pid to tid" into main 2024-02-14 00:13:33 +00:00
Vilas Bhat
f791b99628 ashmem: Remove hardcoded PAGE_SIZE usage in ashmem_test
Bug: 323061793
Test: atest libcutils_test
Change-Id: I8defd5225859b52a1b96a638d418188b328a23bc
2024-02-13 20:50:00 +00:00
Dennis Shen
61d9e2ab8d init.rc: create /metadata/aconfig, /metadata/aconfig/flags and
/metadta/aconfig/boot dirs

Create aconfig dirs on /metadata to store aconfig storage related files.

Under /metadata/aconfig we will store the following pb files:

1, aconfig_storage_location.pb, store the location of the storage files for
each container.

2, aconfig_flag_persistent_overrides.pb, store the local flag value overrides.

Under /metadata/aconfig/flags we will store flag value and info files
for each container, this include:

1, <container_name>.val flag value file
2, <container_name>.info flag info file

Under /metadata/aconfig/boot we will store read only flag value files
copied from /metadata/aconfig/flags at boot. These read only files are
used to serve flag read queries.

Bug: 312444587
Test: m
Change-Id: I8ae06e56fc9b9e8c0b06f86e3deb4219d7f49660
2024-02-13 20:47:13 +00:00
Snehal
f425428c2d Sync tipc.h with one from trusty
Bug: 325069766

Test: Android boot and crasher test

Change-Id: I36244cfb698a81be79c204eb019e1a59b90d2e6c
2024-02-13 18:10:00 +00:00
Pierre-Clément Tosi
914ccc5664 first_stage_console: Address compiler warning
Re-order the fields in the declaration to address the following

  ISO C++ requires field designators to be specified in declaration order;
  field 'sigaction::(anonymous union at bionic/libc/include/bits/signal_types.h:76:20)'
  will be initialized after field 'sa_flags' [-Wreorder-init-list]

Test: TH
Change-Id: I3f1d4739f1677aad50d4f07361aa264da43bdd13
2024-02-12 18:57:16 +00:00
Akilesh Kailash
e5bc36900e create_snapshot: Enable v3 writer + variable block size
1: Move to v3 COW writer

2: Enable variable block size. Default compression set to lz4
with compression factor 64KiB

3: Prepare merge sequence so that device can initiate the merge

4: Verify the merge order

Bug: 319309466

Test: On Pixel 6

This was tested on live builds where the actual builds/testing
is done on CI.

Patch-Create+Apply = Create the snapshot patches between two
builds and apply them to the device

Branch(main)            Patch-Creation+Apply  Snapshot-size
=============================================================
Build-1 -> Build-2      14 seconds            160MB

Build-2 -> Build-3      21 seconds            331MB

Build-3 -> Build-4      30 seconds            375MB

Build X -> Build X      3 seconds             8MB

Change-Id: I96437032de029d89de62ba11fe37d9287b0a4071
Signed-off-by: Akilesh Kailash <akailash@google.com>
2024-02-11 23:19:22 -08:00
Ryan Prichard
2499c6d958 Merge "libsnapshot: replace non-character basic_string[_view]<T>" into main am: 18744c17c1
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2956695

Change-Id: I2f5f9e60cc8f0421e25764d7652be05e54dc2f49
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-09 20:00:33 +00:00
Ryan Prichard
18744c17c1 Merge "libsnapshot: replace non-character basic_string[_view]<T>" into main 2024-02-09 20:00:06 +00:00
Treehugger Robot
94a060ada0 Merge "Remove obsolete __STDC_LIMIT_MACROS references." into main am: 0bd010d9ae
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2955864

Change-Id: Ie8ab57eb4c3bd82a433e2bccef46e53e003a7f01
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-09 19:58:53 +00:00
Treehugger Robot
0bd010d9ae Merge "Remove obsolete __STDC_LIMIT_MACROS references." into main 2024-02-09 19:11:47 +00:00
Elliott Hughes
29cd07132d Remove obsolete __STDC_LIMIT_MACROS references.
None of our libcs need this any more.

Test: treehugger
Change-Id: I8a942ad6b3860633a6d722bd237a7c75482499eb
2024-02-09 16:40:02 +00:00
Treehugger Robot
de0c8b2425 Merge "Replace lazy_static with once_cell" into main am: 22e1c5dcb0
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2922005

Change-Id: I5b7108347a452034a3c4a4b4fb35ce7091fd508b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-09 16:29:37 +00:00
Treehugger Robot
22e1c5dcb0 Merge "Replace lazy_static with once_cell" into main 2024-02-09 15:41:46 +00:00
Ryan Prichard
abb472c238 libsnapshot: replace non-character basic_string[_view]<T>
In newer versions of libc++, std::char_traits<T> is no longer defined
for non-character types, and a result, std::basic_string<T> and
std::basic_string_view<T> are also no longer defined for non-character
types. See
https://discourse.llvm.org/t/deprecating-std-string-t-for-non-character-t/66779.

Replace them with std::vector<T> and std::span<const T>.

Bug: 175635923
Test: m MODULES-IN-system-core-fs_mgr
Test: /data/nativetest64/cow_api_test/cow_api_test
Change-Id: Ife2e87833ced43ff24e5765998cb6993e4f9b4c0
2024-02-08 23:20:10 -08:00
Treehugger Robot
6f549f998f Merge "Add test mapping" into main am: ff239bb0fc
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2955182

Change-Id: I3583320efd2158358ccfbecbc293de6a13b27870
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-08 19:06:09 +00:00
Treehugger Robot
ff239bb0fc Merge "Add test mapping" into main 2024-02-08 18:30:25 +00:00