Commit graph

75326 commits

Author SHA1 Message Date
Daniel Angell
f3e2a9d5c4 Merge "Increase num_retries to reduce likelihood of test flake" 2022-06-06 23:31:35 +00:00
Daniel Angell
6c2d812508 Increase num_retries to reduce likelihood of test flake
Flakiness was observed in this build:
https://android-build.googleplex.com/builds/pending/P35853772/qemu_generic_arm32_gicv3_test_debug/latest/view/logs/build_error.log

But most other builds do not have this issue.

Bug: 234788755
Change-Id: I4cf7d05a56eb678164bf0006bfb190442d6d4e03
2022-06-06 21:25:17 +00:00
David Drysdale
ad226c11a9 Merge "Make crate vendor_available" 2022-06-06 06:49:13 +00:00
Treehugger Robot
6cd136fc61 Merge "libprocessgroup: Handle temporarily non-empty group removal failure" 2022-06-03 23:11:06 +00:00
Suren Baghdasaryan
fd933786d8 libprocessgroup: Handle temporarily non-empty group removal failure
Cgroup removal fails with EBUSY if there are active processes or threads
still alive in the cgroup. Occasionally a thread or a process might be
stuck in an interruptible sleep and take some time during exit. In such
cases attempts to remove the cgroup it belongs to will fail. This
results in occasional leftover cgroups. These empty unused cgroups
consume memory.
Ensure RemoveProcessGroup always retries and increase the retries to
keep trying for 2 secs before giving up. In majority of cases only a few
retries are needed but in rare cases a thread can be blocked for longer
time, therefore the number of retries is set large enough to cover them.

Bug: 233319780
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I2e4bb1f7b7e19c904c85faea7bbabbfdef9c8125
2022-06-03 21:15:14 +00:00
Treehugger Robot
ac9b59ed5a Merge "Added libinit_headers to Android.bp" 2022-06-03 08:57:08 +00:00
David Anderson
a090418340 Merge "fastbootd: Add better logging for flashing failures." 2022-06-03 05:20:12 +00:00
Akilesh Kailash
cb3ef68f22 Merge "init: Set oom_score_adj to snapuserd process" 2022-06-02 21:16:20 +00:00
Akilesh Kailash
4ffe8a3109 init: Set oom_score_adj to snapuserd process
When a process is started as a native service,
oom_score_adj is set to -1000 so that processes
are unkillable by lmkd.

During boot, snapuserd process is not started as a service;
hence, we need to set the oom_score_adj explicitly else in
the event of low memory situation, lmkd can kill the
process thereby device can never boot.

Bug: 234691483
Test: th and OTA on Pixel
Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: Ic2c85aa470522b4bc847a16b4f5cebfc528ed3cf
2022-06-02 20:49:03 +00:00
David Anderson
bed6eea329 Merge "libsparse: Don't spam errors in sparse_file_import_auto." 2022-06-02 17:57:54 +00:00
David Anderson
954ff922ea fastbootd: Add better logging for flashing failures.
Bug: 233980876
Test: builds, fastboot flashall
Change-Id: Icc81ac4d9a4ca76f7eb757df5524d95f488fcd8c
2022-06-01 22:46:35 -07:00
David Anderson
a7fd7b1689 libsparse: Don't spam errors in sparse_file_import_auto.
This function is intended for use on sparse or non-sparse files. But
when used on non-sparse files, it unintentionally reports errors when
trying to detect if the file is sparse or not.

Since the behavior is the same whether or not the detection fails, this
patch disables verbose errors during the import. Verbose errors are
turned on if a resparse is needed.

Bug: 210846593
Test: fastboot flashall
Change-Id: I8404ca7a67adc7fba8a3ac7b4ffa18abfbcafa9d
2022-06-01 18:36:04 -07:00
Christopher Ferris
d17cefe7e4 Merge "Fix scudo fault address processing." 2022-06-01 20:20:09 +00:00
Thiébaud Weksteen
715ecbfb23 Merge "Add documentation on mkdir about seclabel" 2022-05-31 23:27:22 +00:00
Christopher Ferris
9d11a1d5bd Merge "Fix fallback paths for dumping threads." 2022-05-31 23:16:58 +00:00
Treehugger Robot
762543a34f Merge "[trusty] Bump number of ACVP arguments to match boringssl" 2022-05-31 16:53:06 +00:00
Shaju Mathew
8b6dcf4432 Merge "Configuration for preprocessor symbol ALLOW_DISABLE_VERITY (followup for: f61f41494e)." 2022-05-31 16:44:55 +00:00
Yi Kong
127616da9c Merge "Fix incorrect use of TEMP_FAILURE_RETRY" 2022-05-31 05:06:27 +00:00
Thiébaud Weksteen
cc2fb50f52 Add documentation on mkdir about seclabel
Test: n/a
Change-Id: Iab672b4755a259caacf495a6692afcb268b4205f
2022-05-31 14:47:13 +10:00
Yi Kong
ecd6ad0df7 Fix incorrect use of TEMP_FAILURE_RETRY
The return code check should be after TEMP_FAILURE_RETRY.

