Commit graph

7619 commits

Author SHA1 Message Date
Treehugger Robot
ed9e6a41c9 Merge changes I01c4d9a8,Ic34734b4
* changes:
  Run genversion-scripts.py.
  Annotate libdl.map.txt.
2016-08-04 23:56:55 +00:00
Dan Albert
c8a95a3b15 Run genversion-scripts.py.
Change-Id: I01c4d9a85d3397b02b00b4d33fafe6d9ae692ed7
2016-08-04 15:39:21 -07:00
Pirama Arumuga Nainar
810b6ca931 Merge "Guard include of uchar.h in stdatomic.h"
am: e8921ec92c

Change-Id: I7e8638db63931173e7dc098cf80fbaaa94670a50
2016-08-04 18:43:07 +00:00
Pirama Arumuga Nainar
ed3c78771f Guard include of uchar.h in stdatomic.h
Bionic stdatomic.h is also used for the host (via a copy in
prebuilts/clang).  Revert to guarding the include of uchar.h based on
__STDC_VERSION__, so it is included only when needed.

Change-Id: I5b45c7f5d16da223478512104702a3e4e5a975ae
Test: bionic tests on host and Angler.  Confirmed failures I am 
      seeing are KIs.
2016-08-04 18:22:12 +00:00
Dan Albert
8280789d30 Merge changes Iecc1b127,Ib67f07db,I7672d34c
am: f0b53115ae

Change-Id: If0a88b7f14808a5339858e276df822f9683929a9
2016-08-03 17:56:39 +00:00
Treehugger Robot
f0b53115ae Merge changes Iecc1b127,Ib67f07db,I7672d34c
* changes:
  Run genversion-scripts.py.
  Only check arch tag if we have *any* arch tags.
  Add pylintrc.
2016-08-03 17:50:38 +00:00
Josh Gao
bba09a689b Merge changes Ib5962ea3,I8c1a7464,I06ce7c31
am: d7d4937bdc

Change-Id: I96334b89823b75a6d7c56e94f665aab16daed1a9
2016-08-03 00:29:56 +00:00
Treehugger Robot
d7d4937bdc Merge changes Ib5962ea3,I8c1a7464,I06ce7c31
* changes:
  Add version information for legacy inlines.
  versioner: remove unnecessary kernel/common symlink.
  versioner: add symlink for kernel/android/uapi.
2016-08-03 00:22:12 +00:00
Dan Albert
37ba9052b0 Run genversion-scripts.py.
Change-Id: Iecc1b127c67a96aecc4e86582c1cc3291a4acf00
2016-08-02 15:33:53 -07:00
Dan Albert
ea701b3790 Only check arch tag if we have *any* arch tags.
With the introduction of new tags for ndk_library, we'll have a lot
of tags that aren't architecture tags. If we have something tagged
`introduced=21`, it should be in all architectures.

Change-Id: Ib67f07db14625f6903919c181050316eb183bed5
2016-08-02 15:33:53 -07:00
Dan Albert
10085bfdc0 Add pylintrc.
Disable all the style differences present in genversion-scripts.py.

Change-Id: I7672d34c4f7698ba445968dd5d9f5ef1fdc60056
2016-08-02 15:15:09 -07:00
Dan Albert
ce990485fb Merge changes Iedab3259,I333fe8ae
am: 0fb3b0aec4

Change-Id: I4eeb1ce1eb8b8b8bbefa38ab339a649fa2e793e4
2016-08-02 21:56:17 +00:00
Treehugger Robot
0fb3b0aec4 Merge changes Iedab3259,I333fe8ae
* changes:
  Put bsd_signal back.
  Unversion some symbols for the NDK.
2016-08-02 21:44:20 +00:00
Josh Gao
b6a4a4c0cc Add version information for legacy inlines.
Bug: http://b/30170081
Change-Id: Ib5962ea3037dd692a98b6691d263871549aac8af
2016-08-02 14:32:42 -07:00
Dimitry Ivanov
b340e0a660 Merge "Correct libstdc++ version"
am: bbf593f0f0

Change-Id: I9f549b8548ac8a2b9d0014bcf4b7e2887437ecd5
2016-08-02 18:24:04 +00:00
Dimitry Ivanov
bbf593f0f0 Merge "Correct libstdc++ version" 2016-08-02 18:17:08 +00:00
Dan Albert
00c8e9556f Put bsd_signal back.
With this change (and all the others below it in the stack), the only
difference between the arm android-9 libc.so in r13-beta1 and the one
we are now generating is the addition of LIBC_N and LIBC_O versions.

Test: make ndk, readelf stub libc.so to check symbol exists
Bug: https://github.com/android-ndk/ndk/issues/160
Change-Id: Iedab32592b2d979f3cc922ffd4ed406427de3dda
2016-08-02 10:58:52 -07:00
Dan Albert
674d93db37 Unversion some symbols for the NDK.
These functions were erroneously released in LIBC_PRIVATE for M, but
in fact need to be public. Since we need to be able to load them on M
even if they were built for a lower platform (and M needs to load on
newer platforms), we need to unversion them.

Change-Id: I333fe8ae7380cc2a5dbd699414399ec52f602383
2016-08-02 10:43:35 -07:00
Elliott Hughes
038edf9186 Merge "More stdio one-liners."
am: 1d8b312a07

Change-Id: I7eed8712ed987a162bd745b181ad700a0ccb490e
2016-08-02 02:39:41 +00:00
Treehugger Robot
1d8b312a07 Merge "More stdio one-liners." 2016-08-02 02:30:14 +00:00
Elliott Hughes
70715da453 More stdio one-liners.
This actually turns up a bug in fmemopen, so I guess that's what I'll
look at next...

