Commit graph

21132 commits

Author SHA1 Message Date
Josh Gao
bc055cae45 Add more ptrace process resumption tests.
Add tests to verify that ptrace unlink happens immediately for unreaped
processes.

Test: /data/nativetest/bionic-unit-tests/bionic-unit-tests --gtest_filter="Ptrace*"
Test: /data/nativetest64/bionic-unit-tests/bionic-unit-tests --gtest_filter="Ptrace*"
Change-Id: I9803ee5be2a0686c21556598ecf17348df09f601
2017-03-29 15:02:18 -07:00
Elliott Hughes
eb04ed506f Fix x86 system calls made from ELF preinit.
Used by CFI, so broke cfi_test#early_init@x86, but I've added a specific
test for this (and a similar test for getauxval from preinit, which this
patch does not fix).

Bug: http://b/35885875
Test: ran tests
Change-Id: I43885bedfb88c0a26b4474bd3c27a87dec7bbc97
2017-03-29 13:48:02 -07:00
Dan Albert
028a29faee Merge changes from topic 'no-bionic-prebuilts'
am: aa0b5054c5

Change-Id: I3a9d7e295163da53babfe5d539d04166eed3224a
2017-03-29 18:05:14 +00:00
Treehugger Robot
aa0b5054c5 Merge changes from topic 'no-bionic-prebuilts'
* changes:
  Build the versioner even on unbundled branches.
  Revert "Revert "Run the versioner as part of the build.""
2017-03-29 17:59:27 +00:00
Dimitry Ivanov
79c33a1b5b Merge "linker: log only real dlerrors"
am: df3b922fcf

Change-Id: I4608d63d8be71adaad664fbe685d0ec51ec19a27
2017-03-28 20:48:35 +00:00
Dimitry Ivanov
df3b922fcf Merge "linker: log only real dlerrors" 2017-03-28 20:40:45 +00:00
Dimitry Ivanov
11968b80af linker: log only real dlerrors
Currently linker reports all potential dlerrors
for example if library was not found in 'this'
namespace - it initializes linker error buffer
with not found message but when consequent
search in linked namespace succeeds this message
is droped because dlopen was successful.

This commit avoids logging false positive error
messages when debug.ld.* set to dlerror.

Test: manual
Change-Id: I480694a1b1bbacd6bd1d8505cd2ee491710964cc
2017-03-28 11:15:47 -07:00
Paul Lawrence
448e702fd3 Merge "Expose seccomp table"
am: 4b43140142

Change-Id: If4a0e4194e2b15bd2ce3bdc81c078074e462b1f9
2017-03-28 01:58:29 +00:00
Treehugger Robot
4b43140142 Merge "Expose seccomp table" 2017-03-28 01:54:13 +00:00
Christopher Ferris
08bfbd18f8 Merge "bionic: arm64: generic: strcmp: align to 64B cache line"
am: f785a6cbff

Change-Id: I3b5b76a6c9a0881c9f82012161254dbd480d062b
2017-03-28 01:34:28 +00:00
Christopher Ferris
f785a6cbff Merge "bionic: arm64: generic: strcmp: align to 64B cache line" 2017-03-28 01:27:18 +00:00
Dimitry Ivanov
e16a6463d9 Merge "Make anonymous namespace isoalted."
am: 6b0f17e588

Change-Id: Ibecb1efa6b81242ffc1ffc6d5f60a13785fc8578
2017-03-28 01:09:57 +00:00
Dimitry Ivanov
6b0f17e588 Merge "Make anonymous namespace isoalted." 2017-03-28 00:59:09 +00:00
Paul Lawrence
26f57b6b24 Expose seccomp table
Test: Run with internal cl
      https://googleplex-android-review.git.corp.google.com/#/c/2028102/
      and make sure passes
Bug: 20890063
Change-Id: Id78e5ea843554a5d3750b8f9b350f28ad4dca99b
2017-03-27 15:51:50 -07:00
Dimitry Ivanov
c9dced28b6 Make anonymous namespace isoalted.
This addresses outstanding todo for anonymous namespace
and fixes an app compatibility bug.

Bug: http://b/36008422
Test: start app from http://b/36008422 and make sure it runs
Change-Id: Ie148418b944379ee1000e7274f2f6c1eca511d6c
2017-03-27 15:42:17 -07:00
Dan Albert
69cb22f4d7 Build the versioner even on unbundled branches.
This is needed to generate the NDK, so unbundled projects using the
NDK need to build this. If they don't need the NDK, they should just
remove bionic from their manifest.

