Commit graph

20287 commits

Author SHA1 Message Date
Paul Lawrence
8b7a3559c1 Expand whitelist
Bug: 36726183
Test: Builds, call 90 added to policy

(cherry picked from commit 3ba8223b9a)

Change-Id: Ib8db1b764ce22aadf8050031d40040dd6c0e669e
2017-03-31 16:01:32 +00:00
Treehugger Robot
4b43140142 Merge "Expose seccomp table" 2017-03-28 01:54:13 +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
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
Dimitry Ivanov
840ae69408 Merge "Revert "linker: add more directories to default lib paths"" 2017-03-25 07:46:22 +00:00
Treehugger Robot
deca8effd0 Merge "Load namespace configuration from ld.config.txt" 2017-03-25 05:17:32 +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
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
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
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
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
341bb25a19 Merge "Update timezone data to 2017b" 2017-03-22 13:11:46 +00:00
Treehugger Robot
5153938e9a Merge "Add systrace output for dlclose/dlsym calls" 2017-03-21 22:06:09 +00:00
Treehugger Robot
8ebfc0d3a3 Merge "POSIX support varies by API level." 2017-03-21 20:11:37 +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
e98d1e68ce Merge changes Ib2bad794,I82436292
* changes:
  Add systrace output for dlopen calls
  Add end() method to bionic's ScopedTrace class
2017-03-20 22:34:37 +00:00
Treehugger Robot
e36fb9ed9e Merge "Only rename mmap to mmap64 if we're L or newer." 2017-03-20 21:53:41 +00:00
Dimitry Ivanov
5c4a58072f Add systrace output for dlopen calls
Bug: http://b/27195126
Test: manual: adb shell atrace -t 5 bionic
      and run bionic-unit-tests --gtest_filter=dl*:Dl*

Change-Id: Ib2bad794e571b89bd1f52c9e0de642c2092e5c21
2017-03-20 13:34:52 -07:00
Elliott Hughes
8bd97b007e Merge "Only rename fgetpos/fsetpos/fseeko/ftello/funopen if we're N or newer." 2017-03-20 20:01:16 +00:00
Elliott Hughes
f12d719b01 Merge "Only rename sendfile to sendfile64 if we're L or newer." 2017-03-20 20:01:07 +00:00
Dan Albert
785b249df0 Only rename mmap to mmap64 if we're L or newer.
Without this, setting `__USE_FILE_OFFSET64` and targeting pre-L made
mmap entirely unavailable.

Test: make checkbuild
Bug: https://github.com/android-ndk/ndk/issues/332
Change-Id: I9f61c44f8d9ab5c7cae845c9f89a7d889c6df365
2017-03-20 12:57:13 -07:00
Treehugger Robot
b43a222ee7 Merge "Expand whitelist" 2017-03-20 19:52:13 +00:00
Dimitry Ivanov
2a4a5e72f1 Add end() method to bionic's ScopedTrace class
Bug: http://b/27195126
Test: make
Change-Id: I8243629200606ca87b11cbd479ca093add42eb56
2017-03-20 12:45:55 -07:00
Paul Lawrence
822ecece23 Expand whitelist
Bug: 36435222
Test: App starts, plays game
Change-Id: If21f59e4d218be64fdac46115d35dc1ffb6fe771
2017-03-20 11:03:19 -07:00
Yuanyuan Zhong
9d150dd9a0 bionic: arm64: generic: strcmp: align to 64B cache line
Align strcmp to 64B. This will ensure the preformance critical
loop is within one 64B cache line.

Change-Id: I88eef2f12b2a6442cacec9cdbdffbf17293e7d32
Signed-off-by: Yuanyuan Zhong <zyy@motorola.com>
Reviewed-on: https://gerrit.mot.com/902536
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Yi-Wei Zhao <gbjc64@motorola.com>
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
2017-03-20 17:54:29 +00:00
Elliott Hughes
79a3db0304 Only rename fgetpos/fsetpos/fseeko/ftello/funopen if we're N or newer.
Without this, setting __FILE_OFFSET_BITS to 64 and targeting pre-L
made these functions entirely unavailable.