Discovered by the tautological-constant-compare warning.

Test: presubmit
Bug: 72331526
Change-Id: I531a9e0498ce9448facc692ddedc14434e7ab507
2022-05-30 09:18:31 +00:00
Christopher Ferris
7c2e7e31f6 Fix fallback paths for dumping threads.
In the fallback path, if the non-main thread is the target
to be dumped, then no other threads are dumped when creating
a tombstone. Fix this and add unit tests to verify that
this all threads, including the main thread are dumped.

Bug: 234058038

Test: All unit tests pass.
Test: debuggerd -b media.swcodec process
Test: debuggerd media.swcodec process
Change-Id: Ibb75264f7b3847acdbab939a66902d986c0d0e5c
2022-05-27 13:05:56 -07:00
Shaju Mathew
db48ce2ba9 Configuration for preprocessor symbol ALLOW_DISABLE_VERITY (followup for:
f61f41494e).

disable-verity fails with incorrect error message in userdebug.

Bug: b/232742280

Test: Manual.

Signed-off-by: Shaju Mathew <shaju@google.com>
Change-Id: Icc00433710452e5dca8f5e8e997df2c72e23e4b4
2022-05-27 02:41:50 -07:00
Treehugger Robot
ab2d6cdc8f Merge "vts_fs_test: Require EROFS sysfs nodes." 2022-05-27 06:56:33 +00:00
David Anderson
1652f0f39a vts_fs_test: Require EROFS sysfs nodes.
These were backported to android13-5.10 and should be present in
T-launch kernels.

Bug: 233926292
Test: vts_fs_test
Change-Id: Ifb5ff6a200b081fe8696d5803d4a128740eb8e21
2022-05-26 21:48:59 -07:00
Treehugger Robot
69cde888c1 Merge "charger: Fix charger pixel format useless" 2022-05-27 02:54:32 +00:00
liyong
381b89c8db Fix scudo fault address processing.
The code doesn't properly check if data is not read properly, so
make it fail if reads fail. Also, change the algorithm so that
first try and read the faulting page then 16 pages before and 16
pages after. Rather than trying to read every one of these pages,
stop as soon as one is unreadable. This means that the total memory
passed to the scudo error function is all valid data, rather than
potentially being some uninitialized memory.

Added new unit tests to cover scudo address processing.

Bug: 233720136

Test: All unit tests pass.
Test: atest CtsIncidentHostTestCases
Change-Id: I18a97bdee9a0c44075c1c31ccd1b546d10895be9
2022-05-26 18:50:52 -07:00
zengshuchuan
f694cf35ff charger: Fix charger pixel format useless
Create HealthdDraw in charger init beforce CreateDisplaySurface,
make sure minui gr_init pixel_format beforce gr_pixel_format.

Bug: 232441376
Test: 1. set ro.minui.pixel_format=ARGB_8888
2. Set a colorful battery_scale.png
3. Power off and enter charger mode.

Change-Id: If16f15d0a8bc3b7cb9dab7392f3753ec0a1525b8
2022-05-26 09:43:51 +08:00
David Anderson
1acfc08e30 Merge "libsnapshot: Add more feature flags to SnapshotMergeReport." 2022-05-26 00:23:13 +00:00
David Anderson
3c8a95e3be Merge "fastboot: Print OemCmdHandler return message on success" 2022-05-26 00:20:46 +00:00
Treehugger Robot
b2e68186e5 Merge "Relax filesystem requirements in vts_fs_test." 2022-05-25 22:40:59 +00:00
Christopher Ferris
7e1042d046 Merge "Fix check for thread unwind." 2022-05-25 22:37:43 +00:00
David Anderson
5bbdc23837 Relax filesystem requirements in vts_fs_test.
Bug: 233926292
Test: vts_fs_test
Change-Id: I9665acebd6ebfde14e0cd76e8044e7ced9ffbeb3
2022-05-25 13:44:33 -07:00
David Anderson
93faa18bce libsnapshot: Add more feature flags to SnapshotMergeReport.
This patch also begins reducing the complexity of SnapshotMergeStats by
eliminating the indirection layer between the protobuf and
SnapshotManager.

Bug: 222117189
Test: statsd_testdrive
Change-Id: I15d740121c381da7d8311f0cbbd0da82db877555
2022-05-25 13:40:31 -07:00
Christopher Ferris
303c6bef77 Fix check for thread unwind.
If a process requires executing fallback unwinder and the thread
crashing is not the main thread, the wrong unwinder is used.
Fix this case, and add a new unit test that causes an abort in
the non main thread.

Bug: 233721755

