Commit graph

31584 commits

Author SHA1 Message Date
Josh Gao
54e502e66a Revert "Temporarily disable FdsanTest.vfork."
This reverts commit b4cbff351f.

Bug: http://b/156400255
Test: none
Change-Id: I3a936542ccff8989b4671f3e03dd9d1d5559d6ff
2020-05-18 12:59:38 -07:00
Bram Bonné
acadd09c66 Speed up seccomp with priority list.
Allow to provide a list of prioritized syscalls (e.g., syscalls that we
know occur often) which are checked before other syscalls in seccomp.

When constructing the bpf seccomp filter, traverse prioritized syscalls
in a linear list before checking all other syscalls in a binary tree.

Bug: 156732794
Test: make, inspect generated *_system_policy.cpp files
Test: simpleperf on futex/ioctl-heavy app seems to show 5-10% less time
spent in seccomp call

Change-Id: I509343bcd32ada90c0591785ab5cb12d2a38c31e
(cherry picked from commit ce84677733)
2020-05-18 11:20:30 +02:00
Victor Khimenko
2befdf2f1e Merge "Allow native_bridge linker to use different APEX from native one" am: 57a1c3908f
Change-Id: I28c0d5e38896038fd92239fe67102cde80d08f3d
2020-05-16 01:24:14 +00:00
Victor Khimenko
57a1c3908f Merge "Allow native_bridge linker to use different APEX from native one" 2020-05-16 01:05:55 +00:00
vichang
b8cd7e7f58 Revert "Disable dlfcn#dlopen_system_libicuuc_ tests due to test failures on cuttlefish"
This reverts commit 01fb8d7120.

Reason for revert: Re-land the test after fixing b/156397945

Bug: 156397945
Change-Id: Ie9ec5fef7a308e28d512c6438c5c06758bdbcf06
2020-05-15 22:01:00 +00:00
Victor Khimenko
01790fdc69 Allow native_bridge linker to use different APEX from native one
Bug: http://b/156397945

Test: dlfcn.dlopen_system_libicuuc_android_api_level_28 with native_bridge

Change-Id: I3ecd929a0c31dda8cd424795f21f6ef472776557
2020-05-15 20:56:22 +00:00
Christopher Ferris
e58aca31fd Merge "Remove reference to deprecated option." am: 3d238a895c
Change-Id: Ic0afc4e392a15b4c00b785848768e3fa37aabf45
2020-05-15 15:42:32 +00:00
Christopher Ferris
3d238a895c Merge "Remove reference to deprecated option." 2020-05-15 15:28:43 +00:00
Victor Khimenko
7eff269314 Merge "Copy translateSystemPathToApexPath to linker_translate_path.cpp" am: e145aae949
Change-Id: Icdff2f370cbbcb9e319a3013f3d5c84dd8414b07
2020-05-15 13:46:51 +00:00
Victor Khimenko
e145aae949 Merge "Copy translateSystemPathToApexPath to linker_translate_path.cpp" 2020-05-15 13:30:22 +00:00
Treehugger Robot
e0a4495a26 Merge "Add Bionic module SDK." am: 6972d40571
Change-Id: I8816aa227f000ba1cfc420bc55a231fdbb09c94b
2020-05-15 12:31:40 +00:00
Treehugger Robot
6972d40571 Merge "Add Bionic module SDK." 2020-05-15 12:29:36 +00:00
Christopher Ferris
11f92fe9b9 Remove reference to deprecated option.
Test: atest CtsBionicTestCases
Change-Id: Ib23bb8dd1bac5f84d73516fd74a41bd9a81ca2da
2020-05-14 16:48:44 -07:00
Victor Khimenko
d15229df76 Copy translateSystemPathToApexPath to linker_translate_path.cpp
Bug: http://b/156397945

Test: m

Change-Id: I33f11b8a6a41475b6cdd65e1ff49b2084c33b197
2020-05-14 22:17:45 +02:00
Jooyung Han
3a564b1e22 Merge "libc_scudo: Set min_sdk_version to apex_inherit" am: 75c8868a42
Change-Id: I766ef206e0e16600cd1d3670448ccc29291a96dd
2020-05-13 15:39:10 +00:00
Jooyung Han
75c8868a42 Merge "libc_scudo: Set min_sdk_version to apex_inherit" 2020-05-13 15:24:35 +00:00
Jooyung Han
1beacd440b libc_scudo: Set min_sdk_version to apex_inherit
Switched min_sdk_version from 29(hard-coded) to "apex_inherit".
From the build system perspective, nothing changes.

This change is to sync with internal code because it's been changed
while cherry-picking.