Change-Id: I2971ecd1b5a3a3c7f43c22d985f88e389af89e97
2016-08-01 18:06:38 -07:00
Elliott Hughes
26512f431f Merge changes I2d334db2,Iab9fbc73
am: 5b1357da65

Change-Id: I485d46044040615d669ba0e61c4b7547cfcfbbb1
2016-08-01 23:35:01 +00:00
Treehugger Robot
5b1357da65 Merge changes I2d334db2,Iab9fbc73
* changes:
  Clean up 32-bit x86 memset assembler.
  Fix x86 __memset_chk.
2016-08-01 23:26:00 +00:00
Dimitry Ivanov
2b1b1a9467 Correct libstdc++ version
The version script is introduced in O

Bug: http://b/28987948
Change-Id: Icd0a27d1b67e8227e44aa6e771816f0e6ed489b8
2016-08-01 15:45:42 -07:00
Elliott Hughes
e412f8944e Clean up 32-bit x86 memset assembler.
Change-Id: I2d334db29226f9c60cf20220a569f1b772bf7c66
2016-08-01 14:00:45 -07:00
Elliott Hughes
ce3263f4ae Merge \"More stdio cleanup.\"
am: 490b9515e7

Change-Id: Ia6092bea6c07b14b2dd2abb67975df57abbc4aa2
2016-08-01 20:13:09 +00:00
Treehugger Robot
490b9515e7 Merge "More stdio cleanup." 2016-08-01 20:05:44 +00:00
Elliott Hughes
c33826ecae Merge \"Restore attribute alloc_size for GCC.\"
am: c5e79567e0

Change-Id: I8638e1da559e14367a1f305dffbc5b4296a5a047
2016-08-01 17:32:33 +00:00
Lev Rumyantsev
3a528f1cbf Fix x86 __memset_chk.
When __memset_chk_fail moved to C++, we didn't take into account
that the stack wasn't set up correctly for the jump from assembler.
Presumably no one had run the 32-bit x86 tests until now!

Bug: http://b/30513094
Change-Id: Iab9fbc731b6bfecd7ca4d3f3844d0568a5d30d86
2016-08-01 09:59:19 -07:00
Elliott Hughes
36a88e82eb Restore attribute alloc_size for GCC.
clang doesn't support attribute alloc_size, but GCC uses it to give
diagnostics where clang can't, and we had a test for one such case.

Bug: http://b/30513330
Change-Id: I4c14771258992d6bea684db7f91d60312642662f
2016-07-30 09:58:15 -07:00
Dan Albert
5b3a5cafd4 Merge changes I946cde38,I4b8e0ea1,I2e8141a8
am: 3318c56c99

Change-Id: I3a6e296f77964f0505bb5ef116ee9798338029b9
2016-07-30 05:13:26 +00:00
Elliott Hughes
44ff2f9d01 Merge \"Upgrade to tzcode-2016f.\"
am: def5854676

Change-Id: Ic98f4e6e27bf7b9388480aba25ebed085a0c8827
2016-07-30 05:13:21 +00:00
Treehugger Robot
3318c56c99 Merge changes I946cde38,I4b8e0ea1,I2e8141a8
* changes:
  Mark LIBC_O as being a future version.
  Mark LIBC_N as being introduced in android-24.
  Annotate the libc version map with NDK info.
2016-07-30 02:07:16 +00:00
Dan Albert
bf0e762dbb Mark LIBC_O as being a future version.
None of these symbols are in the NDK yet. Skip them.

Change-Id: I946cde38e767190c396593d562babc90457973fb
2016-07-29 17:49:42 -07:00
Dan Albert
09bc172911 Mark LIBC_N as being introduced in android-24.
Change-Id: I4b8e0ea1fc9b42c1f98f36ae7aaaae2c6322e16b
2016-07-29 17:49:42 -07:00
Dan Albert
b8109d0dbc Annotate the libc version map with NDK info.
Generated by running
https://android-review.googlesource.com/#/c/251477/ for libc.

Test: make checkbuild with
https://android-review.googlesource.com/#/q/branch:master+topic:ndk_library-libc-libm
Change-Id: I2e8141a83c1d79fd89b5e5c4432400b8301ba347
2016-07-29 17:49:42 -07:00
Elliott Hughes
cceaf069c7 More stdio cleanup.
Time to get back to cleaning up stdio, so start with a bunch of easy
one-liners...

Change-Id: I8df5fdc72500a89b977bfaa6c64c3639198d4e3e
2016-07-29 16:31:52 -07:00
Elliott Hughes
0a610d00fe Upgrade to tzcode-2016f.
No significant changes other than a default implementation of strftime_l.

Change-Id: I6edd2c03e5e7559f012c0c87d43f7109d641d3ca
2016-07-29 14:04:17 -07:00
Dimitry Ivanov
6b1baa4ae6 Merge \"Add symbol versions to libstdc++.so\"
am: 4bc6eea83e

Change-Id: Ibe6325470a1c6ec96dbfe9d75273206069a8f459
2016-07-28 22:57:01 +00:00
Dimitry Ivanov
4bc6eea83e Merge "Add symbol versions to libstdc++.so" 2016-07-28 22:38:09 +00:00
Dimitry Ivanov
6cc8d47a1f Add symbol versions to libstdc++.so
Bug: http://b/28987948
Change-Id: I3853528bd432ceab37e4867f2c4112d9ee0b40dc
2016-07-28 13:52:17 -07:00
Elliott Hughes
7a61e898c9 Merge \"Add IOV_MAX to <limits.h>.\"
am: 0cf1abe486

Change-Id: Ic830c385c4bbbefa29162a83e5fcad6234d344c6
2016-07-28 00:46:06 +00:00
Treehugger Robot
0cf1abe486 Merge "Add IOV_MAX to <limits.h>." 2016-07-28 00:20:36 +00:00
Elliott Hughes
08c2cb0fd4 Merge \"Admit that we don\'t actually support thread priority inheritance.\"
am: c7d97ec31d

