Commit graph

34349 commits

Author SHA1 Message Date
Treehugger Robot
433293dbc9 Merge "Clean up __stack_chk_fail_local slightly." 2021-03-17 13:25:55 +00:00
Elliott Hughes
92da28625f Clean up __stack_chk_fail_local slightly.
Motivated by the fact that bazel doesn't like #include "../", but this
feels like it could use a deeper clean.

In fact, even after this change, I think we should remove this entirely,
since as far as I can tell Clang never implemented this GCC workaround
for 32-bit x86's awful PIC code.

Test: treehugger
Change-Id: I72715ee46f873f42d5707712aebe246ef78fcde1
2021-03-16 16:41:53 -07:00
Liz Kammer
eb33b5b7a8 Merge "Remove bazel_module.label from bionic genrules" 2021-03-16 21:40:04 +00:00
Treehugger Robot
35428fe99d Merge "Depend on libasync_safe module instead of breaking package boundary." 2021-03-16 17:01:07 +00:00
Liz Kammer
6a4177c42d Merge "Add missing includes for crtend modules" 2021-03-16 12:43:35 +00:00
Rupert Shuttleworth
78f48a511f Depend on libasync_safe module instead of breaking package boundary.
This makes Bazel conversion easier (because in Bazel package boundaries really matter).

Test: m libc still builds, and m also builds.
Change-Id: I5cfc9d83dffd3110ffad9ce03198e6141c8c5b33
2021-03-16 06:39:19 +00:00
Josh Gao
6ad715689d Merge "fdtrack: emit the most common stack in the abort message." 2021-03-16 01:35:43 +00:00
Josh Gao
1cb3681335 fdtrack: emit the most common stack in the abort message.
Bug: http://b/181875562
Test: manual
Change-Id: I2826b148d55788e932fa04dcef33c78fad8be227
2021-03-15 15:55:06 -07:00
Liz Kammer
aab2ad700b Add missing includes for crtend modules
Test: convert bp2build_available targets to BUILD and bazel build
      --platforms=//build/bazel/platforms:generic_arm64 //bionic/...
Change-Id: I1cbdbf1d65d7dbe95665aaac08004c80f82433e9
2021-03-15 18:03:24 -04:00
Mitch Phillips
87f4a2e50b Merge "Mark MTE elf notes as sdk_version to allow SDK linkage." 2021-03-15 21:33:07 +00:00
Liz Kammer
821e375664 Merge "Merge crt cc_objects" 2021-03-15 19:02:32 +00:00
Treehugger Robot
051b454ff1 Merge "Add userfaultfd syscall in SECCOMP allowlist" 2021-03-11 19:54:47 +00:00
Lokesh Gidra
7839c173f1 Add userfaultfd syscall in SECCOMP allowlist
Enable userfaultfd syscall to be used by ART-GC.

Bug: 160737021
Test: manually tested by invoking userfaultfd syscall in ART
Change-Id: I9f98402a96bb8363a1e5fa49dbadbb37dc70d561
2021-03-11 19:30:08 +00:00
Treehugger Robot
4b6a29dbe9 Merge "Improve fchmod() coverage." 2021-03-11 19:19:17 +00:00
Peter Collingbourne
03e961e392 Merge "Teach debuggerd to pass the secondary ring buffer to __scudo_get_error_info()." 2021-03-11 01:15:49 +00:00
Treehugger Robot
6d8515ffd0 Merge "Add debuggerd_test to bionic test mapping." 2021-03-11 00:18:04 +00:00
Mitch Phillips
a78ace95f4 Add debuggerd_test to bionic test mapping.
Lots of plumbing between bionic and debuggerd, make sure it works.

Bug: N/A
Change-Id: Ida4f3114f76ca88f3768fffa9fdc7deee74afda8
Test: N/A
2021-03-10 21:01:55 +00:00
Liz Kammer
e718dd720d Merge crt cc_objects
Currently there is a pattern of `crtbegin_${type}1` and `crtbegin_${type}` modules, where the former
has sources and the latter depends on the former. The two modules for a type share many properties,
rather than duplicating these, we merge modules, such that each type only has a `crtbegin_${type}`
module.