Test: make checkbuild
Bug: None
Change-Id: I7db816c4a341cf34d4d11739dc64182af630ad63
2017-03-27 13:28:27 -07:00
Dan Albert
22805ea9b8 Revert "Revert "Run the versioner as part of the build.""
This reverts commit 69c7562f59.

Test: make checkbuild
Change-Id: Ie443029398c01b45e0a0317a8074808b064f35d4
2017-03-27 13:06:45 -07:00
Dimitry Ivanov
f3ee6cc97c Merge "Revert "linker: add more directories to default lib paths""
am: 840ae69408

Change-Id: I49d120109ead5daa672bf7dff916029828c6b94e
2017-03-25 07:49:41 +00:00
Dimitry Ivanov
840ae69408 Merge "Revert "linker: add more directories to default lib paths"" 2017-03-25 07:46:22 +00:00
Dimitry Ivanov
b6aeca5280 Merge "Load namespace configuration from ld.config.txt"
am: deca8effd0

Change-Id: Iaf23427acf6a1e5a6336dc43838d1678b364a277
2017-03-25 05:21:08 +00:00
Treehugger Robot
deca8effd0 Merge "Load namespace configuration from ld.config.txt" 2017-03-25 05:17:32 +00:00
Dimitry Ivanov
72aed61800 Merge "Disable compat_elf_hash_and_relocation_tables test for x86"
am: fe96db819b

Change-Id: I6ff32babeeb514cd00704e797a713ac4149dc868
2017-03-24 23:06:39 +00:00
Dimitry Ivanov
fe96db819b Merge "Disable compat_elf_hash_and_relocation_tables test for x86" 2017-03-24 23:02:56 +00:00
Dimitry Ivanov
4cabfaad34 Load namespace configuration from ld.config.txt
This change allows customization of default namespace
configuration for different executables. It also enables
target_sdk_version setup for binaries (note that this
option should explicitly be enabled in ld.config.txt).

Bug: http://b/30706810
Bug: http://b/30435785
Test: run linker-unit-tests/bionic-unit-tests, boot angler
Change-Id: Ibbe87209acf1538fc9cec04944f3d22a190c38f1
2017-03-24 15:50:45 -07:00
Dimitry Ivanov
fc32dcb128 Disable compat_elf_hash_and_relocation_tables test for x86
Bug: http://b/36571076
Test: run bionic-unit-tests on fugu
Change-Id: I2f901bc99e55f15b06fe6a5b0d7a125d1b8241a8
2017-03-24 10:58:23 -07:00
Dimitry Ivanov
bf8290dc7b Merge "loader: stop relying on AT_BASE"
am: ad8dcd6023

Change-Id: Ie7a4ffd40a91d2b87468dc3374414cb4e6bed993
2017-03-24 02:06:22 +00:00
Treehugger Robot
ad8dcd6023 Merge "loader: stop relying on AT_BASE" 2017-03-24 02:03:58 +00:00
Dimitry Ivanov
9b1cc4bb9c loader: stop relying on AT_BASE
android loader should not rely on the fact
that AT_BASE is set because kernel currently
does not set it when linker is run standalone
(The linker does not have PT_INTERP set)

This commit replaces AT_BASE with calculated value.

Bug: http://b/30739481
Bug: http://b/35890756
Test: run bionic-unit-tests --gtest_filter=dl*
Change-Id: Ic2eb73e4452624b1f2e05f46e99e4c17df0bbc3f
2017-03-23 17:12:59 -07:00
Paul Lawrence
9fd409f56a Merge "Expand whitelist"
am: 58df5b2b86

Change-Id: I58f915835c2b0617c2bc846f2d021ce0747013c1
2017-03-23 20:46:25 +00:00
Treehugger Robot
58df5b2b86 Merge "Expand whitelist" 2017-03-23 20:41:34 +00:00
Paul Lawrence
6a6d669bfc Expand whitelist
Bug: 36449658
Test: Builds
Change-Id: I610da03e7a3cede218d1657f53797ab72cbdf317
2017-03-23 12:21:29 -07:00
Christopher Ferris
ab39630cef Merge "Verify at least 2 frames out of signal handler."
am: 8f804d71d0

Change-Id: I101d82f95345ebda7d385142301e5fa3e35daeed
2017-03-23 19:15:50 +00:00
Christopher Ferris
8f804d71d0 Merge "Verify at least 2 frames out of signal handler." 2017-03-23 19:12:21 +00:00
Christopher Ferris
ac2f3dd5cb Verify at least 2 frames out of signal handler.
Modify the test slightly to make sure that the unwinder properly unwinds
through at least 2 frames outside of the signal handler. This guarantees
that if the first frame outside of the handler happens to be garbage,
this test will fail.

Bug: 34468756