Change-Id: I700257f4851dbdca8972f2d5864cdc6a74bbed43
2016-07-27 23:20:27 +00:00
Elliott Hughes
f2d7d41ff8 Add IOV_MAX to <limits.h>.
strace 4.13 assumes we have IOV_MAX. POSIX says it lives here. 1024 is
a Linux kernel limitation.

Change-Id: Icb428172670e4936a459db38a6a190b7178fe9f3
2016-07-27 15:25:31 -07:00
Elliott Hughes
7292725bcd Admit that we don't actually support thread priority inheritance.
Bug: https://code.google.com/p/android/issues/detail?id=218323
Change-Id: I6c69b0fbb8414e7cc2deeb8be50b6af4830ed55e
2016-07-27 14:05:10 -07:00
Elliott Hughes
5cdd0bed68 Merge \"Clean up <uchar.h> and <wctype.h> transitive includes.\"
am: 931be5a64d

Change-Id: I62223ec83e67b986ef2f57647d298ce18db19a51
2016-07-27 18:55:57 +00:00
Treehugger Robot
931be5a64d Merge "Clean up <uchar.h> and <wctype.h> transitive includes." 2016-07-27 18:44:07 +00:00
Christopher Ferris
fa9b7cb745 Merge \"More kernel header cleanup.\"
am: af8be4ebbc

Change-Id: Ie47ac6933cfb0dd936571455441f737547631182
2016-07-27 18:03:30 +00:00
Christopher Ferris
af8be4ebbc Merge "More kernel header cleanup." 2016-07-27 17:56:55 +00:00
Elliott Hughes
0fe88858f0 Clean up <uchar.h> and <wctype.h> transitive includes.
Bug: http://b/30367366
Change-Id: I63212a34c54ca07223a15aa5be4da3bdc6aa38a8
2016-07-27 10:45:05 -07:00
Dan Albert
0612024095 Merge changes I0262eed9,Iba9ee03a
am: 61bd7cb6e9

Change-Id: I670bc197b4465ae1aa01d18821db77a586991ebf
2016-07-27 01:29:10 +00:00
Treehugger Robot
61bd7cb6e9 Merge changes I0262eed9,Iba9ee03a
* changes:
  Add a temporary hack to work around __NDK_FPABI__.
  Remove _GNU_SOURCE guard on tmpnam.
2016-07-27 00:30:30 +00:00
Dan Albert
3e6929dad5 Add a temporary hack to work around __NDK_FPABI__.
Test: make checkbuild
Bug: http://b/27533932
Change-Id: I0262eed91b10b0dd5fe27a61fb8f35b3c062280e
2016-07-26 16:28:30 -07:00
Dan Albert
c1020754c2 Remove _GNU_SOURCE guard on tmpnam.
This shouldn't be guarded by _GNU_SOURCE. external/opencv3 expects
P_tmpdir to be available.

http://pubs.opengroup.org/onlinepubs/009695399/functions/tmpnam.html

Test: make checkbuild
Change-Id: Iba9ee03aec6e712356b571f7165ed1809e6227fe
2016-07-26 16:28:30 -07:00
Elliott Hughes
61672f8358 Merge \"Remove #pragma GCC visibility.\"
am: 9f326a2d60

Change-Id: I7c19f2012cd851ca6eec04c23e2ecd62b591933d
2016-07-25 23:56:42 +00:00
Elliott Hughes
7b737e43f8 Remove #pragma GCC visibility.
We have better control over visibility now.

Bug: http://b/24767418
Change-Id: Ifa9a1e5af4bd4217db08422050908770247b3b69
2016-07-25 15:57:02 -07:00
Elliott Hughes
28250109c2 Merge \"Stop #define\'ing __func__ and __restrict.\"
am: e656a3acaf

Change-Id: Ifa5e16df33f88ed929652f1b902d348012b62048
2016-07-25 22:39:38 +00:00
Elliott Hughes
f6495c78a8 Stop #define'ing __func__ and __restrict.
__STDC_VERSION__ isn't defined for __cplusplus, so we've been removing
such checks. Some got missed.

Stop defining __func__ and just use the __PRETTY_FUNCTION__ GCC extension
in <assert.h>. Also fix the #if there so that C++ gets __assert2 rather
than __assert, and rewrite the cast to work with -I rather than -isystem.

Also remove __restrict and just always use the __restrict GCC extension.

Add a trivial test for <assert.h>.

Bug: http://b/30353757
Change-Id: Ie49bb417976293d3a9692b516e28fe3c0ae0a6d9
Test: ran bionic unit tests.
2016-07-25 11:13:47 -07:00
Elliott Hughes
6c7b1953fb Merge \"Remove bionic\'s now-unused UniquePtr.\"
am: 557b3a1194

Change-Id: Iee6aaa142772b2947a124393b1ad42d20716dd35
2016-07-23 03:53:39 +00:00
Elliott Hughes
62d679fcf6 Merge \"Remove unnecessary \'extern\'s.\"
am: 0cdd0d4e63

Change-Id: I1874cc11cec65d5bdac80d4f3770c18628735635
2016-07-23 03:53:38 +00:00
Treehugger Robot
557b3a1194 Merge "Remove bionic's now-unused UniquePtr." 2016-07-23 03:51:20 +00:00
Elliott Hughes
1291e50173 Remove bionic's now-unused UniquePtr.
Change-Id: Id77dbdd6d4255ae8317449725ef093be9422407f
2016-07-22 19:52:46 -07:00
Elliott Hughes
3b2096a9d6 Remove unnecessary 'extern's.
Change-Id: Iba2b3fb6ff88e504f1657b915120ae43d58a1e03
2016-07-22 18:57:12 -07:00
Elliott Hughes
c5e0991f91 Merge \"Always include <sys/cdefs.h>.\"
am: 7101c48f20