Bug: 145796956
Test: m
Change-Id: I567ddad0bd54087cdf9a30cbe42e239977a028dd
2020-05-13 16:55:10 +09:00
Josh Gao
5618417bdb Merge "Temporarily disable FdsanTest.vfork." am: 960b8ed0cd
Change-Id: If97454c5cfc142c74fe499f6e82ad86140a6c159
2020-05-13 02:05:43 +00:00
Josh Gao
960b8ed0cd Merge "Temporarily disable FdsanTest.vfork." 2020-05-13 01:48:17 +00:00
Peter Collingbourne
1541800aa7 Define mte_supported() on non-aarch64.
It turns out that we need this on non-aarch64 more than I thought
we would, so let's start defining it everywhere.

Also expose platform headers to sanitizer-status.

Bug: 135772972
Change-Id: Ia7fd8a9bca0c123c4ca2ecd5f250f3a628a5513b
2020-05-12 16:03:50 -07:00
Josh Gao
b4cbff351f Temporarily disable FdsanTest.vfork.
Bug: http://b/156400255
Test: none
Change-Id: I48e09e0ea84742933bea88d009f8ff0bffacfdc3
2020-05-12 15:17:02 -07:00
vichang
f4608e6549 Merge "Disable dlfcn#dlopen_system_libicuuc_ tests due to test failures on cuttlefish" am: f76ef36690
Change-Id: I902b13856db872a779110d38415e780cdcef1c69
2020-05-12 12:46:21 +00:00
vichang
f76ef36690 Merge "Disable dlfcn#dlopen_system_libicuuc_ tests due to test failures on cuttlefish" 2020-05-12 12:34:13 +00:00
Victor Chang
01fb8d7120 Disable dlfcn#dlopen_system_libicuuc_ tests due to test failures on cuttlefish
Bug: 156315785
Test: atest CtsBionicTestCases
Change-Id: I6d61a2dcf55ebf67587ccf2653af3aca493b022d
2020-05-12 10:10:32 +00:00
Treehugger Robot
c027fc89aa Merge changes If42905f3,Id351a993,I8a082fd0 am: e3bc50d44f
Change-Id: Ic509add072ce2bbcb92cf42c1a47b5f2cd68a121
2020-05-12 07:18:25 +00:00
Treehugger Robot
e3bc50d44f Merge changes If42905f3,Id351a993,I8a082fd0
* changes:
  fdtrack: don't do anything while vforked.
  fdsan: don't do anything when vforked.
  Track whether a thread is currently vforked.
2020-05-12 07:04:58 +00:00
Martin Stjernholm
215e1da3fc Add Bionic module SDK.
Test: v
  1. build/soong/scripts/build-aml-prebuilts.sh runtime-module-sdk
  2. Unzip out/aml/soong/mainline-sdks/runtime-module-sdk-current.zip
     into prebuilts/module_sdk/runtime in a master-art tree without
     platform/bionic in its manifest.
  3. Check that all shared libs in the generated Android.bp file in the
     zip archive have stubs.version set.
  4. art/build/apex/runtests.sh is successful in the master-art tree.
Bug: 152255951
Change-Id: Iaada409c2edfa504056da8bebfb30756456eb282
2020-05-11 23:45:13 +01:00
vichang
ee913197f3 Merge "Move libicuuc.so into com.android.i18n module." am: 10bad3e882
Change-Id: Id307e7102099ccd66bebff2b29fe6f11287e7594
2020-05-11 11:51:20 +00:00
vichang
10bad3e882 Merge "Move libicuuc.so into com.android.i18n module." 2020-05-11 11:37:06 +00:00
Jiyong Park
4f3d46d020 Merge "Set apex_available property" am: 262ff01d2b
Change-Id: I0e37c1182dd95aa39982274aacbf822f0bb04984
2020-05-10 06:39:47 +00:00
Jiyong Park
262ff01d2b Merge "Set apex_available property" 2020-05-10 06:25:04 +00:00
Jiyong Park
4ede160cb1 Set apex_available property
The marked library(ies) were available to the APEXes via the
hand-written whitelist in build/soong/apex/apex.go. Trying to remove the
whitelist by adding apex_available property to the Android.bp of the
libraries.

Exempt-From-Owner-Approval: cherry-pick from internal

Bug: 150999716
Test: m
Merged-In: If64eff62b9e93af95089e5010c30eb586673b92e
(cherry picked from commit 693a7214d6)
Change-Id: If64eff62b9e93af95089e5010c30eb586673b92e
2020-05-10 06:24:42 +00:00
Treehugger Robot
5ad35478f5 Merge "Fix typo in if statement." am: c2a67121c7
Change-Id: I8bb29035d93ed4f7adbbb306b484b6d70101df91
2020-05-08 18:46:56 +00:00
Treehugger Robot
c2a67121c7 Merge "Fix typo in if statement." 2020-05-08 18:34:42 +00:00
Peter Collingbourne
947125edf1 Fix typo in if statement.
It turns out that we weren't actually enabling stack traces due
to a typo in one of the if statements. Fix it.

