Commit graph

8108 commits

Author SHA1 Message Date
Josh Gao
12021ce9cf Merge "Break android_set_abort_message out of libc_logging."
am: 1c864b630f

Change-Id: I7d8ab343a09a0e2166d0462a3b378257cb837f67
2017-04-04 00:49:24 +00:00
Josh Gao
1c864b630f Merge "Break android_set_abort_message out of libc_logging." 2017-04-04 00:40:40 +00:00
Josh Gao
10ec9286ae Break android_set_abort_message out of libc_logging.
libc_logging is getting statically linked into the crash handler
library, resulting in two copies of the abort message code existing in
processes, one in the linker, and one in the crash handler.

Move android_set_abort_message to its own file to solve this.

Bug: http://b/36862204
Test: /data/nativetest/debuggerd_test/debuggerd_test32
Change-Id: Ie198c5a3bb07645aa43296915c9a6752693f14a9
2017-04-03 16:00:10 -07:00
Josh Gao
d89b0f130c Merge changes I826756d9,I00e2edb2
am: 6367f5ee55

Change-Id: I0585784475e8288fc06e5ca1089ff227f87001bd
2017-04-03 20:41:38 +00:00
Josh Gao
6367f5ee55 Merge changes I826756d9,I00e2edb2
* changes:
  libc_logging: mention that they're async signal safe.
  linker: update dependencies.
2017-04-03 20:33:18 +00:00
Nick Kralevich
1df65daf9a Merge "Cleanup ANDROID_DNS_MODE and BIONIC_DNSCACHE"
am: 4df5ca1e02

Change-Id: I899ca838e59469348cd9bd25296ab9ac8e298291
2017-04-03 17:26:26 +00:00
Nick Kralevich
62c03a4ff4 Cleanup ANDROID_DNS_MODE and BIONIC_DNSCACHE
For security reasons, when a binary is executed which causes a security
transition (eg, a setuid binary, setgid binary, filesystem capabilities,
or SELinux domain transition), the AT_SECURE flag is set. This causes
certain blacklisted environment variables to be stripped before the
process is executed. The list of blacklisted environment variables is
stored in UNSAFE_VARIABLE_NAMES. Generally speaking, most environment
variables used internally by libc show up in this list.

Add ANDROID_DNS_MODE to the list of unsafe variables.
Similar to RESOLV_HOST_CONF and RES_OPTIONS (which are already
blacklisted), this variable controls how name resolution requests are
handled. Allowing ANDROID_DNS_MODE to be set across a security
boundary could induce resolution failures or otherwise impact
name resolution.

Remove BIONIC_DNSCACHE. This does not appear to be used, and setting
this variable across a security boundary could cause name resolution
problems.

Test: Android compiles and runs with no obvious problems.
Change-Id: I835a7b42d6afbc9c67866594c7951cfd9b355d81
2017-04-03 08:44:38 -07:00
Elliott Hughes
134912df4b Merge "Only use environment variables on the host."
am: 5d8b8310aa

Change-Id: I4439714a733487a76221e789805b50ce958829f4
2017-04-01 07:41:13 +00:00
Elliott Hughes
14eb5abc20 Only use environment variables on the host.
It's faster and safer to skip them on the device, where we know where
everything is anyway.

(cherrypick of cf6365690cc68bdd7e16648fb7881ba0b5cae93d.)

Bug: http://b/36807787
Test: ran tests
Change-Id: I0bb7879cc46f194152c67ddaf072cbebb424f789
2017-03-31 23:23:29 -07:00
Paul Lawrence
5d20373be9 Merge "Expand whitelist"
am: 7cf467bd23

Change-Id: Id4baef4988302e5178d5e7bf850f3e9a028b3162
2017-04-01 00:15:45 +00:00
Treehugger Robot
7cf467bd23 Merge "Expand whitelist" 2017-04-01 00:07:12 +00:00
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
Dan Albert
f1cbcfe9aa Merge "Revert "isnan and isinf aren't functions.""
am: 6d225bdf7c

Change-Id: I57dedc84133b553f84a3eea4cd654a3ebe45aba4
2017-03-31 02:32:27 +00:00
Treehugger Robot
6d225bdf7c Merge "Revert "isnan and isinf aren't functions."" 2017-03-31 02:27:14 +00:00
Dan Albert
284c8f1baf Revert "isnan and isinf aren't functions."
While this change is correct, GNU libstdc++ 4.9 isn't able to handle a
standard compliant C library. Its <cmath> will `#undef isnan` from
math.h and only adds the function overloads to the std namespace,
making it impossible to use both <cmath> (which gets included by a
lot of other standard headers) and ::isnan.

We're going to have to revert this until we can start turning down
support for gnustl.

This reverts commit e76ee993ff.

Bug: https://code.google.com/p/android/issues/detail?id=271629
Test: make checkbuild
Change-Id: I394f50271430e78ab801d85c3ee4e87019eda6af
2017-03-30 17:18:31 -07:00
Elliott Hughes
5b35e2b9c2 Merge "Fix x86 system calls made from ELF preinit."
am: 12a07044db

Change-Id: I6377f5bcc5edfc725c923b596490aa74e55ea224
2017-03-29 23:14:56 +00:00
Elliott Hughes
12a07044db Merge "Fix x86 system calls made from ELF preinit." 2017-03-29 23:08:18 +00: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
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
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
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
Paul Lawrence
9fd409f56a Merge "Expand whitelist"
am: 58df5b2b86

Change-Id: I58f915835c2b0617c2bc846f2d021ce0747013c1
2017-03-23 20:46:25 +00:00
Paul Lawrence
6a6d669bfc Expand whitelist
Bug: 36449658
Test: Builds
Change-Id: I610da03e7a3cede218d1657f53797ab72cbdf317
2017-03-23 12:21:29 -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
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
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
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
Dan Albert
364aed595c Merge "Only rename mmap to mmap64 if we're L or newer."
am: e36fb9ed9e

Change-Id: Id3694c3dbb255887c208566757063bf51f08ec42
2017-03-20 22:00:16 +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
Elliott Hughes
7a228993be Merge "Only rename fgetpos/fsetpos/fseeko/ftello/funopen if we're N or newer."
am: 8bd97b007e

Change-Id: I64aadf8f81717e78c2d96d6fe13ae034a5955557
2017-03-20 20:08:20 +00:00
Elliott Hughes
b6aae754bf Merge "Only rename sendfile to sendfile64 if we're L or newer."
am: f12d719b01

Change-Id: Id7bab533a4be040f5c3eac10a5df32e9b6820cfc
2017-03-20 20:08:09 +00: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
Paul Lawrence
1551b7a9b2 Merge "Expand whitelist"
am: b43a222ee7

Change-Id: If0754c6fed7fc9d2704c6761e46643abb502a5ca
2017-03-20 19:57:36 +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