Test: Treehugger
Change-Id: I7803ea0e97d660f620c334b6bfdfac22cb6e36d7
2021-03-10 19:32:17 +00:00
Elliott Hughes
ac3fcc6b8c Merge "Improve system() coverage." 2021-03-09 16:15:37 +00:00
Nicolas Geoffray
ea8b224d7f Merge "Add min_sdk_version for ART module." 2021-03-09 08:47:47 +00:00
Peter Collingbourne
6ba27e04df Merge "Add some slack at the end of large allocations when target SDK level < S." 2021-03-09 01:15:54 +00:00
Elliott Hughes
9f46c9e291 Merge "Improve <sys/xattr.h> coverage." 2021-03-09 01:01:25 +00:00
Elliott Hughes
db6223f46e Improve fchmod() coverage.
Test: treehugger
Change-Id: I8ebccce7ab3c0a77cd84d0830f75e9d68c64bd52
2021-03-08 14:10:46 -08:00
Elliott Hughes
b82f5cfeb2 Improve <sys/xattr.h> coverage.
Also fix a comment copy & paste mistake and some formatting.

Test: treehugger
Change-Id: I0af3ab2eb4f180f86b0ab7d2af260f0f30692fdd
2021-03-08 14:09:43 -08:00
Elliott Hughes
bbbe27ff6e Improve system() coverage.
There's a weird POSIX special case that we implement but don't test.
Found from looking through the coverage data.

Test: treehugger
Change-Id: I74f5f57c4d8062034a3f6e986f9e57091bfc7f7c
2021-03-08 14:07:01 -08:00
Nicolas Geoffray
4647d4839f Add min_sdk_version for ART module.
Bug: 180399951
Test: m
Change-Id: I54eb06ae4a695ae184de4fb72fc0092910836652
2021-03-08 17:29:41 +00:00
Peter Collingbourne
2659d7b6c2 Add some slack at the end of large allocations when target SDK level < S.
This works around buggy applications that read a few bytes past the
end of their allocation, which would otherwise cause a segfault with
the concurrent Scudo change that aligns large allocations to the right.

Because the implementation of
android_set_application_target_sdk_version() lives in the linker,
we need to introduce a hook so that libc is notified when the target
SDK version changes.

Bug: 181344545
Change-Id: Id4be6645b94fad3f64ae48afd16c0154f1de448f
2021-03-05 14:29:17 -08:00
Treehugger Robot
1ef8d418be Merge "Remove unused (and empty) file." 2021-03-04 01:07:24 +00:00
Mitch Phillips
22c90755ed Mark MTE elf notes as sdk_version to allow SDK linkage.
Binaries defined in Makefiles that use the SDK need a variant to link
to. Generate a SDK variant of the ELF note as well. This is necessary to
allow makefile-generated binaries and CTS tests to use heap MTE.

Bug: 156029370
Bug: 181133973

Test: atest CtsBionicTestCases on QEMU+MTE, observe previously-failing
      tests will now succeed.
Change-Id: I0a8243b0920769a196e7596904259e30c4a93105
2021-03-03 15:39:57 -08:00
Elliott Hughes
f443817ab6 Remove unused (and empty) file.
Spotted while looking at our shiny new coverage numbers. Though how the
change that removed the code from this file without removing the file
made it through code review... Clearly I wasn't paying attention that
day!

Test: treehugger
Change-Id: Id61bb48bae60660d2e5ba9b26f00a68e51157c6d
2021-03-03 14:31:35 -08:00
Liz Kammer
8d7082ebda Remove bazel_module.label from bionic genrules
Mixed builds can now use the label from an automatically converted
target.

Test: build/bazel/scripts/milestone-2/demo.sh full
Test: build/bazel/scripts/milestone-2/demo.sh generate
      build/bazel/scripts/milestone-2/demo.sh sync
      mixed build of libc
      build/bazel/scripts/milestone-2/demo.sh cleanup
Change-Id: I1499b75f1348bf342b4cd134606786150b2f8b26
2021-03-03 15:25:18 +00:00
Treehugger Robot
d407d2f329 Merge "Ignore LD_LIBRARY_PATH when determining file type in ldd." am: 2d24fe21ba
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1613125

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I869f3a92d2200960339361c80f4cb8c381fb738b
2021-03-02 19:03:46 +00:00
Treehugger Robot
2d24fe21ba Merge "Ignore LD_LIBRARY_PATH when determining file type in ldd." 2021-03-02 18:13:11 +00:00
Pete Bentley
557308c732 Ignore LD_LIBRARY_PATH when determining file type in ldd.
Otherwise if a 32bit copy of a library used by Toybox
exists on LD_LIBRARY_PATH then file(1) will fail.

