Commit graph

36061 commits

Author SHA1 Message Date
Dan Albert
3e25f8272f Merge "Disable strict abigail checking pending asm fix." 2022-04-20 19:19:07 +00:00
Florian Mayer
486fabd152 Merge "Add debuggerd_test to hwasan-presubmit." 2022-04-19 00:07:43 +00:00
Florian Mayer
ab36432f7b Add debuggerd_test to hwasan-presubmit.
This passes now.

Bug: 229317612
Change-Id: Iaf26b5fafd33b19dd2e4dbb073bc3f76c7fffd66
2022-04-18 20:39:48 +00:00
Florian Mayer
98619ee611 Merge changes from topic "debuggerdhwasan"
* changes:
  Skip setjmp.bug_152210274 on HWASan.
  Use SKIP_WITH_HWASAN macro from libbase.
2022-04-16 06:03:38 +00:00
Florian Mayer
4817ca64bb Skip setjmp.bug_152210274 on HWASan.
Bug: 227390656
Change-Id: Ic6dc89d844bab4aba93132b3af7942961d3af644
2022-04-15 23:15:26 +00:00
Florian Mayer
750dcd326e Use SKIP_WITH_HWASAN macro from libbase.
Change-Id: I83681d2191bf4184e52d84d1107d61065927bb24
2022-04-15 16:14:56 -07:00
Florian Mayer
db0648ae1d Merge "Add bionic tests that pass to hwasan-presubmit." 2022-04-15 17:14:19 +00:00
Florian Mayer
cb6f86a275 Add bionic tests that pass to hwasan-presubmit.
Currently failing:
* CtsTaggingHostTestCases
* debuggerd_test
* memunreachable_unit_test

Bug: 229317612
Change-Id: I5be1e90a23951e0265e289bfd2dfe11192b49dc3
2022-04-15 04:02:55 +00:00
Florian Mayer
4fa856486b Merge "Skip verify_leak_allocation_limit under HWASan." 2022-04-14 18:17:14 +00:00
Florian Mayer
dca7229b06 Skip verify_leak_allocation_limit under HWASan.
Bug: 227801493
Change-Id: I85630fe11b42d8d45ce63f279bb0fbcc635f8afb
2022-04-14 16:21:12 +00:00
Christopher Ferris
8cfc318a87 Merge "In android_set_abort_message, check for nullptr." 2022-04-12 23:33:59 +00:00
Christopher Ferris
bbf9cd86ca In android_set_abort_message, check for nullptr.
If a process is failing due to out of memory, some code calls
android_set_abort_message with a nullptr. Specifically, the libc++
library std::terminate can call do this. In this case, put a
null in the abort message.

Test: Call with nullptr and verify the code does not crash.
Test: Modified crasher to set an abort message and set a null abort
Test: message. Ran both, verified the abort message displays in
Test: first case, and doesn't display in the second case.
Change-Id: Ia9250f47e4537853ce93bbb20b35915a78caa502
2022-04-12 13:46:48 -07:00
Treehugger Robot
a3accda0c7 Merge "[GWP-ASan] Fix bugs in realloc()." 2022-04-12 20:17:14 +00:00
Elliott Hughes
c635150eaf Merge "Polish the syscall docs a bit more." 2022-04-12 15:03:21 +00:00
Mitch Phillips
c70311c296 [GWP-ASan] Fix bugs in realloc().
Two edge cases were found in aosp/2038947:
 1. realloc(p, 0) == free() and returns nullptr. Previously, we just
    returned a new pointer.
 2. If the malloc() part of realloc() fails (e.g. when the size of the
    allocation is 1 << 56), then the old memory shouldn't be destroyed.

Bug: N/A
Test: Covered using atest bionic-unit-tests using aosp/2038947.
Change-Id: Ibafc752787129922a1e0323ffa14221d6a14f108
2022-04-11 13:36:39 -07:00
Elliott Hughes
4ece2d6183 Polish the syscall docs a bit more.
Test: N/A
Change-Id: Ic408e82721bd0446ea99884dc149af4a8ceaa492
2022-04-11 13:36:18 -07:00
Treehugger Robot
f252b7c465 Merge "Make libasync_safe available in com.android.virt" 2022-04-07 13:25:45 +00:00
Florian Mayer
ad3710992d Merge "Skip mallinfo / malloc_info tests on HWASan." 2022-04-07 04:08:26 +00:00
Florian Mayer
0aa87b82e5 Skip mallinfo / malloc_info tests on HWASan.
Those aren't implemented.