Test: Ran the unit tests on fugu, angler (both 32 bit and 64 bit).
Change-Id: I6b76ac9fc1df9ed6fd5bbcc6f5fa4bf458354dff
2017-03-23 09:45:10 -07:00
Paul Lawrence
58b8d8c43e Merge "Fix problem that we don't block syscalls below min value"
am: 4d099d1576

Change-Id: Iaa83772727fd8cb4b9468cd7033523afabe6baed
2017-03-22 19:38:55 +00:00
Treehugger Robot
4d099d1576 Merge "Fix problem that we don't block syscalls below min value" 2017-03-22 19:33:08 +00:00
Paul Lawrence
65b47c9fe0 Fix problem that we don't block syscalls below min value
The check that we are not below the lowest permitted syscall was
off by one, so we always allowed them, rather than always denying
them

Test: Check arm64 boots, chrome and maps work
      mips and mips64 emulators boot
      Note that arm, x86 and x86_64 already allow syscall 0 so there
      will be no functional change there

Change-Id: I85873f1d04124e634e648bd47c027f280f1d6dbd
2017-03-22 09:48:17 -07:00
Joachim Sauer
a4a0b78e8d Merge "Update timezone data to 2017b"
am: 341bb25a19

Change-Id: Ie617b4613a4faa33ae95d8e610b3f854caa989b8
2017-03-22 13:16:05 +00:00
Joachim Sauer
341bb25a19 Merge "Update timezone data to 2017b" 2017-03-22 13:11:46 +00:00
Dimitry Ivanov
314c5b4388 Merge "Add systrace output for dlclose/dlsym calls"
am: 5153938e9a

Change-Id: I7c9914ae9b309e9c8d0369503546772b2b5b491e
2017-03-21 22:15:51 +00:00
Treehugger Robot
5153938e9a Merge "Add systrace output for dlclose/dlsym calls" 2017-03-21 22:06:09 +00:00
Elliott Hughes
650593498d Merge "POSIX support varies by API level."
am: 8ebfc0d3a3

Change-Id: Ifa732c7835620aaf1d12ad9b3a97253fad3f14b3
2017-03-21 20:22:13 +00:00
Treehugger Robot
8ebfc0d3a3 Merge "POSIX support varies by API level." 2017-03-21 20:11:37 +00:00
Elliott Hughes
6d60179839 Merge "pthread barrier and spinlock types should only appear at API level 24."
am: 72b6f4fae2

Change-Id: I497096763a796e0e69643d2240d3608eb169104d
2017-03-21 19:20:41 +00:00
Elliott Hughes
72b6f4fae2 Merge "pthread barrier and spinlock types should only appear at API level 24." 2017-03-21 19:14:05 +00:00
Elliott Hughes
06d7f2c789 POSIX support varies by API level.
Bug: https://github.com/android-ndk/ndk/issues/332
Test: builds
Change-Id: I249c214d34244a1149ba6b1160e8eafc2cdbcdea
2017-03-21 11:24:13 -07:00
Dimitry Ivanov
6705e8caf5 Add systrace output for dlclose/dlsym calls
Bug: http://b/27195126
Test: manual: adb shell atrace -t 5 bionic
      and run bionic-unit-tests --gtest_filter=dl*

Change-Id: I9e93a069dd440bb643890d9952913938442ac375
2017-03-21 10:38:23 -07:00
Elliott Hughes
468a5d2d83 pthread barrier and spinlock types should only appear at API level 24.
Bug: https://github.com/android-ndk/ndk/issues/336
Test: builds
Change-Id: I938d9d7ea879d1dbc355f14e100f1ea31a51a1f0
2017-03-21 09:55:32 -07:00
Joachim Sauer
45348f06a0 Update timezone data to 2017b
IANA changes:

  Briefly: Haiti has resumed DST.

  Changes to past and future time stamps

    Haiti resumed observance of DST in 2017.  (Thanks to Steffen Thorsen.)

  Changes to past time stamps

    Liberia changed from -004430 to +00 on 1972-01-07, not 1972-05-01.

    Use "MMT" to abbreviate Liberia's time zone before 1972, as "-004430"
    is one byte over the POSIX limit.  (Problem reported by Derick Rethans.)

Bug: 36470257
Test: CtsLibcoreTestCases / CtsBionicTestCases
Change-Id: I5a8ffb60232410d88ffa67c7702dd234ff05f61d
2017-03-21 15:37:37 +00:00
Dimitry Ivanov
ab6cc15afd Merge changes Ib2bad794,I82436292
am: e98d1e68ce

Change-Id: I9a7976262216e9196bb1bc5a5b2bd5736346b109
2017-03-20 22:39:50 +00:00