Commit graph

31541 commits

Author SHA1 Message Date
Evgeny Eltsin
45b36c2921 Skip pthread_leak* tests with native_bridge
Bug: 37920774
Bug: 157394871
Test: bionic-unit-tests --gtest_filter=*leak*
Change-Id: Ifc5b66e4b640d1abae4dcf8dbc28612d24c7e972
2020-06-09 19:24:25 +02:00
Evgeny Eltsin
b56d1182d1 Add util to skip tests with native_bridge
Bug: 37920774
Bug: 157394871
Test: bionic-unit-tests
Change-Id: Id949c9e568fd068daaf405a377813ee1480c2df7
2020-06-08 21:12:56 +02:00
Treehugger Robot
9f2e171900 Merge "Remove dead code." 2020-06-08 17:25:01 +00:00
Treehugger Robot
4dd8760cc4 Merge "Factor out error reporting in WriteProtected." 2020-06-08 17:12:04 +00:00
Elliott Hughes
1e381a2429 Factor out error reporting in WriteProtected.
Partly to buff our coverage numbers, but also for improved consistency
in error reporting.

Test: treehugger
Change-Id: Iffc32833a35f9e9535c1bc3e0f7cb3c4bbba5f7f
2020-06-08 08:41:27 -07:00
Elliott Hughes
9253757ff2 Remove dead code.
pirama made me do this.

Test: treehugger
Change-Id: I3af9157e246ae4f3d4dc388332dc63b730066f91
2020-06-08 08:33:54 -07:00
Treehugger Robot
86345218ce Merge "Need prebuilt linker executable for host Bionic." 2020-06-08 13:28:37 +00:00
Treehugger Robot
cea8a4f18a Merge changes I3c697924,I0b019cd0
* changes:
  Move set_cached_pid() to __clone_for_fork()
  Remove WEAK_FOR_NATIVE_BRIDGE for fork
2020-06-08 05:03:33 +00:00
Treehugger Robot
7ce3f2cb39 Merge "Trivial test for difftime(3)." 2020-06-06 03:51:46 +00:00
Elliott Hughes
208fdd1963 Trivial test for difftime(3).
pirama made me do this.

Test: treehugger
Change-Id: I0cf4466e494d92c96802e763b99346f7517bf3d7
2020-06-05 17:19:00 -07:00
Christopher Ferris
b13650d787 Merge "Update the generate script." 2020-06-05 21:21:38 +00:00
Elliott Hughes
32900a1d05 Merge "Use a template for the exec family." 2020-06-05 15:39:19 +00:00
Treehugger Robot
3b23cc7f72 Merge "Narrow native bridge to clone_for_fork" 2020-06-05 01:24:59 +00:00
Christopher Ferris
430527b4cd Update the generate script.
The arm kvm.h file has been deprecated, so nobody should be including it.
Therefore, remove the hack to copy the file out of the tools directory.

Also, update to remove the arm kvm.h file.

Test: Ran generate and update script and verified only the arm kvm.h
Test: was deleted.
Test: Builds and boots on a walleye.
Change-Id: I95dcc8877bdb2da2858b0b9d0aa95d1d2072cf9a
2020-06-04 12:32:09 -07:00
Elliott Hughes
a1b1bfd1d1 Use a template for the exec family.
This means that execle() doesn't have to drag in all the path code and
shell script special case code from its relatives, for branches that
will never be taken. Specifically, it means that they disappear from the
monstrously large linker binary after this change.

A drop in the ocean of bloat, yes, but you have to start somewhere.

Bug: http://b/25200716
Test: treehugger, objdump
Change-Id: I21126823d869cee07bf7320bc0a65ea2aaee65a1
2020-06-04 08:04:06 -07:00
Lev Rumyantsev
3a4c2ffff8 Move set_cached_pid() to __clone_for_fork()
Bug: 145028007
Test: bionic-unit-tests
Change-Id: I3c697924f2a3ef1804a688dd1fe9669f6b7a71bf
2020-06-03 17:16:30 -07:00
Lev Rumyantsev
520398ffe9 Remove WEAK_FOR_NATIVE_BRIDGE for fork
Bug: 145028007
Test: bionic-unit-tests
Change-Id: I0b019cd08c9d7426a953bd199f2ecd6dd42db00e
2020-06-03 17:00:48 -07:00
Lev Rumyantsev
41127dca3d Narrow native bridge to clone_for_fork
We are removing native bridge copy of fork.cpp, but need to
replace call to clone() when it's done for bionic's fork.

The code here will run all pre-/post-clone routines for *guest*,
while native bridge implementation will need to run the
corresponding *host* routines.