Test: passes on forrest.
Change-Id: I1a00f5e8ff1aba8f0e25ce589281ed3bfa9d0a5c
2022-04-06 22:03:19 +00:00
Shikha Panwar
307254c616 Make libasync_safe available in com.android.virt
This is required because virtualization_service use
libtombstoned_client_rust which has transitive dependency on
libasync_safe

Test: atest MicrodroidHostTestCases
Bug: 202153827
Change-Id: I9e670d02995f9ed9e67791aaecb300b6bfdbdb03
2022-04-06 21:00:13 +00:00
Elliott Hughes
4505cd8ced Merge "Remove dimitry and hhb from OWNERS." 2022-04-06 17:19:51 +00:00
Florian Mayer
2f23156692 Merge "Skip other_malloc_functions on HWASan." 2022-04-06 16:57:50 +00:00
dimitry
06335c4ec5 Remove dimitry and hhb from OWNERS.
Removing from owners to avoid confusion for users who
want to find approvers for their CLs.

Bug: n/a
Test: n/a
Change-Id: I56c02b95389c9cb559ca8791d36f9e625db57f69
2022-04-06 14:47:35 +00:00
Florian Mayer
24f276211d Skip other_malloc_functions on HWASan.
Bug: 227801493
Change-Id: I98b0c2d1a9dc450b97d2de5c02c68bcfd38088bf
2022-04-06 00:55:53 +00:00
Jiyong Park
6c378ec6b5 Merge "Deprecate "/apex/<name>/ld.config.txt" 2022-04-05 23:46:09 +00:00
Jiyong Park
2bac1f81c1 Deprecate "/apex/<name>/ld.config.txt
The file is a manually created linker config file for the binaries in
the APEX. This is discouraged since such a manually created linker
config is error-prone and hard to maintain. Since the per-APEX
linker config file is automatically created by the linkerconfig tool as
/linkerconfig/<name>/ld.config.txt, we can safely deprecated the
fallback path.

There currently are two APEXes using these hand-crafted configs. They
can (and should) keep the configs for backwards compatibility; in case
when they run on older devices where the auto-generated configs are not
available. But for newer platforms, the files are simply ignored and no
new APEX should be using that.

Bug: 218933083
Test: m
Change-Id: I84bd8850b626a8506d53af7ebb86b158f6e6414a
2022-04-05 14:07:48 +09:00
Elliott Hughes
8b8cb2d408 Merge "Improve the documentation about adding trivial syscall wrappers." 2022-04-04 17:51:48 +00:00
Elliott Hughes
a96306c60d Improve the documentation about adding trivial syscall wrappers.
Test: treehugger
Change-Id: I49040d0284e1d1254b8571a699a44b43ea8d911b
2022-04-01 15:56:31 -07:00
Elliott Hughes
97ef479dfe Merge "Fix unistd.exec_argv0_null for new kernels." 2022-04-01 21:59:56 +00:00
Elliott Hughes
bb1cc5a82c Fix unistd.exec_argv0_null for new kernels.
There are other options here (see the code comment for details), but
this is the least effort/least disruptive for now.

Bug: http://b/227498625
Test: treehugger
Change-Id: I33be6fbfc022238de2f1846a69af1e712a9d6391
2022-04-01 11:12:36 -07:00
Treehugger Robot
8581029d08 Merge "Extempt calculate_gnu_hash_neon from hwasan." 2022-04-01 00:56:45 +00:00
Florian Mayer
6e8f3a76ee Extempt calculate_gnu_hash_neon from hwasan.
Bug: 227630703
Change-Id: I525c99796c87252050b46faffb3058f7e8b5866c
2022-03-31 22:46:54 +00:00
Elliott Hughes
6bdefa6ca2 Merge "C11 removed gets()." 2022-03-31 16:30:43 +00:00
Elliott Hughes
1063039d19 C11 removed gets().
Test: treehugger
Change-Id: I793e29cbd52dd882b72eb58055cbc0dd05eb0f59
2022-03-30 17:25:10 -07:00
Dan Albert
2d8d2a0064 Disable strict abigail checking pending asm fix.
Test: m ndk
Bug: http://b/190554910
Change-Id: Ideb0c6d8ac5428c2ebe211393929f1d5c891dfba
2022-03-29 15:59:00 -07:00
Ryan Prichard
df41909cf6 Merge "Always process TLS relocs using general code path" 2022-03-28 19:19:12 +00:00
Ryan Prichard
8ea6af53e2 Always process TLS relocs using general code path
This is important for enabling the error about unsupported TLS
relocations to local symbols. The fast path tends to skip this error,
because it fails during lookup_symbol(). Add a test for this error.