Test: New unit test passes with fix and fails without.
Test: Ran debuggerd on swcodec process and it still dumps all threads.
Change-Id: I70fffc5d680256ce867e7a1d427593b584259160
Merged-In: I70fffc5d680256ce867e7a1d427593b584259160
(cherry picked from commit 2d5d46ca85)
2022-05-25 13:07:07 -07:00
Stephen Crane
08d8557718 [trusty] Bump number of ACVP arguments to match boringssl
Boringssl added a new argument to the ACVP modulewrapper, so we need to
sync this change to the Trusty modulewrapper.

Test: m trusty_acvp_modulewrapper
Bug: 233873228
Change-Id: Ia79705d9fe32a07afc09cf8e0231db300073b504
2022-05-25 12:18:47 -07:00
Kelvin Zhang
321d47639e Merge changes from topic "snapuserd_ramdisk"
* changes:
  Prefer generic ramdisk copy of snapuserd
  Install snapuserd.ramdisk with a separate path
2022-05-25 15:39:17 +00:00
David Drysdale
9ee82396c4 Make crate vendor_available
Bug: 195310053
Test: build, TreeHugger
Change-Id: I466a7cf609a3c945a56d3f3fac99cbc04cb4dc9b
2022-05-25 13:58:11 +01:00
Rubin Xu
b17a5e4cc4 Merge "Add AID_SECURITY_LOG_WRITER" 2022-05-25 11:43:49 +00:00
Treehugger Robot
216b8b67fb Merge "Suppress most load_property_from_file logs" 2022-05-25 03:56:24 +00:00
Inseob Kim
946c972162 Suppress most load_property_from_file logs
Some partitions may not have build.prop files (and it's totally fine).
Rather than logging such failures as WARNING, load_property_from_file
now returns a Result<void> object so callers can manually log for
themselves.

Bug: 228389036
Test: boot and logcat
Change-Id: Ia4ad7eef34d572182a3f6e86547664ae31dfd29f
2022-05-25 09:47:08 +09:00
Rubin Xu
7e14d138ae Add AID_SECURITY_LOG_WRITER
A suppplementary group to mark which app can write to the security log
buffer. Granted via android.permission.WRITE_SECURITY_LOG and checked by
logd.

Bug: 232283779
Test: manual
Change-Id: I3ad66031ab1c9eef26db0f3e8968659dfa2855cb
2022-05-24 23:34:33 +01:00
David Anderson
7397fa566f Merge "Rectify Boottime property" 2022-05-24 22:19:29 +00:00
Treehugger Robot
a09cace1d1 Merge "Updating ATRACE_ASYNC_FOR_TRACK_END to not require a name argument" 2022-05-24 19:27:55 +00:00
Victor Hsieh
e325682764 Merge "Rename VMCompilationPerformance to SCHED_SP_COMPUTE" 2022-05-24 15:05:01 +00:00
Treehugger Robot
8b3dff3e82 Merge "init: Disable 'on' for non-Vendor APEXes" 2022-05-24 13:35:04 +00:00
Victor Hsieh
29b26409e4 Rename VMCompilationPerformance to SCHED_SP_COMPUTE
There isn't any reason to keep the VMCompilationPerformance special, so
rename to a more generic, reusable name.

One day we may support whatever-purpose VMs using other generic
profiles.

Bug: 231437770
Test: TH
Change-Id: Id7e78ba4d6ea0dc415ed0bc1f4bdf051f7e7fe05
2022-05-23 11:06:09 -07:00
Jooyung Han
99fa346c35 init: Disable 'on' for non-Vendor APEXes
Mainline modules are not supposed to rely on 'on' action triggers in
their init scripts because events/properties are not guranteed to be
stable across many devices.

To reduce the potential risk of enabling 'on' for APEXes, for now, we
enable it for only Vendor APEXes.

When an init script in a non-Vendor APEX contains 'on' section, init
emits an error on parsing the script and skip the section.

For example, when init.rc in the ADBD APEX has 'on' section,
the following error is emitted on parsing the script.

  init: Parsing file /apex/com.android.adbd/etc/init.rc...
  init: /apex/com.android.adbd/etc/init.rc: 8: ParseSection() failed:
    'on' is supported for only Vendor APEXes.

Bug: 232543017
Test: see above
Change-Id: I6509c8d2c6b632369d215128f740f9ed78858605
2022-05-20 09:31:08 +00:00
Akilesh Kailash
1a3572b0b3 Merge "libsnapshot: Initialize merge_op_start_ to zero." 2022-05-20 05:08:03 +00:00
Akilesh Kailash
fc9a48f5cb libsnapshot: Initialize merge_op_start_ to zero.
merge_op_start_ is used to set the iterator for merge operations.
Uninitialized value can potentially lead to setting up
of bad iterator.

Bug: 233246309
Test: Full OTA
Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: I3cc48a66b532cfe8b2d87c8724d77ab3169a2ddb
2022-05-19 20:06:07 +00:00
David Drysdale
5b8dfacf5b Merge "KeyMint HAL: pass auth token on updateAad" 2022-05-19 05:50:51 +00:00