Bug: 145028007
Test: bionic-unit-tests
Change-Id: Ic5524e743caa287d7aaa8dc7e5d34acd1c7e1170
2020-06-03 17:00:41 -07:00
Jooyung Han
f78faebccd Merge "Make .whitelisted property "append"-able" am: cd95c53bab
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1322515

Change-Id: I93a23cf07d6c0969de45178a7a43b2bf1bf64f6f
2020-06-03 01:32:07 +00:00
Jooyung Han
cd95c53bab Merge "Make .whitelisted property "append"-able" 2020-06-03 01:16:30 +00:00
Treehugger Robot
755aaa1ef6 Merge "fdtrack: increase backtrace depth." am: 55ae06ac07
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1322904

Change-Id: I72acebe73447ab9b7e3afce8f6264a44c9e22e69
2020-06-03 00:25:32 +00:00
Treehugger Robot
55ae06ac07 Merge "fdtrack: increase backtrace depth." 2020-06-03 00:13:14 +00:00
Christopher Ferris
765968f82f Merge "Update to v5.7 kernel headers." am: 4cc4c6c43f
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1322217

Change-Id: Ic45cd0ba70361ff030f7ec6abe16cfe9242f4fae
2020-06-02 23:24:14 +00:00
Christopher Ferris
4cc4c6c43f Merge "Update to v5.7 kernel headers." 2020-06-02 23:11:54 +00:00
Josh Gao
55b91af828 fdtrack: increase backtrace depth.
Bug: http://b/155136951
Bug: http://b/157789860
Test: treehugger
Change-Id: I1e575fdef7d520f5a896130844eefb1a1ba46694
2020-06-02 16:06:55 -07:00
Martin Stjernholm
b87882d6a4 Need prebuilt linker executable for host Bionic.
ART runs some tests on host using linux_bionic (cf.
ab/git_master-art-host). On device Bionic binaries come from its APEX,
but on host they have to be supplied separately. Since they're not part
of the SDK they are instead provided through a `module_export` module,
which is technically similar to `sdk` in the way it produces prebuilt
snapshots.

Test: art/test/testrunner/run_build_test_target.py art-linux-bionic-x64
  on a master-art branch using snapshot built from runtime-module-sdk
  and runtime-module-host-exports
Bug: 152255951
Change-Id: I143b5412f7284f42c7e8be6cecc5ec96f1dc70f3
2020-06-02 21:20:18 +01:00
Christopher Ferris
af09c709d5 Update to v5.7 kernel headers.
Kernel headers coming from:

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

Update the generate_uapi_headers.sh where the types.h file is now in
the right place, but kvm.h is not.

Test: Booted cuttlefish/bonito.
Test: Ran bionic-unit-tests on cuttlefish/bonito.
Change-Id: Ice9ce370a658e320b80f564b34a4431927fcf100
2020-06-02 10:58:28 -07:00
Jooyung Han
61a9a4016c Make .whitelisted property "append"-able
.whitelisted is a list of sonames seperated by ":" just like
.shared_libs and .paths properties. It makes sense to make it appendable
using += as well ass .shared_libs and .paths.

Bug: n/a
Test: atest linker-unit-tests
Change-Id: If61cc553c8080e8a58de8a3a6051c1853f7bfe5f
2020-06-02 16:05:01 +09:00
Treehugger Robot
6d7dd4f08f Merge "Add newline at end of error message" am: 6a642f7760
Change-Id: Id8baf5f3c1d879e8d21c01233f536327b668fe65
2020-06-01 19:00:22 +00:00
Treehugger Robot
6a642f7760 Merge "Add newline at end of error message" 2020-06-01 18:43:33 +00:00
Pirama Arumuga Nainar
cb4a7c81e0 Add newline at end of error message
So the message gets flushed before the following abort.

Test: bionic-unit-tests without bionic-loader-test-libs at the expected
      relative path shows the error message.
Change-Id: I53bb27a88b73c9d8f4bb76560752f99a104d71ca
2020-05-30 16:46:20 -07:00
Treehugger Robot
b300aea97b Merge "clock: buff our coverage numbers slightly." am: 72a955bf0f
Change-Id: Icd2139d60d16e0cb55052f9f35677a7b92b122e6
2020-05-30 00:30:17 +00:00
Treehugger Robot
72a955bf0f Merge "clock: buff our coverage numbers slightly." 2020-05-30 00:15:57 +00:00
Elliott Hughes
09e394f92a clock: buff our coverage numbers slightly.
clock_gettime() with known arguments can't fail (and we ignore its
return value in most other places already).