Bug: 135772972
Change-Id: Ic19352280f65acd621b9d88c361c55680b3327f0
2020-05-08 10:05:39 -07:00
Josh Gao
4129113128 fdtrack: don't do anything while vforked.
Bug: http://b/153926671
Test: 32/64-bit bionic-unit-tests on blueline, x86_64 emulator
Change-Id: If42905f3d6a76ed70a45e5b9edd029ffd7789045
2020-05-07 20:18:45 -07:00
Josh Gao
65fb2a7f03 fdsan: don't do anything when vforked.
Bug: http://b/153926671
Test: 32/64-bit bionic-unit-tests on blueline, x86_64 emulator
Change-Id: Id351a993e396774b68239edfef83d9e81205290b
2020-05-07 20:18:40 -07:00
Josh Gao
2303283740 Track whether a thread is currently vforked.
Our various fd debugging facilities get extremely confused by a vforked
process closing file descriptors in preparation to exec: fdsan can
abort, and fdtrack will delete backtraces for any file descriptors that
get closed. Keep track of whether we're in a vforked child in order to
be able to detect this.

Bug: http://b/153926671
Test: 32/64-bit bionic-unit-tests on blueline, x86_64 emulator
Change-Id: I8a082fd06bfdfef0e2a88dbce350b6f667f7df9f
2020-05-07 19:44:27 -07:00
Treehugger Robot
1ded9ae248 Merge "Add goldfish-opengl to use bionic_libc_platform_headers" am: 073c3dc1eb
Change-Id: Iafbd9b8bc27063da5259029a2d739d4833a79e00
2020-05-08 01:14:21 +00:00
Treehugger Robot
073c3dc1eb Merge "Add goldfish-opengl to use bionic_libc_platform_headers" 2020-05-08 00:53:07 +00:00
Victor Chang
f248d2de84 Move libicuuc.so into com.android.i18n module.
Change the location set in the linker

Bug: 130219528
Bug: 138994281
Test: atest CtsBionicTestCases
Test: atest CtsJniTestCases
Change-Id: I215a8e023ccc4d5ffdd7df884c809f8d12050c8f
2020-05-07 23:15:01 +00:00
Roman Kiryanov
067f51824b Add goldfish-opengl to use bionic_libc_platform_headers
We need __get_tls and TLS_SLOT_OPENGL for our
OpenGL implementation. We currently use .mk files
and this restriction does not apply, since we are
migrating to .bp we need to address restriction.

Bug: 154151802
Test: presubmit
Signed-off-by: Roman Kiryanov <rkir@google.com>
Change-Id: I007664d919204cd4f6a623f9695a56e94bab7ae6
2020-05-07 15:06:55 -07:00
Peter Collingbourne
150d47edfb Merge "Introduce a new heap tagging level, M_HEAP_TAGGING_LEVEL_SYNC." am: 144a6ab341
Change-Id: Ie039b08a8edc06163508423a2d2771d9f8300e96
2020-05-07 18:07:28 +00:00
Peter Collingbourne
144a6ab341 Merge "Introduce a new heap tagging level, M_HEAP_TAGGING_LEVEL_SYNC." 2020-05-07 17:51:51 +00:00
Martin Stjernholm
5856ae0e11 Merge "Export libc_headers from libdl_static for libraries that wrap it without bringing in libc." am: e413ce902d
Change-Id: I1750e958a7480dd40cd01df84466e511af4e658e
2020-05-07 09:37:15 +00:00
Martin Stjernholm
e413ce902d Merge "Export libc_headers from libdl_static for libraries that wrap it without bringing in libc." 2020-05-07 09:19:48 +00:00
Martin Stjernholm
3ddcc1e987 Export libc_headers from libdl_static for libraries that wrap it
without bringing in libc.

Required by the native bridge libdl wrapper.

Test: m (on cf_x86_phone)
Bug: 153590472
Change-Id: Ib9b1b741aaf5b09b24d7dce09a49c2fa7737209f
2020-05-06 23:47:40 +01:00
Martin Stjernholm
831eea21ba Merge "Make Bionic and kernel system includes explicit in the blueprints." am: 98581070c2
Change-Id: I36bc560c5cf0764c431aec6adf7af14b7fb5375a
2020-05-06 10:51:31 +00:00
Martin Stjernholm
98581070c2 Merge "Make Bionic and kernel system includes explicit in the blueprints." 2020-05-06 10:35:39 +00:00
Peter Collingbourne
d3060019de Introduce a new heap tagging level, M_HEAP_TAGGING_LEVEL_SYNC.
The SYNC tagging level enables stack trace collection for allocations and
deallocations, which allows allocation and deallocation stack traces to
appear in tombstones when encountering a tag check fault in synchronous tag
checking mode.

Bug: 135772972
Change-Id: Ibda9f51b29d2c8e2c993fc74425dea7bfa23ab1e
2020-05-05 13:28:16 -07:00