Commit graph

30523 commits

Author SHA1 Message Date
Elliott Hughes
95c6cd753f Stop using the __ANDROID_API_x__ constants.
Historically we've made a few mistakes where they haven't matched the
right number. And most non-Googlers are much more familiar with the
numbers, so it seems to make sense to rely more on them. Especially in
header files, which we actually expect real people to have to read from
time to time.

Test: treehugger
Change-Id: I0d4a97454ee108de1d32f21df285315c5488d886
2019-12-20 13:26:14 -08:00
Christopher Ferris
508d270886 Merge "Run memunreachable_unit_test on bionic changes." 2019-12-20 02:25:44 +00:00
Christopher Ferris
0442b9f0c4 Run memunreachable_unit_test on bionic changes.
Bug: 137795072

Test: Ran atest.
Change-Id: I2153b3fd97f77bb06e9d66b5f5419cab0cbabcab
2019-12-19 15:58:48 -08:00
Treehugger Robot
f4e03ef45b Merge "Revert "Enable the scudo native allocator."" 2019-12-19 20:52:02 +00:00
Ytai Ben-tsvi
5105ece816 Revert "Enable the scudo native allocator."
This reverts commit 6ffbe97859.

Reason for revert: Droidcop-triggered revert due to breakage b/146543543

Change-Id: Ie9a5b2f6ca5dbc8d3c6cafe70e34838d74e45c56
Bug: 146543543
2019-12-19 19:09:59 +00:00
Christopher Ferris
414d98648a Merge "Enable the scudo native allocator." 2019-12-18 23:36:32 +00:00
Christopher Ferris
6ffbe97859 Enable the scudo native allocator.
Bug: 137795072

Test: Built both svelte and non-svelte versions. Ran enormous numbers
Test: of performance testing.
Test: Ran scudo unit tests.
Test: Ran bionic unit tests.
Change-Id: Iec6c98f2bdf6e0d5a6d18dff0c0883fac391c6d5
2019-12-18 12:27:40 -08:00
Wenhao Wang
35ee9d9a9f Merge "Add scsi directory" 2019-12-17 23:41:57 +00:00
Wenhao Wang
69537f1e2a Add scsi directory
This CL exports bionic/libc/kernel/android/scsi directory
to enable the usage of header files (e.g. sg.h) on that directory.

Test: Build AOSP 1187028
Change-Id: If580fcbc67378fab42d4f14cca1de337b603b673
2019-12-17 14:05:47 -08:00
Evgeny Eltsin
4ea64e91e8 Merge "Fix dlext.ns_anonymous test for native bridge" 2019-12-17 19:22:04 +00:00
Evgeny Eltsin
0530f5ffd7 Merge "Fix signal.sigwait64_SIGRTMIN test" 2019-12-17 18:12:21 +00:00
Christopher Ferris
e05ed218fd Merge "Add support for scudo svelte." 2019-12-17 18:05:03 +00:00
Evgeny Eltsin
ad865d7b3d Fix dlext.ns_anonymous test for native bridge
The executable flag might not be present for the executable segment
if the code is being handled by native bridge implementation. Old
heuristics for this case was to assume first segment is executable.
This doesn't stand any more. Instead, look for segment that contains
the function test is going to call.

Test: bionic-unit-tests --gtest_filter=dlext.ns_anonymous
Change-Id: I960bebba86e225d739b73f6d093e145fff17b4a8
2019-12-17 18:54:17 +01:00
Evgeny Eltsin
4d9264c593 Fix signal.sigwait64_SIGRTMIN test
'kill(pid, sig)' sends signal to arbitrary thread within a process, thus
test was occasionally sending signal to the killing thread, not to the
waiting thread. Use 'tgkill(pid, tid, sig)' instead.

Test: bionic-unit-tests --gtest_filter=signal.sigwait64_SIGRTMIN
Change-Id: I80377295e2362cb87eb4fb4de2489c51c520ea77
2019-12-17 18:03:06 +01:00
Treehugger Robot
573ddbab3f Merge "Do not DL_WARN when failed to find generated linker config" 2019-12-17 08:31:31 +00:00
Kiyoung Kim
19f95dd872 Do not DL_WARN when failed to find generated linker config
DL_WARN message when failed to find generated linker config makes some
of the ART tests fail. Lowering log level as ART test does not have
linkerconfig generated for the test.

Bug: 146386369
Test: Cuttlefish boot succeeded without any error
Test: run_build_test_target.py art-linux-bionic-x64-zipapex passed
Change-Id: I4f876c3ac5c30d32d51346d4cd16b5205da8f1bf
2019-12-17 13:59:57 +09:00
Christopher Ferris
e1fd409fcb Add support for scudo svelte.
Bug: 137795072