Test: treehugger
Change-Id: I2374ae5ba1598a01d4c4f689b9c75c4e7dc926b6
2020-05-29 15:36:16 -07:00
Christopher Ferris
b3b6ddcf12 Merge "Ignore SCUDO_OPTIONS across a security boundary." am: 700f753c50
Change-Id: I9aa28632e74b94dd3b0a6154b0993dad126982fd
2020-05-27 00:12:59 +00:00
Christopher Ferris
700f753c50 Merge "Ignore SCUDO_OPTIONS across a security boundary." 2020-05-26 23:57:42 +00:00
Christopher Ferris
ad3be7e649 Ignore SCUDO_OPTIONS across a security boundary.
Add SCUDO_OPTIONS to the list of the environment variables that should
not be preserved across a security boundary.

Bug: 157484128

Test: Builds and boots.
Change-Id: Id8644608114ad2fd49baedbdbbe1c899768bd54d
2020-05-26 15:12:06 -07:00
Peter Collingbourne
5f62ab63e9 Merge "Define mte_supported() on non-aarch64." am: 642b374e64
Change-Id: I182443467c958f5cbee71674330a1f116d8212c6
2020-05-21 21:03:02 +00:00
Peter Collingbourne
642b374e64 Merge "Define mte_supported() on non-aarch64." 2020-05-21 20:49:11 +00:00
Christopher Ferris
5b5c56003a Merge "Fix deadlock/timeout in thread unwinding." am: 3c9cd8a29d
Change-Id: I9069f1da5f71f69361a3273242d0d698aa37b2ab
2020-05-21 16:26:58 +00:00
Christopher Ferris
3c9cd8a29d Merge "Fix deadlock/timeout in thread unwinding." 2020-05-21 16:13:37 +00:00
Christopher Ferris
9bf7817dd2 Fix deadlock/timeout in thread unwinding.
When malloc debug is enabled, using libbacktrace to unwind can
result in a deadlock. This happens when an unwind of a thread
is occuring which triggers a signal to be sent to that thread. If
that thread is interrupted while a malloc debug function is
executing and owns a lock, that thread is then stuck in the signal
handler. Then the original unwinding thread attempts to do an
allocation and gets stuck waiting for the same malloc debug lock.

This is not a complete deadlock since the unwinder has timeouts,
but it results in truncated unwinds that take at least five
seconds to complete.

Only the backtrace signals needs to be blocked because it is the only
known signal that will result in a thread being paused in a signal
handler.

Also, added a named signal in the reserved signal list for the
special bionic backtrace signal.

Bug: 150833265

Test: New unit tests pass with fix, fail without fix.
Change-Id: If3e41f092ebd40ce62a59ef51d636a91bc31ed80
2020-05-20 18:18:54 -07:00
Josh Gao
cd73d27768 Merge "sigaction: don't call interposable symbol." am: 867b46a2ca
Change-Id: I62f38373c60e2c281a5d1d0e8c4fcf4054ea2b15
2020-05-20 21:51:00 +00:00
Josh Gao
867b46a2ca Merge "sigaction: don't call interposable symbol." 2020-05-20 21:36:49 +00:00
vichang
ae5d43caa9 Merge "Revert "Disable dlfcn#dlopen_system_libicuuc_ tests due to test failures on cuttlefish"" am: cacda52a0a
Change-Id: Ida8a33d89e6fd935770afa8d15348bd4e87814c3
2020-05-20 16:21:52 +00:00
vichang
cacda52a0a Merge "Revert "Disable dlfcn#dlopen_system_libicuuc_ tests due to test failures on cuttlefish"" 2020-05-20 16:01:53 +00:00
Josh Gao
11623dd60d sigaction: don't call interposable symbol.
Ensure we don't call sigchain's sigaction64 from bionic's sigaction by
extracting sigaction64 to a static function.

Test: treehugger
Change-Id: I16226c6ac580ece7000c335beb1d3b76429d2a06
2020-05-19 18:40:50 -07:00
Treehugger Robot
2737246d29 Merge "Expand a little on the time_t situation." am: 071d071646
Change-Id: Ie8ad22c1ba0d0cd406d083894ad9f1a4ef620ccf
2020-05-20 00:45:45 +00:00
Treehugger Robot
071d071646 Merge "Expand a little on the time_t situation." 2020-05-20 00:26:52 +00:00
Elliott Hughes
1cd4d4227a Expand a little on the time_t situation.
Since we last touched this file, the Linux kernel has added the missing
API, but time has also moved on enough to make the cost/benefit
unconvincing for Android.

Bug: http://b/156317457
Test: treehugger
Change-Id: I07fa678458ef10d15540b36ab65e0898d2fdadc6
2020-05-19 12:41:25 -07:00