I didn't see a performance regression in the linker_relocation
benchmark.

Bug: http://b/226978634
Test: m bionic-unit-tests
Change-Id: Ibef9bde2973cf8c2d420ecc9e8fe2c69a5097ce2
2022-03-25 15:51:11 -07:00
Mitch Phillips
98b49a060f Merge "Add GWP-ASan CTS to bionic TEST_MAPPING" 2022-03-25 17:57:07 +00:00
Mitch Phillips
40d9622c12 Add GWP-ASan CTS to bionic TEST_MAPPING
Bug: N/A
Change-Id: Ia9aac40965ba77823cd3824b0508d4e48c07f43f
Test: presubmit should pick up the new test in TEST_MAPPING.
2022-03-25 00:08:32 +00:00
Treehugger Robot
2b64e4000d Merge "Avoid usage of LONG_BIT in signal headers." 2022-03-24 21:10:41 +00:00
Peter Collingbourne
08b968b282 Avoid usage of LONG_BIT in signal headers.
Clang has its own limits.h which is ahead of ours on the inclusion
path. This header uses include_next to include our header, but only
in hosted mode. This means that in freestanding mode we don't get our
limits.h macro definitions, including LONG_BIT. This ends up causing
our signal.h to produce errors when included in freestanding mode on
32-bit platforms.

Fix the errors by replacing usage of LONG_BIT with (8 * sizeof(long))
in the signal headers.

Change-Id: I18ec7b6876d5f862beae09f0c011128eef97c869
2022-03-24 11:11:11 -07:00
Christopher Ferris
9263a823ea Merge "Update to v5.17 kernel headers." 2022-03-23 18:30:54 +00:00
Christopher Ferris
1ed5534657 Update to v5.17 kernel headers.
Kernel headers coming from:

Git: https://android.googlesource.com/kernel/common/
Branch: android-mainline
Tag: android-mainline-5.17

Test: Boots on a flame and all bionic unit tests pass.
Change-Id: I7057d7308241f3acfa600597d287994c39ababbc
2022-03-22 16:48:40 -07:00
Treehugger Robot
8397fadb2e Merge "Add DF_1_ORIGIN to SUPPORTED_DT_FLAGS_1." 2022-03-22 20:25:30 +00:00
Peter Collingbourne
7aa3abc781 Add DF_1_ORIGIN to SUPPORTED_DT_FLAGS_1.
This flag means "$ORIGIN processing required", and since we always
do that, we can claim support for it.

Change-Id: If60ef331963f6bc1e1818d7fa2ee57c1aa8fa343
2022-03-21 19:02:26 -07:00
Treehugger Robot
8321ff1468 Merge "Suppress -Wformat warning" 2022-03-16 18:55:05 +00:00
Yi Kong
f9b1313968 Suppress -Wformat warning
This is exactly what it is testing for.

Original warning:
  bionic/tests/stdio_test.cpp:370:47: error: '%n' specifier not supported on this platform [-Werror,-Wformat]
    EXPECT_DEATH(snprintf(buf, sizeof(buf), "a %n b", &i), "%n not allowed on Android");
                                               ~^

Test: presubmit
Bug: 219872355
Change-Id: I6e378722b2d681cf64f4cf31ef000bd28203b00d
2022-03-16 08:15:15 +00:00
Colin Cross
14e01ac5e2 Merge "Tweak linux_glibc properties for musl builds in bionic" 2022-03-15 03:47:57 +00:00
Elliott Hughes
93f3017e03 Merge "Revert "Disable pointer authentication in app processes."" 2022-03-14 21:09:31 +00:00
Evgenii Stepanov
17185eda89 Merge "Fix mte tests to allow auto-upgrade." 2022-03-14 20:06:52 +00:00