Test: Built with scudo and scudo svelte.
Change-Id: Ib2afd5249b897b818012ee71547af1f4ee60201b
2019-12-16 16:22:55 -08:00
Evgeny Eltsin
5761dd85b6 Merge "Prefer arch-specific linker config when available" 2019-12-16 19:59:14 +00:00
Evgeny Eltsin
ff43ec0147 Prefer arch-specific linker config when available
New linker configuration from /linkerconfig is not suitbale for emulated
architectures. But as of now, native_bridge linkers pick it up as well
and thus fail to find the libraries for emulated architectures.

This is a (temporary) fix so native_bridge linker still picks up
configuration from old location.

Bug: 138920271
Test: native_bridge linker works
Change-Id: I0abbd3e95f9e6830385b0f19db0688e6183030b9
2019-12-16 19:22:07 +01:00
Evgeny Eltsin
a8f98b4fa5 Merge "Make android_mallopt weak for native bridge" 2019-12-16 18:14:31 +00:00
Christopher Ferris
c58208bd3a Merge "Update documentation around kernel header imports." 2019-12-16 17:48:52 +00:00
Evgeny Eltsin
403b99d44a Merge "Increase sleep time in sigwait64_SIGRTMIN test" 2019-12-16 17:35:29 +00:00
Peter Collingbourne
e5dbd3f71b Merge "Update bionic to use the MTE API proposed on LKML." 2019-12-16 17:02:11 +00:00
Evgeny Eltsin
b29173cd64 Increase sleep time in sigwait64_SIGRTMIN test
With previous sleep time, if unlucky, newly started thread can send
signal before main thread starts sigwait.

Test: bionic-unit-tests --gtest_filter=signal.sigwait64_SIGRTMIN
Change-Id: I63d7825a695988e388903c7951e2435cb69773a1
2019-12-16 17:01:11 +01:00
Evgeny Eltsin
edbc9e2074 Make android_mallopt weak for native bridge
It is not intercepted by malloc hooks.

Test: bionic-unit-tests --gtest_filter=android_mallopt*
Change-Id: I3fb4101bdcdb62d82a09212fda9eafff7f43c786
2019-12-16 16:37:44 +01:00
Kiyoung Kim
838ca10715 Merge "Enable linker configuration from generator by default" 2019-12-16 01:55:44 +00:00
Treehugger Robot
0c42fa4956 Merge "Clone with --depth 1 in generate_uapi_headers.sh --download-kernel." 2019-12-14 06:00:32 +00:00
Josh Gao
afe7e53003 Clone with --depth 1 in generate_uapi_headers.sh --download-kernel.
Test: manual
Change-Id: Id60b354fb1914470315976dd103d2665a6fefab8
2019-12-13 17:24:44 -08:00
Christopher Ferris
86a8f3f32d Update documentation around kernel header imports.
Test: NA
Change-Id: I8866ef30efbc565e8996c574a9f895c574cd8e55
2019-12-13 17:20:20 -08:00
Christopher Ferris
0d61854b39 Merge "Update to android-mainline kernel headers v5.4." 2019-12-13 21:39:54 +00:00
Peter Collingbourne
e5e7395c9f Update bionic to use the MTE API proposed on LKML.
Patch set available here:
https://lore.kernel.org/linux-arm-kernel/20191211184027.20130-1-catalin.marinas@arm.com/
and in my android-experimental-mte branch.

Bug: 135772972
Change-Id: Ib46fd508330b330ef3afc713a9a4e26675ddb857
2019-12-13 12:13:29 -08:00
Kiyoung Kim
ef04c80bf6 Enable linker configuration from generator by default
Current linker configuration is only enabled from fully treblelized
devices. This change will allow linker to first check generated linker
configuration even for non-treblelized devices and recovery.

Bug: 139638519
Test: Tested from cuttlefish
Change-Id: I655b1ab807cd8db5696d07fd2bdd00ce0558901d
2019-12-13 13:59:00 +09:00
Elliott Hughes
b8c16c02e8 Merge "Make private/bionic_page.h available as platform/bionic/page.h." 2019-12-13 01:32:11 +00:00
Treehugger Robot
024f067061 Merge "Use the canonical form of the APL2 boilerplate." 2019-12-13 01:22:17 +00:00
Elliott Hughes
b030de25b8 Use the canonical form of the APL2 boilerplate.
Test: repo upload hooks
Change-Id: I49fd4d3131d0cc7f26cdc380d180a950c070541a
2019-12-12 15:32:10 -08:00
Elliott Hughes
cdb52fc147 Make private/bionic_page.h available as platform/bionic/page.h.
Bug: http://b/145825270
Test: treehugger
Change-Id: I52958f370c0df2c02cb8250e2cf0705d4e93e908
2019-12-12 15:26:14 -08:00
Christopher Ferris
9584fa46e9 Update to android-mainline kernel headers v5.4.
Update generate_uapi_headers.sh to checkout the android mainline
kernel. Also, add a small modification to look for the kernel directory
in common not linux-stable.