Bug: https://github.com/android-ndk/ndk/issues/333
Test: builds
Change-Id: Id17ae3c070f8b2650a9bc9aa2aa2e92c5fcdf4ad
2017-03-17 18:56:08 -07:00
Elliott Hughes
3645e71a43 Only rename sendfile to sendfile64 if we're L or newer.
Without this, setting __FILE_OFFSET_BITS to 64 and targeting pre-L
made sendfile entirely unavailable.

Bug: https://github.com/android-ndk/ndk/issues/333
Test: builds
Change-Id: I82d326ff244473dd5443632ff6c19d726d5e29ee
2017-03-17 18:50:12 -07:00
Treehugger Robot
9cb82a2c6b Merge "Add libc optimizations to bionic for MIPS" 2017-03-17 15:29:14 +00:00
Dimitry Ivanov
a144697500 Revert "linker: add more directories to default lib paths"
This reverts commit 1daa18e737.

To be replaced with customized linker-namespaces for different kind of binaries.

Bug: http://b/34407260
Change-Id: Ib4e480669bbdf44ee4f59bf05f07d3e082c348c9
Test: m
2017-03-17 00:08:23 +00:00
Treehugger Robot
e0561cb0c9 Merge "Use libbase for realpath and dirname" 2017-03-16 20:36:57 +00:00
Dimitry Ivanov
5b2cd3a358 Use libbase for realpath and dirname
Test: run bionic-unit-tests
Bug: http://b/31396973
Change-Id: Ie8dc60348b9c57892a77be6a24dadb42241f6b62
2017-03-16 11:47:08 -07:00
Prashant Patil
fcb877ac4b Add libc optimizations to bionic for MIPS
Test: Used bionic tests available under bionic/tests folder.
      Tested for mips32r1/mips32r2/mips64r6 on emulators.

Change-Id: I589415ddc496df3f6067ae34cb33ca58b3a1f276
Signed-off-by: Prashant Patil <prashant.patil@imgtec.com>
2017-03-16 10:26:24 -07:00
Josh Gao
b2882dd429 Merge "Split up the stack space tests into their own noinline functions." 2017-03-16 06:44:59 +00:00
Josh Gao
61db9ac8da Split up the stack space tests into their own noinline functions.
Prevent the compiler from being too smart and allocating a stack buffer
at the beginning of a function.

Bug: http://b/36206043
Test: 32/64-bit dynamic tests pass, static ones still don't
Change-Id: I90c575be43a9dd6c4fefc0d8b514f1ae0405b994
2017-03-15 19:53:17 -07:00
Treehugger Robot
2390f83da4 Merge "Enable ld-android on linux_bionic builds" 2017-03-15 23:18:18 +00:00
Treehugger Robot
a4db9d6f41 Merge "Add tests for pthread TLS leak." 2017-03-15 22:09:27 +00:00
Dan Willemsen
8229596d41 Enable ld-android on linux_bionic builds
Bug: 31559095
Test: Enable host bionic, run soong
Change-Id: If94927c66c0c2dc74c213ca403d45e73508b0025
2017-03-15 14:24:40 -07:00
Josh Gao
7d15dc388a Add tests for pthread TLS leak.
Add tests that ensure that threads don't leak memory mappings after
they exit.

Bug: http://b/36045112
Test: /data/nativetest/bionic-unit-tests/bionic-unit-tests --gtest_filter=*leak*
Test: /data/nativetest64/bionic-unit-tests/bionic-unit-tests --gtest_filter=*leak*
Change-Id: Id0c1194b5d2bb7d89947b1ade16eb0d768d8c5b7
2017-03-15 13:30:05 -07:00