Change-Id: I940ae0c46898a5ce1d51bbe14fc8366dbed593b5
2016-07-23 01:54:32 +00:00
Josh Gao
fc49e01100 Merge \"Remove __BIONIC_LEGACY_INLINE.\"
am: 767e8147d7

Change-Id: I510e31c8820dffc6a212dd6f390b5eac8eea84c4
2016-07-23 00:08:54 +00:00
Elliott Hughes
203e13d97d Always include <sys/cdefs.h>.
I made a mistake caught by code review earlier, so let's try to be
safer by default.

This patch also moves all our "forwarding" headers to the guardless
just-include-the-other-thing style that we usually use. (Where we
have a comment explaining where the header comes from, I've kept
that.)

Change-Id: I37342cf5e2563c6a269b2ba61a697069b1c7913b
2016-07-22 17:01:54 -07:00
Josh Gao
8778d64d5c Remove __BIONIC_LEGACY_INLINE.
Don't use the same declaration to declare both static and non-static
functions, to make life easier for versioner.

(Also, remove __BIONIC_LEGACY_INLINE from two functions in termios.h
that weren't actually legacy inlines.)

Bug: http://b/30170081
Change-Id: Ibb73377d77a2b4cee016289b7c46a01452e45fae
2016-07-22 15:52:55 -07:00
Elliott Hughes
1665158b71 Merge \"Make it possible to build bionic with -I instead of -isystem.\"
am: 420d02c56d

Change-Id: I2b105c0dbe34e206fbdb6a1ad5df82f17564ec2a
2016-07-22 21:47:47 +00:00
Elliott Hughes
420d02c56d Merge "Make it possible to build bionic with -I instead of -isystem." 2016-07-22 21:35:02 +00:00
Elliott Hughes
5470c18361 Make it possible to build bionic with -I instead of -isystem.
Various things:

* work around -Wnullability-completeness.
* use C++ casts in C++ and C casts in C.
* stop using attributes clang doesn't support (such as `warning`).
* remove duplicate definitions of XATTR_CREATE and XATTR_REPLACE.

Change-Id: I07649e46275b28a23ca477deea119fe843999533
2016-07-22 13:12:53 -07:00
Josh Gao
ba03502f56 Merge changes I7718b1ba,I648adc35
am: 4f62c5b311

Change-Id: Ia117c90c75866c0672cbdc0f0fa34975e58b2b0f
2016-07-22 19:28:38 +00:00
Christopher Ferris
5956b4e314 More kernel header cleanup.
Modify the generate script to add a new option and copy the types.h
arm header file since it's not currently being created properly. Also
manually generate the arm types.h uapi header since it's not being
properly generated right now.

Modify both generate scripts to delete the target directories before
adding the files to handle moved/deleted header files.

Move the common/scsi headers into android and delete the common
directory. Change the scripts to reflect this change.

Update the scsi headers since they've been modified in upstream kernels.

Bug: 30072483

Change-Id: Ia43d4b238b6a041350d60cc30184ecbd4829d7d5
2016-07-22 12:21:25 -07:00
Treehugger Robot
4f62c5b311 Merge changes I7718b1ba,I648adc35
* changes:
  Only initialize the global stack protector once.
  Make getpid work before TLS has been initialized.
2016-07-22 19:20:58 +00:00
Elliott Hughes
f3a094a4ea Merge \"Only define sa_family_t once.\"
am: 237366867a

Change-Id: Ifef06cfc6a9ee7d5d681f9886408d4c436a6fe32
2016-07-22 00:39:14 +00:00
Elliott Hughes
508d292f8d Only define sa_family_t once.
Change-Id: Icf700910c836d22c8a27ad026ec8af11697edd5a
2016-07-21 16:38:43 -07:00
Elliott Hughes
e81e3d5523 Merge \"Treat \"persist.sys.timezone\" as being a Java-format timezone.\"
am: 91f33cd5ae

Change-Id: Iafd50c6b6b44166f2fdf1506dbcbe5c788568966
2016-07-21 08:14:31 +00:00
Elliott Hughes
3e3f4a51b8 Treat "persist.sys.timezone" as being a Java-format timezone.
POSIX and Java disagree about the sign in a timezone string like "GMT+3".
This means that if you set "persist.sys.timezone" to such a string, native
code and Java code disagree about what time it is. Resolve this by
translating to POSIX form for native code.

Bug: http://b/25463955
Change-Id: I7c08c459dd8514348a12ce419edcbfbfe8f6d327
Test: manually tested with setprop and date.
2016-07-20 17:23:54 -07:00
Evgenii Stepanov
2f5ed30a7c Merge \"Align-up and randomize shared libraries.\"
am: a9fbaee593

Change-Id: I5cb0caea4db3a8cb3b0e1a4dd3a4bb2d5f5069d9
2016-07-20 20:37:26 +00:00
Evgenii Stepanov
a9fbaee593 Merge "Align-up and randomize shared libraries." 2016-07-20 20:31:41 +00:00
Christopher Ferris
fa46052743 Merge \"Move/remove android only kernel uapi headers.\"
am: fe280773ed

Change-Id: If9de2352e7522628aff751211753c11d4d453ca8
2016-07-20 18:09:38 +00:00
Christopher Ferris
fe280773ed Merge "Move/remove android only kernel uapi headers." 2016-07-20 18:03:48 +00:00
Evgenii Stepanov
d13e9a603f Align-up and randomize shared libraries.
This change implements the following property:
  Any 2**N aligned memory region on size 2**N contains no more than one DSO.

The value N can be configured, with 16 or 18 looking like a good choice.
Additionally, DSOs are loaded at random page-aligned address inside these large
regions.

This change has dual purpose:
1. Larger values of N allow a lot more compact CFI shadow implementation.
   See change I14dfea630de468eb5620e7f55f92b1397ba06217.
   For example, CFI shadow for the system_server process has the following size (RSS, KB):
   152 for N = 12, 32 for N = 16, 16 for N = 18.
2. Extra randomization is good for security.

This change does not result in extra RAM usage, because everything is still page-aligned.
It does result in a bit more VM fragmentation because of the gaps between shared libraries.
As it turns out, this fragmentation is barely noticeable because the kernel creates new mapping
at the highest possible address, and we do enough small mappings to almost completely fill the
gaps (ex. in the Zygote the gaps are filled with .ttf file mappings and thread stacks).

I've measured VM fragmentation as the sum of all VM gaps (unmapped regions) that are larger
than 1MB according to /proc/$PID/maps. On aosp_angler-userdebug, the numbers are (in GB):

                |   N = 12  |  N = 18
system_server   |   521.9   |  521.1
zygote64        |   522.1   |  521.3
zygote32        |   2.55    |  2.55
mediaserver     |   4.00    |  4.00

Change-Id: Ia6df840dd409c82837efd1f263be420d9723c84a
2016-07-19 18:18:22 -07:00
Elliott Hughes
234c0f6bb6 Merge \"Remove __LIBC_ABI_PUBLIC__.\"
am: 9af76f9b48

Change-Id: I8e2e7bf6a70f978619499a0e96e424c6bdb1cdf0
2016-07-19 21:58:19 +00:00
Elliott Hughes
f47514dd99 Remove __LIBC_ABI_PUBLIC__.
We have much better control over visibility now, so we don't need to
pollute the headers with cruft.

Bug: http://b/24767418
Change-Id: I349f4c3bc30102477375ad9f80926e560c7c1d8b
2016-07-19 13:56:46 -07:00
Christopher Ferris
d6e8b8ca56 Move/remove android only kernel uapi headers.
Move all of the uapi kernel headers that are only found in the android
kernel, and are still used by the tree into their own directory.

Delete all of these files that are not used.

Also, delete binder.h from the linux directory since it already exists
in the linux/android directory.

Bug: 30072483
Change-Id: I879f16e366f7670b8be3546b0a9cf9567fce6526
2016-07-19 12:43:56 -07:00
Elliott Hughes
1b2b8362c9 Merge \"Don\'t declare SYS_* constants for unavailable __NR_* constants.\"
am: 20de9ef5bd

Change-Id: Ib9e6ef7fc06df0ac42414870061da287a9692d09
2016-07-18 20:48:52 +00:00
Elliott Hughes
d2f725eaed Don't declare SYS_* constants for unavailable __NR_* constants.
Bug: https://code.google.com/p/android/issues/detail?id=215853
Change-Id: Iaaa3ce888deb8d032208bf636b7badaed6a72d30
2016-07-18 12:48:39 -07:00
Dan Albert
548d8e0374 Merge \"Put the legacy stdio fds back for pre-M.\"
am: 098d8ef5b2

Change-Id: I32565181dcfc9caab8212baa1c3f7a03f490ce0d
2016-07-15 21:48:30 +00:00
Dan Albert
32d7ca35ec Merge \"Add an alias for _CTYPE_N.\"
am: 730fa648c2

Change-Id: I84e7abe390146bfb2deb0987ccd997fd11c7d6aa
2016-07-15 21:02:25 +00:00
Dan Albert
32c79c279d Put the legacy stdio fds back for pre-M.
Change-Id: I2e397b04cba2969b9f9a3767b9b2fd12a289fcd2
2016-07-15 12:54:14 -07:00
Dan Albert
77bd6073fb Add an alias for _CTYPE_N.
gnustl is using this. It would be easy to change gnustl to *not* use
it for Android, but we've had this in released NDKs for years now so
we probably need this anyway.

Change-Id: I398a550664bf4ccbd9ea54f53c65428293a599a4
2016-07-15 12:54:05 -07:00
Yabin Cui
cd165f63c2 Merge \"Force pthread_cond_timedwait_relative_np using CLOCK_MONOTONIC.\"
am: a24a2476d0

Change-Id: I5d1ebca87932f915fc33dd44d3b383e83b940d90
2016-07-15 01:39:12 +00:00
Yabin Cui
a24a2476d0 Merge "Force pthread_cond_timedwait_relative_np using CLOCK_MONOTONIC." 2016-07-15 01:29:28 +00:00
Colin Cross
f45e58585c Merge \"Convert malloc_debug from Android.mk to Android.bp\"
am: 0393437b53

Change-Id: Iea3dbd038677e42075c6be87fceeb32e442ae152
2016-07-14 19:47:18 +00:00
Colin Cross
0393437b53 Merge "Convert malloc_debug from Android.mk to Android.bp" 2016-07-14 19:43:29 +00:00
Elliott Hughes
7513194e8a Merge \"Support 32-bit ARM vdso.\"
am: 85f900d589

Change-Id: I20c259c574b519e10efc054b7f2ae13ec9f7b451
2016-07-14 17:32:57 +00:00
Colin Cross
baa4899d38 Convert malloc_debug from Android.mk to Android.bp
Change-Id: I60ad376d222a92a29263c2804dcd1bd0d3c383d0
2016-07-14 09:07:56 -07:00
Yabin Cui
fe4a4d8f67 Force pthread_cond_timedwait_relative_np using CLOCK_MONOTONIC.
Previous patch changed pthread_cond_timedwait_relative_np to use
CLOCK_REALTIME, which causes app compatibility problem. So change
it back to CLOCK_MONOTONIC.

Bug: 30106240
Change-Id: I8e04058e92ede098f4f9f8d133f094001921441e
2016-07-13 16:08:48 -07:00
Elliott Hughes
4ce902c30e Support 32-bit ARM vdso.
Linux 4.1 added this.

Bug: http://b/19198045
Change-Id: I28be802ff403a61dd6733a001411b3ff05fef5a5
2016-07-12 13:55:51 -07:00
Colin Cross
769f3a9153 Merge \"Rename Android.soong.mk to Android.mk\"
am: 7fd1e75e24

Change-Id: I6ee75b0f4f53667eb820542529febcbe1751a494
2016-07-12 16:20:25 +00:00
Colin Cross
7f0e89fadd Rename Android.soong.mk to Android.mk
Soong is always on now, so we don't have to distinguish between
makefiles that should be ignored because Soong is handling them with an
Android.bp file, and makefiles that are still needed with Soong.  All
obsolete Android.mk files have been removed, rename all Android.soong.mk
files to Android.mk.

Change-Id: Ic0494e1800dec13a9f5714559cffe3a5ebe49418
2016-07-11 16:54:20 -07:00
Christopher Ferris
ec9c1d3f00 Merge \"Update the kernel header documentation.\"
am: 4580ea4f16

Change-Id: I69c3d6edb6107183da96f4bf5b36d15cc50dc525
2016-07-08 22:36:56 +00:00
Christopher Ferris
2974eeca4c Update the kernel header documentation.
Change the references to using the android kernel source, to use
the linux stable source code repository.

Change-Id: Ibc6c90fc67c80bef235459bb3af31656f4d403ac
2016-07-08 15:29:51 -07:00
Christopher Ferris
1d9f403ec4 Merge \"Add the record alloc option.\"
am: 779aa5ac33

Change-Id: Icdda3305fef2804b92692b31459fcfde2c83de1c
2016-07-08 22:05:00 +00:00
Christopher Ferris
7bd01783a8 Add the record alloc option.
This option adds the ability to record all of the allocation requests
and dump them to a file when a signal is sent to the process.

Included in this change, redo the option processing to add a new
string option.

Bug: 27747898

Change-Id: Ida043362e38b5eb1d459c99db9c2581015dab366
2016-07-08 14:05:17 -07:00
Neil Fuller
f1f8486776 Merge \"Update timezone data to 2016f\"
am: a0e205e3b4

Change-Id: I6f76a9c1183b601810debfba7fddeb30e543c006
2016-07-07 15:13:12 +00:00
Neil Fuller
516f09c963 Update timezone data to 2016f
The 2016f release of the tz code and data is available. It reflects the
following changes, which were either circulated on the tz mailing list
or are relatively minor technical or administrative changes:

   Changes affecting future time stamps

     The Egyptian government changed its mind on short notice, and
     Africa/Cairo will not introduce DST starting 2016-07-07 after all.
     (Thanks to Mina Samuel.)

     Asia/Novosibirsk switches from +06 to +07 on 2016-07-24 at 02:00.
     (Thanks to Stepan Golosunov.)

   Changes to past and future time stamps

     Asia/Novokuznetsk and Asia/Novosibirsk now use numeric time zone
     abbreviations instead of invented ones.

   Changes affecting past time stamps

     Europe/Minsk's 1992-03-29 spring-forward transition was at 02:00
not 00:00.
     (Thanks to Stepan Golosunov.)

Note: Paul Eggert changed the key used to sign the tzdata bundle and
the new public key cannot be found. The changes to the data since
2016e have been verified visually.

Change-Id: I11b49d9916e67313978fd893acf091e9f99f6d33
Test: Ran CTS/android.core.tests.libcore.package.harmony_java_util
Test: Ran CTS/android.core.tests.libcore.package.harmony_java_text
Test: Ran CTS/android.core.tests.libcore.package.libcore
Bug: 29991153
2016-07-06 18:41:23 +01:00
Elliott Hughes
9d63da82fb Merge \"x86-64\'s va_list is not a pointer type.\"
am: 204c4d1b80

Change-Id: I40675ac38f8442bb4ee66c048752919f7beb099e
2016-06-30 20:53:18 +00:00
Pirama Arumuga Nainar
a227bf399d Merge \"Revert \"Skip Clang\'s integrated-as for hand-coded assembly\"\"
am: 1fec29e77b

Change-Id: I0e3caf46128a44f8cfdd167547817e2d8efe3b5c
2016-06-30 20:49:36 +00:00
Elliott Hughes
53420fb21e x86-64's va_list is not a pointer type.
Change-Id: I680feeb641d5411ac481daaae6fa1580e74c5563
2016-06-30 13:47:16 -07:00
Treehugger Robot
1fec29e77b Merge "Revert "Skip Clang's integrated-as for hand-coded assembly"" 2016-06-30 20:33:42 +00:00
Josh Gao
b6453c52ac Only initialize the global stack protector once.
Before, dynamic executables would initialize the global stack protector
twice, once for the linker, and once for the executable. This worked
because the result was the same for both initializations, because it
used getauxval(AT_RANDOM), which won't be the case once arc4random gets
used for it.

Bug: http://b/29622562
Change-Id: I7718b1ba8ee8fac7127ab2360cb1088e510fef5c
Test: ran the stack protector tests on angler (32/64bit, static/dynamic)
2016-06-30 12:58:32 -07:00
Josh Gao
1089afb744 Make getpid work before TLS has been initialized.
Bug: http://b/29622562
Change-Id: I648adc35c04604a7e8bc649c425f07a723e96d3a
Test: code dependent on this change no longer crashes
2016-06-30 12:58:32 -07:00
Elliott Hughes
6c6a696332 Merge \"Apparently mips and x86\'s va_list is a pointer type.\"
am: 60be638ae6

Change-Id: I72cf962f53e703b2b52529f43cc2cf8b1ad106f3
2016-06-30 19:55:44 +00:00
Elliott Hughes
8ed118db61 Apparently mips and x86's va_list is a pointer type.
And clang won't let you have a function declaration where some arguments
have nullability specifiers and others don't.

Change-Id: I450b0221a3f7f068d5fe971dfbc0ba91d25710e8
2016-06-30 12:46:21 -07:00
Elliott Hughes
f4d5d9e9c7 Merge \"Remove __nonnull (in favor of _Nonnull).\"
am: 3b4e11faa8

Change-Id: I5b844da400d21cc64730065f2f9a2111a89ea560
2016-06-30 18:18:38 +00:00
Elliott Hughes
9eb3ae122f Remove __nonnull (in favor of _Nonnull).
It's a dangerous pain in the ass, and we're only using it in one place, and
that's a mistake too.

Change-Id: Ida1d1286aaa1343bdee95fa092fcb45ff3258f77
2016-06-30 10:37:03 -07:00
Pirama Arumuga Nainar
b2f5a58866 Revert "Skip Clang's integrated-as for hand-coded assembly"
This reverts commit 8d414dd2b1.

Reverting this since https://android-review.googlesource.com/#/c/244800/ adds -fno-integrated-as globally.

Change-Id: I29f53a385c16f44ead5dc744b0f2dd18a4af1731
2016-06-30 00:16:54 +00:00
Josh Gao
d7fc79ad53 Merge changes I98c9329f,I40936f7b,I09d20ff1
am: 1159c196db

Change-Id: Id118e7961eaeb3fa3f7c40abcbf158e45bee32f6
2016-06-29 21:56:02 +00:00
Treehugger Robot
1159c196db Merge changes I98c9329f,I40936f7b,I09d20ff1
* changes:
  Defer registration of the arc4random fork-detect handler.
  Make getpid work before the main thread is initialized.
  Take the arc4random lock before forking.
2016-06-29 21:45:35 +00:00
Josh Gao
c80ffece02 Defer registration of the arc4random fork-detect handler.
Previously, arc4random would register a fork-detecting pthread_atfork
handler to not have to call getpid() after a fork. pthread_atfork uses
pthread_mutex_lock, which requires the current thread to be initialized,
preventing the use of arc4random for initializing the global stack guard,
which needs to happen before the main thread has been initialized.

Extract the arc4random fork-detection flag and use the existing
arc4random fork handler to set it.

Bug: http://b/29622562
Change-Id: I98c9329fa0e489c3f78cad52747eaaf2f5226b80
2016-06-28 15:52:59 -07:00
Josh Gao
3e45901439 Make getpid work before the main thread is initialized.
Bug: http://b/29622562
Test: code dependent on this change no longer crashes
Change-Id: I40936f7b35d9e58182aeb2e34e52f54088700825
2016-06-28 15:52:59 -07:00
Josh Gao
250667aaf6 Take the arc4random lock before forking.
Bug: http://b/24675038
Test: stepped through a fork call in gdb
Change-Id: I09d20ff1d103d0c005f2a0cdd9b0a8710ab2392c
2016-06-28 15:52:59 -07:00
Pirama Arumuga Nainar
476b301eb1 Merge \"Skip Clang\'s integrated-as for hand-coded assembly\"
am: 9158386758

Change-Id: Iccc7a425b1b68903db309efb8385e19ee8edeb4f
2016-06-27 22:48:43 +00:00
Treehugger Robot
9158386758 Merge "Skip Clang's integrated-as for hand-coded assembly" 2016-06-27 22:39:49 +00:00
Pirama Arumuga Nainar
8d414dd2b1 Skip Clang's integrated-as for hand-coded assembly
Bug: http://b/28149048
Bug: http://b/29771478

Clang recently switched to using integrated assembler for Mips.
However, it fails to compile some of the hand-coded assembly files in
bionic.  Disable integrated-as for the time being.

Change-Id: I2eed4391f6827224da74383387bdd9105de5a857
2016-06-27 15:09:05 -07:00
Neil Fuller
365dbece7f Merge \"Update timezone data to 2016e\"
am: bb400855c3

Change-Id: Ideb25d2e0d74e9e73d38ecaa5300e82b85a01972
2016-06-24 09:42:08 +00:00
Neil Fuller
325b14a76e Update timezone data to 2016e
Changes affecting future time stamps

    Africa/Cairo observes DST in 2016 from July 7 to the end of October.
    Guess October 27 and 24:00 transitions. (Thanks to Steffen Thorsen.)
    For future years, guess April's last Thursday to October's last
    Thursday except for Ramadan.

  Changes affecting past time stamps

    Locations while uninhabited now use '-00', not 'zzz', as a
    placeholder time zone abbreviation.  This is inspired by Internet
    RFC 3339 and is more consistent with numeric time zone
    abbreviations already used elsewhere.  The change affects several
    arctic and antarctic locations, e.g., America/Cambridge_Bay before
    1920 and Antarctica/Troll before 2005.

    Asia/Baku's 1992-09-27 transition from +04 (DST) to +04 (non-DST) was
    at 03:00, not 23:00 the previous day.  (Thanks to Michael Deckers.)

Bug: 29354265
Test: Ran CTS/android.core.tests.libcore.package.harmony_java_util
Test: Ran CTS/android.core.tests.libcore.package.harmony_java_text
Test: Ran CTS/android.core.tests.libcore.package.libcore
(cherry picked from commit 1b0ee2041c)

Change-Id: I00b892b160769faae6fc8e0df2a58211a43bc1a0
2016-06-23 16:47:20 +01:00
Elliott Hughes
68ea651461 Merge \\"Don\\'t expose all BSD extensions.\\" am: 112be469bb
am: 8d9b692c4f

Change-Id: If6eedc1078aa2f760147a48382d22ad01feaa80b
2016-06-14 00:15:36 +00:00
Elliott Hughes
9c8d711aa5 Don't expose all BSD extensions.
Just expose the ones that bionic historically leaked.

Also, many of the M_* constants in <math.h> are actually POSIX.

Change-Id: I6275df84c5866b872b71f1c8ed14e2aada12b793
2016-06-13 14:14:43 -07:00
Josh Gao
b1b036f845 Merge \\"Update symbol versions.\\" am: c713adeca1
am: acd0d2f612

Change-Id: I671c3eb7aab7494ae67bb82ef49d15c61e0916b8
2016-06-13 08:07:51 +00:00
Josh Gao
95fa26e590 Update symbol versions.
Bug: http://b/28178111
Change-Id: I8e9fb919d96693dd320962775e991caf5aeb0107
2016-06-10 17:50:14 -07:00
Elliott Hughes
548453f52e Merge \\"Rationalize visibility.\\" am: 2ed5852759
am: a82358224f

Change-Id: I5154c5fe8e7d5745dd4bfe07a217f47ae8e4a7c4
2016-06-10 20:50:51 +00:00
Treehugger Robot
2ed5852759 Merge "Rationalize visibility." 2016-06-10 20:41:16 +00:00
Elliott Hughes
0766784b71 Merge \\"Remove obsolete GCC workaround.\\" am: 5e02bde75d
am: 9050d35b5b

Change-Id: I9bd8134531594aebeb5a704398ae3b1ec30939c7
2016-06-10 20:40:59 +00:00
Elliott Hughes
213584bb9d Remove obsolete GCC workaround.
bionic is no longer built with GCC.

Change-Id: If01c53d8f6ec7e801bfcdc61775cc24356eb8434
2016-06-10 12:49:04 -07:00
Christopher Ferris
ddb6314c7d Merge \\"Fix the SIZE_T_MAX SSIZE_MAX defines.\\" am: 93bae32c27
am: ed392f649f

Change-Id: I09d699b124a6372928434b048224ebf1dfe4db38
2016-06-10 00:50:26 +00:00
Elliott Hughes
3ba55f8022 Rationalize visibility.
If it's C or POSIX, it's in. If it's BSD or GNU, it's guarded by __USE_BSD
or __USE_GNU.

Bug: https://code.google.com/p/android/issues/detail?id=194631
Change-Id: Ife51a21c2b37b060db56780d29c929805b199cb6
2016-06-09 17:40:19 -07:00
Treehugger Robot
93bae32c27 Merge "Fix the SIZE_T_MAX SSIZE_MAX defines." 2016-06-10 00:35:38 +00:00
Christopher Ferris
47fcffff60 Fix the SIZE_T_MAX SSIZE_MAX defines.
This should not affect the underlying values, just the types used
by the defines.

This fixes any warnings where code does something like:

  printf("%zx", SIZE_T_MAX);

Change-Id: I4beb6d382f30261e4fe133a88fb503984911326d
2016-06-09 16:35:37 -07:00
Elliott Hughes
bc3a6a9573 Merge \\"Add ctermid.\\" am: f3c39b26b5
am: 8d4f7acfe9

Change-Id: I13abb53b3e759f69721ecc6b33cffdb61011e597
2016-06-09 23:31:47 +00:00
Elliott Hughes
20788aec00 Add ctermid.
Change-Id: I7c7c815c2725df222932db923632c8b6419741ab
2016-06-09 15:16:32 -07:00
Elliott Hughes
a5e7a624b6 Merge \\"Add futimes, futimesat, and lutimes.\\" am: 70d99a1053
am: fe25bf8fe5

Change-Id: I5f1e4ddcc7e9448629f520e69e5957ce3551be13
2016-06-09 17:50:23 +00:00
Elliott Hughes
449eff02d2 Add futimes, futimesat, and lutimes.
Spotted these while cleaning up <sys/cdefs.h> --- if we remove __USE_XOPEN2K8,
libchrome decides you "must" have futimes. Adding the missing functions (all
just alternative interfaces to utimensat(2) system call) lets us clean up
without breaking anything.

Change-Id: If44fab08ee3de0e31066d650d128a3c96323529b
2016-06-08 19:51:20 -07:00
Elliott Hughes
ab75e6b380 Merge \\"Move /vendor/bin down with /vendor/xbin.\\" am: cf4c3649ad
am: 98c495ed6a

Change-Id: Ia17103fde70d455b048b1f4e3be43a08f8480eaf
2016-06-08 19:58:59 +00:00
Elliott Hughes
900bd02b65 Merge \\"More C compatibility.\\" am: 34985b60c1
am: be5dbd8bb8

Change-Id: If07051357cf971774145180bf5a187b610d423d7
2016-06-08 19:56:28 +00:00
Elliott Hughes
cf4c3649ad Merge "Move /vendor/bin down with /vendor/xbin." 2016-06-08 19:53:21 +00:00
Elliott Hughes
409e48add1 More C compatibility.
Add C11 static_assert to <assert.h>. Remove uses of __dead while we're there:
__noreturn already does the same thing on those functions.

Fix <uchar.h> so it works from C.

<stdalign.h> and <stdnoreturn.h> are provided by clang, so there's nothing
for us to do.

Bug: http://b/29178582
Change-Id: Iebc46223868729a26d1a61eb125b76cbcb83a22d
2016-06-08 10:52:15 -07:00
Elliott Hughes
8cabd86c43 Move /vendor/bin down with /vendor/xbin.
The intention is that /vendor/*bin _extends_ rather than overrides.

Change-Id: Iad7db78f653345d79aa6f87abe0a3c2a797f71a3
2016-06-08 10:17:26 -07:00