Remove deprecated android headers from android/uapi/linux. Also,
remove f_accessory.h since it's in the android mainline kernel.

Test: Builds and runs on walleye.
Change-Id: Ia371305e19f56e6bcc2db6d5b4d299819f07ffc6
2019-12-12 14:59:25 -08:00
Peter Collingbourne
cad05d2e21 Merge "Stop linking ndk_cruft*.cpp into libc.a." 2019-12-11 20:40:03 +00:00
Ryan Prichard
d4299c3f0f Merge changes I052011f2,I40f42464
* changes:
  dl_test: update error message
  dl_test: use GTEST_SKIP() in a few places
2019-12-11 20:32:04 +00:00
Evgeny Eltsin
84b6d82327 Merge "Fix sys_ptrace_test feature check on arm64" 2019-12-11 18:23:38 +00:00
Peter Collingbourne
570de3337d Stop linking ndk_cruft*.cpp into libc.a.
We are about to introduce code into ndk_cruft that uses dlfcn.h, which isn't
available in static executables. Besides, none of the users of libc.a ought
to be depending on ndk_cruft anyway.

Bug: 144430859
Change-Id: Ic1f2e554e1fdbfee768c859acac032c1306d71fc
2019-12-11 10:01:15 -08:00
Evgeny Eltsin
bd1c63065e Fix sys_ptrace_test feature check on arm64
The code was checking PTRACE_GETREGSET output even in case of error.
This seems not correct. Though ptrace can still write some output in
case of EINVAL, implementation should still check updated iov_len before
reading it.

Change the code to avoid checking output in case of error at all.

Test: bionic-unit-tests --gtest_filter=sys_ptrace.watchpoint_stress
Change-Id: I7b1ca18ac64f81055ff89f56b453aff0ce8e1057
2019-12-11 15:42:04 +01:00
Kiyoung Kim
ccf0307f76 Merge "Move linker config under /linkerconfig" 2019-12-11 02:55:06 +00:00
Ryan Prichard
0f67214c50 dl_test: update error message
Bug: http://b/145998177
Test: atest CtsBionicTestCases on a non-debuggable, user build
Change-Id: I052011f274edc331aa63fc6cd7666af2aebc2ad0
2019-12-10 14:50:11 -08:00
Ryan Prichard
55f9a24acc dl_test: use GTEST_SKIP() in a few places
Bug: none
Test: bionic unit tests
Change-Id: I40f42464359576ffbd55d0f56347c6c45daf73f9
2019-12-10 14:45:20 -08:00
Logan Chien
27a8c60f04 Merge "versioner: Migrate to clang-r370808" 2019-12-06 21:01:35 +00:00
Christopher Ferris
80a51f41b2 Merge "Add mallopt M_PURGE benchmark." 2019-12-06 01:25:55 +00:00
Christopher Ferris
5a3c920051 Add mallopt M_PURGE benchmark.
Update the native allocator documentation to include running of this
benchmark.

Move the malloc_benchmark.cpp to malloc_sql_benchmark.cpp and use
malloc_benchmark.cpp for benchmarking functions from malloc.h.

Bug: 137795072

Test: Ran new benchmark.
Change-Id: I76856de833032da324ad0bc0b6bd85a4ea8c253d
2019-12-05 15:46:22 -08:00
Logan Chien
1da9f96463 versioner: Migrate to clang-r370808
Bug: 139945549
Test: lunch aosp_arm64-userdebug && \
      m versioner && \
      PATH=out/host/linux-x86/bin:$PATH \
      ./bionic/tools/versioner/run_tests.py

Change-Id: I1a548de9d1ce82aee30144a359e215a4daf5fc2b
2019-12-05 14:03:05 -08:00
Kiyoung Kim
1a2460d19c Move linker config under /linkerconfig
Due to some special environment, linker config should not be located
under /dev partition. It would be better to relocate linker config under
new root dir /linkerconfig.

Bug: 144966380
Test: m -j && tested from cuttlefish
Change-Id: Icda1d2ef34b42159c6ebce58b03211cc13f08121
2019-12-05 12:49:22 +09:00