Bug: 181666541
Test: Manually copied to device and verified correct behaviour
Change-Id: I7d729927b1b433ec953c266920489613fc096e03
2021-03-02 16:56:39 +00:00
Josh Gao
2f12f61aaf Merge "Add wrappers for pidfd_{open,getfd,send_signal}." am: 974721431d
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1601173

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If04851be32a15fc086ced21e5601a88db135c54d
2021-03-01 21:48:02 +00:00
Josh Gao
974721431d Merge "Add wrappers for pidfd_{open,getfd,send_signal}." 2021-03-01 21:06:17 +00:00
Bram Bonné
a9fb3cc094 Merge "Add additional app to netlink appcompat allowlist." am: dddf75f990
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1609253

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8f0f1e85b0118b1130825fa9b0b8325f4e64a665
2021-02-26 17:15:16 +00:00
Bram Bonné
dddf75f990 Merge "Add additional app to netlink appcompat allowlist." 2021-02-26 16:42:37 +00:00
Bram Bonné
82c3d89758 Add additional app to netlink appcompat allowlist.
Bug: 180726036
Test: Confirm app no longer errors at start
Change-Id: I9f1c99a13bbfb8dbdf977d52c67a64d400fd9821
2021-02-26 13:26:21 +00:00
Josh Gao
3de19151e5 Add wrappers for pidfd_{open,getfd,send_signal}.
Bug: http://b/172518739
Test: `/data/nativetest64/bionic-unit-tests/bionic-unit-tests --gtest_filter="*pidfd*"` on blueline
Change-Id: Ibae32bbedbcf26535a80a5cbfb55ce180906b610
2021-02-25 13:55:12 -08:00
Christopher Parsons
bc8f2f93b4 Merge "Make libc genrules and its tool dep bp2build_available" am: 47b5c5d752
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1603633

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic55421dc38b6b89910210838fe715a8f6cb8e228
2021-02-25 16:51:19 +00:00
Christopher Parsons
47b5c5d752 Merge "Make libc genrules and its tool dep bp2build_available" 2021-02-25 16:23:46 +00:00
Jingwen Chen
6eb9163fec Merge "bp2build: convert more cc_objects" am: 466b424deb
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1601253

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iebfecffe06baa15f0ed1e49577bc23078a1adfb7
2021-02-25 14:46:51 +00:00
Jingwen Chen
466b424deb Merge "bp2build: convert more cc_objects" 2021-02-25 14:09:08 +00:00
Chris Parsons
98b92e00c8 Make libc genrules and its tool dep bp2build_available
Test: lunch aosp_flame && USE_BAZEL_ANALYSIS=1 m libc
Test: lunch aosp_flame && USE_BAZEL_ANALYSIS=1 m crtbegin_so1
Change-Id: I12380ef9294f8b7c3b00ea700d804c1abde7ad04
2021-02-24 14:32:16 -05:00
Jingwen Chen
7e13cf2160 bp2build: convert more cc_objects
This is the last of remaining cc_objects in the libc package.

Test: go tests.

Test: build/bazel/scripts/milestone-2/demo.sh
Change-Id: Ib9c01be0faae10707305b81e72d3fac22bf96356
2021-02-24 01:21:01 -05:00
Treehugger Robot
79b45db894 Merge "Make __libc_init_scudo() weak for native bridge." am: 6161970fa2
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1603833

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I798977625e5f959e5b15dc535a311ffc4b752607
2021-02-24 01:14:36 +00:00
Treehugger Robot
6161970fa2 Merge "Make __libc_init_scudo() weak for native bridge." 2021-02-24 00:26:50 +00:00
Peter Collingbourne
bf917866f5 Make __libc_init_scudo() weak for native bridge.
__libc_init_scudo() calls directly into the allocator, bypassing the
normal guest to host transition in the native bridge. Therefore we
need to let the native bridge override it with a no-op.

Bug: 159352723
Change-Id: I642c7a058e483cc09335290f66b9c053150fca06
2021-02-23 13:18:03 -08:00
Treehugger Robot
f252ac79d4 Merge "bp2build: mark filegroups as bp2build_available." am: 14851abce9
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1598174

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ice5f0fd7ec0c7a96909db37008188553ec6b8ebd
2021-02-22 19:01:59 +00:00