OSDN Git Service

android-x86/bionic.git
8 years agoStore DNS server count in resolv_cache.
Pierre Imai [Mon, 18 Apr 2016 02:42:14 +0000 (11:42 +0900)]
Store DNS server count in resolv_cache.

Instead of keeping a sentinel after nameservers[], nsaddrinfo[] and
nstats[], store the server count in the structure, freeing up memory and
eliminating the need to enumerate the server count every time
_resolv_is_nameservers_equal_locked() is invoked.

Also increase MAXNS from 3 to 4.

BUG: 28153323
Change-Id: I11a7257af695157c9e32019cd00c67b535b63c75

8 years agoMerge "Update sanitize property format"
Colin Cross [Tue, 19 Apr 2016 22:42:04 +0000 (22:42 +0000)]
Merge "Update sanitize property format"

8 years agoMerge "Add malloc debug documentation."
Christopher Ferris [Tue, 19 Apr 2016 17:51:41 +0000 (17:51 +0000)]
Merge "Add malloc debug documentation."

8 years agoMerge "Fix ftw/nftw to only report unreadable directories once."
Elliott Hughes [Tue, 19 Apr 2016 16:14:23 +0000 (16:14 +0000)]
Merge "Fix ftw/nftw to only report unreadable directories once."

8 years agoMerge "Small fixes to malloc debug."
Christopher Ferris [Mon, 18 Apr 2016 21:24:26 +0000 (21:24 +0000)]
Merge "Small fixes to malloc debug."

8 years agoFix ftw/nftw to only report unreadable directories once.
Elliott Hughes [Sat, 16 Apr 2016 00:40:33 +0000 (17:40 -0700)]
Fix ftw/nftw to only report unreadable directories once.

Also remove all the copy & paste.

Bug: http://b/28197840
Change-Id: Ia43e9ffd838dabb511a6e54403d6f62066383e4d

8 years agoMerge "Revert "Temporary move __udivdi3 back to LIBC for x86""
Dimitry Ivanov [Sat, 16 Apr 2016 01:30:44 +0000 (01:30 +0000)]
Merge "Revert "Temporary move __udivdi3 back to LIBC for x86""

8 years agoRevert "Temporary move __udivdi3 back to LIBC for x86"
Dimitry Ivanov [Sat, 16 Apr 2016 00:58:12 +0000 (00:58 +0000)]
Revert "Temporary move __udivdi3 back to LIBC for x86"

This reverts commit bc02fb964a59983521c5f6cf80b1189434952780.

Bug: http://b/26406724
Bug: http://b/26423217
Change-Id: I8e3186fc76502d6818753e5d76a7c145207ed9a3

8 years agoUpdate sanitize property format
Colin Cross [Thu, 7 Apr 2016 20:27:24 +0000 (13:27 -0700)]
Update sanitize property format

Change-Id: I2fd35d6d85c7da7e96ffcefcd81350c836f0db9c

8 years agoAdd malloc debug documentation.
Christopher Ferris [Fri, 18 Mar 2016 21:29:51 +0000 (14:29 -0700)]
Add malloc debug documentation.

Bug: 27902359
Bug: 28218530
Change-Id: I4b0e83cba7a9a0da745599ad546559a2b30e70c5

8 years agoSmall fixes to malloc debug.
Christopher Ferris [Fri, 15 Apr 2016 21:13:52 +0000 (14:13 -0700)]
Small fixes to malloc debug.

- Change the printed name from pointer to allocation to be explicit about
  what is wrong.
- Change the signal to be SIGRTMAX - 19 instead of SIGRTMIN. This should
  prevent problems if we have to reserve other real time signals.

Bug: 28218530
Change-Id: Ic7d9c471929264d8e47bafaffc16e099840c9e71

8 years agoMerge changes Id8a3b7dc,I00ded8f9,I02f78ad7
Treehugger Robot [Fri, 15 Apr 2016 20:59:36 +0000 (20:59 +0000)]
Merge changes Id8a3b7dc,I00ded8f9,I02f78ad7

* changes:
  Make the legacy inline headers compile standalone.
  Don't redefine __ANDROID_API__.
  Move <sys/_sigdefs.h> and <sys/_errdefs.h> to private.

8 years agoMake the legacy inline headers compile standalone.
Josh Gao [Thu, 14 Apr 2016 00:18:20 +0000 (17:18 -0700)]
Make the legacy inline headers compile standalone.

It's useful to have the legacy inlines compile by themselves, both to
make header unification easier, and to ensure that the inline versions
match the regular declarations. Notably, this wasn't true for
sigismember, which took a const sigset_t* in the regular header, and
sigset_t* in the inline version.

Bug: http://b/28178111
Change-Id: Id8a3b7dcb1bfa61eed93c9fb50d3192744f8bef5

8 years agoMerge "Remove dangling links in secondary namespaces"
Dimitry Ivanov [Thu, 14 Apr 2016 19:47:57 +0000 (19:47 +0000)]
Merge "Remove dangling links in secondary namespaces"

8 years agoRemove dangling links in secondary namespaces
Dimitry Ivanov [Mon, 11 Apr 2016 19:42:58 +0000 (12:42 -0700)]
Remove dangling links in secondary namespaces

linker didn't remove link to the soinfo from shared
namespaces on soinfo_unload, because it didn't keep
record of all namespaces the library is added to.

This change adds test for this and also fixes the
problem by introducing list of secondary namespaces
to soinfo, which is used to remove soinfo in
soinfo::remove_all_links().

Bug: http://b/28115950
Change-Id: Ifbf6e54f92fa6e88f86b6a8dd6dc22d4553afd22

8 years agoMerge "linker: remove unnecessary reset of constructors_called flag"
Treehugger Robot [Thu, 14 Apr 2016 04:30:54 +0000 (04:30 +0000)]
Merge "linker: remove unnecessary reset of constructors_called flag"

8 years agoDon't redefine __ANDROID_API__.
Josh Gao [Thu, 14 Apr 2016 00:16:47 +0000 (17:16 -0700)]
Don't redefine __ANDROID_API__.

Bug: http://b/28178111
Change-Id: I00ded8f90694d9ed28f3b4c97778635f5a564592

8 years agoMove <sys/_sigdefs.h> and <sys/_errdefs.h> to private.
Josh Gao [Thu, 14 Apr 2016 00:08:43 +0000 (17:08 -0700)]
Move <sys/_sigdefs.h> and <sys/_errdefs.h> to private.

Bug: http://b/28067717
Change-Id: I02f78ad7293a15ff45e35e9c20f60d3d023931eb

8 years agoMerge "Move linker-namespace functions to LIBC_PLATFORM"
Treehugger Robot [Thu, 14 Apr 2016 00:36:44 +0000 (00:36 +0000)]
Merge "Move linker-namespace functions to LIBC_PLATFORM"

8 years agoMove linker-namespace functions to LIBC_PLATFORM
Dimitry Ivanov [Wed, 13 Apr 2016 22:01:37 +0000 (15:01 -0700)]
Move linker-namespace functions to LIBC_PLATFORM

Bug: http://b/28174921
Change-Id: I089dbeeea813fc2128b9c2f6268a578d23a1954a
(cherry picked from commit 7095da8d3c0f45e41aff5ca3d61aa7c442e21bdf)

8 years agolinker: remove unnecessary reset of constructors_called flag
Dimitry Ivanov [Wed, 13 Apr 2016 21:47:36 +0000 (14:47 -0700)]
linker: remove unnecessary reset of constructors_called flag

linker doesn't call d-tors for RTLD_NODELETE libraries. There is
no need in reseting this flag in call_destructors (which is called
from soinfo_unload).

Change-Id: I3ed03fa7207b7acf598067276fbb8874e29b5e53

8 years agoMerge "linker: unload RTLD_NODELETE libraries when loading fails"
Treehugger Robot [Wed, 13 Apr 2016 20:55:20 +0000 (20:55 +0000)]
Merge "linker: unload RTLD_NODELETE libraries when loading fails"

8 years agolinker: unload RTLD_NODELETE libraries when loading fails
Dimitry Ivanov [Wed, 13 Apr 2016 18:46:59 +0000 (11:46 -0700)]
linker: unload RTLD_NODELETE libraries when loading fails

Linker was not unloading libraries marked with RTLD_NODELETE
even when there was a error on load. For example when one of
dt_needed libraries was not found.

Bug: http://b/27911891
Change-Id: Ibc0bf110aa41fbfdc9f327ad8c364f2e3600af71
(cherry picked from commit 79abce42146b27d523f309e0a1bc9f50175191cb)

8 years agoMerge "Small refactor."
Christopher Ferris [Tue, 12 Apr 2016 22:39:48 +0000 (22:39 +0000)]
Merge "Small refactor."

8 years agoSmall refactor.
Christopher Ferris [Fri, 8 Apr 2016 00:14:53 +0000 (17:14 -0700)]
Small refactor.

- Move all ScopedDisableDebugCalls into the debug_XXX calls. This avoids
any issues that might arise where every part of the code needs to properly
guard anything that might allocate. Instead everything is already guarded.
- Add a pointer to debug_data in all of the XXData classes. This avoids
calling individual functions passing in the debug_data pointer.
- Flip the NO_HEADER_OPTIONS to an explicit HEADER_OPTIONS list since fewer
options actually require a header.
- Move the extern of g_debug to the DebugData.h header.

Change-Id: Ia213a391b4a44d9ce122a709d09fe4f1b5426f36

8 years agoMerge "Add a test for pthread_setname_np on another thread in a PR_SET_DUMPABLE 0...
Elliott Hughes [Tue, 12 Apr 2016 21:59:12 +0000 (21:59 +0000)]
Merge "Add a test for pthread_setname_np on another thread in a PR_SET_DUMPABLE 0 process."

8 years agoMerge "Rename deps property to objs in cc_objects"
Colin Cross [Tue, 12 Apr 2016 21:16:04 +0000 (21:16 +0000)]
Merge "Rename deps property to objs in cc_objects"

8 years agoMerge "Update Android.bp to match Android.mk"
Treehugger Robot [Tue, 12 Apr 2016 19:10:34 +0000 (19:10 +0000)]
Merge "Update Android.bp to match Android.mk"

8 years agoRename deps property to objs in cc_objects
Colin Cross [Mon, 11 Apr 2016 21:34:18 +0000 (14:34 -0700)]
Rename deps property to objs in cc_objects

The deps property is handled by blueprint, which doesn't give the
flexibilty of handling it within soong.  Switch to using objs instead.

Change-Id: Iddc25b0ba03fe79ba0533ef6fde33a5e71bcc8f0

8 years agoUpdate Android.bp to match Android.mk
Colin Cross [Mon, 11 Apr 2016 21:51:38 +0000 (14:51 -0700)]
Update Android.bp to match Android.mk

Change-Id: I002242ab36b6d0d8ad833543c07945f64175a613

8 years agoMerge "Update Android.bp to match Android.mk"
Colin Cross [Mon, 11 Apr 2016 21:23:56 +0000 (21:23 +0000)]
Merge "Update Android.bp to match Android.mk"

8 years agoAdd a test for pthread_setname_np on another thread in a PR_SET_DUMPABLE 0 process.
Elliott Hughes [Mon, 11 Apr 2016 19:43:05 +0000 (12:43 -0700)]
Add a test for pthread_setname_np on another thread in a PR_SET_DUMPABLE 0 process.

Bug: http://b/28051133
Change-Id: I9a578333815afa6bdfc1e3c3eea430a15957304f

8 years agoMerge "Remove fabs, fabsf, fabsl inlines from <math.h>."
Josh Gao [Mon, 11 Apr 2016 18:20:26 +0000 (18:20 +0000)]
Merge "Remove fabs, fabsf, fabsl inlines from <math.h>."

8 years agoMerge "Add test for IRELATIVE resolution with RTLD_LAZY"
Dimitry Ivanov [Sat, 9 Apr 2016 01:40:32 +0000 (01:40 +0000)]
Merge "Add test for IRELATIVE resolution with RTLD_LAZY"

8 years agoRemove fabs, fabsf, fabsl inlines from <math.h>.
Josh Gao [Fri, 8 Apr 2016 18:43:33 +0000 (11:43 -0700)]
Remove fabs, fabsf, fabsl inlines from <math.h>.

These inline definitions appear to be a workaround for a compiler bug
that either never existed, or has been resolved since then.

Bug: http://b/28067717
Change-Id: Ic1cd0f26403f234a6ab1fa273a9dd23e7f9fee8f

8 years agoAdd test for IRELATIVE resolution with RTLD_LAZY
Dimitry Ivanov [Fri, 8 Apr 2016 18:47:53 +0000 (11:47 -0700)]
Add test for IRELATIVE resolution with RTLD_LAZY

Even though bionic linker does not support RTLD_LAZY - it
is good to know that its behavior matches glibc.

Bug: http://b/27930475
Change-Id: I1a47263aaa3dc44f9ac61fe77deb55a21e7f881a

8 years agoMerge changes Ife4692e4,I7304cc1d,If19653d0,I769ca792,I93625d19, ...
Josh Gao [Fri, 8 Apr 2016 17:59:23 +0000 (17:59 +0000)]
Merge changes Ife4692e4,I7304cc1d,If19653d0,I769ca792,I93625d19, ...

* changes:
  Move <sys/sysconf.h> to <bits/sysconf.h>.
  Remove mbstowcs from <wchar.h>.
  Extract getopt and friends to <bits/getopt.h>
  Remove declaration of unlinkat from <fcntl.h>.
  Extract ioctl to <bits/ioctl.h>.
  Extract fcntl to <bits/fcntl.h>.
  Extract strcasecmp and friends to <bits/strcasecmp.h>.
  Make <bits/lockf.h> compile standalone.
  Make <android/dlext.h> compile standalone.
  Make the network headers compile standalone.
  Remove duplicate declaration of mlock, munlock.

8 years agoMove <sys/sysconf.h> to <bits/sysconf.h>.
Josh Gao [Thu, 7 Apr 2016 23:33:30 +0000 (16:33 -0700)]
Move <sys/sysconf.h> to <bits/sysconf.h>.

Also remove unneeded declaration of sysconf in <unistd.h>.

Bug: http://b/28067717
Change-Id: Ife4692e48ca97480e422db0686c61133e1d619aa

8 years agoRemove mbstowcs from <wchar.h>.
Josh Gao [Thu, 7 Apr 2016 23:38:22 +0000 (16:38 -0700)]
Remove mbstowcs from <wchar.h>.

Glibc doesn't export the function here, and adding a <bits/...> header
for this function seems unnecessary.

Bug: http://b/28067717
Change-Id: I7304cc1daca14585c85d5c783365c4a43779ff2c

8 years agoExtract getopt and friends to <bits/getopt.h>
Josh Gao [Thu, 7 Apr 2016 23:37:49 +0000 (16:37 -0700)]
Extract getopt and friends to <bits/getopt.h>

Bug: http://b/28067717
Change-Id: If19653d0da8b964c43768aa1051f9c926b3c6acb

8 years agoRemove declaration of unlinkat from <fcntl.h>.
Josh Gao [Thu, 7 Apr 2016 22:28:40 +0000 (15:28 -0700)]
Remove declaration of unlinkat from <fcntl.h>.

Glibc doesn't expose unlinkat in fcntl.h, this probably came about
because the man page for unlinkat mentions `#include <fcntl.h>` for the
AT_* constants that actually are defined there.

Bug: http://b/28067717
Change-Id: I769ca792a189bfea212b1d75096274acb0b7cfdb

8 years agoExtract ioctl to <bits/ioctl.h>.
Josh Gao [Thu, 7 Apr 2016 21:19:03 +0000 (14:19 -0700)]
Extract ioctl to <bits/ioctl.h>.

Bug: http://b/28067717
Change-Id: I93625d19fa5a033ab22c650d536e98674f0a8d9d

8 years agoExtract fcntl to <bits/fcntl.h>.
Josh Gao [Thu, 7 Apr 2016 21:16:30 +0000 (14:16 -0700)]
Extract fcntl to <bits/fcntl.h>.

Bug: http://b/28067717
Change-Id: Id8c19056244660a6e0276a5614282af8d41fbe1e

8 years agoExtract strcasecmp and friends to <bits/strcasecmp.h>.
Josh Gao [Thu, 7 Apr 2016 20:39:49 +0000 (13:39 -0700)]
Extract strcasecmp and friends to <bits/strcasecmp.h>.

Bug: http://b/28067717
Change-Id: I76bab098d4c35d07a7a108055c43c820087f9253

8 years agoMake <bits/lockf.h> compile standalone.
Josh Gao [Thu, 7 Apr 2016 20:38:48 +0000 (13:38 -0700)]
Make <bits/lockf.h> compile standalone.

Bug: http://b/28067717
Change-Id: Ida9f251ff23f9e32dcd0c38eb23b6a3bffea322c

8 years agoMake <android/dlext.h> compile standalone.
Josh Gao [Thu, 7 Apr 2016 18:21:47 +0000 (11:21 -0700)]
Make <android/dlext.h> compile standalone.

Bug: http://b/28067717
Change-Id: If087e0c931c69bda34263ea8e0b2dc46d932b2af

8 years agoUpdate Android.bp to match Android.mk
Colin Cross [Thu, 7 Apr 2016 20:24:50 +0000 (13:24 -0700)]
Update Android.bp to match Android.mk

Change-Id: I0d9bb2b98838184856da81499a64334e0b554617

8 years agoMake the network headers compile standalone.
Josh Gao [Thu, 7 Apr 2016 18:16:35 +0000 (11:16 -0700)]
Make the network headers compile standalone.

Bug: http://b/28067717
Change-Id: I0f69c6cba0eb0df2fe68f458ba5aa81fe8e6434c

8 years agoRemove duplicate declaration of mlock, munlock.
Josh Gao [Thu, 7 Apr 2016 17:59:45 +0000 (10:59 -0700)]
Remove duplicate declaration of mlock, munlock.

Bug: http://b/28067717
Change-Id: I4fe5a4368e5112a5d6aed5de9549155d3352962a

8 years agoMerge "Add trivial no-op <nl_types.h>."
Elliott Hughes [Thu, 7 Apr 2016 15:49:02 +0000 (15:49 +0000)]
Merge "Add trivial no-op <nl_types.h>."

8 years agoAdd trivial no-op <nl_types.h>.
Elliott Hughes [Thu, 7 Apr 2016 00:14:45 +0000 (17:14 -0700)]
Add trivial no-op <nl_types.h>.

Needed to build OpenMP.

Bug: http://b/27617302
Change-Id: Iac15c84ead6f5d5274cfdb2d6d4a4ec0072244bb

8 years agoMerge "Teach our script to ignore more dead POSIX stuff."
Elliott Hughes [Wed, 6 Apr 2016 21:22:44 +0000 (21:22 +0000)]
Merge "Teach our script to ignore more dead POSIX stuff."

8 years agoMerge "fix oem_XXXX ids to incorporate both ranges"
Mark Salyzyn [Wed, 6 Apr 2016 21:19:12 +0000 (21:19 +0000)]
Merge "fix oem_XXXX ids to incorporate both ranges"

8 years agofix oem_XXXX ids to incorporate both ranges
Mark Salyzyn [Tue, 5 Apr 2016 16:24:59 +0000 (09:24 -0700)]
fix oem_XXXX ids to incorporate both ranges

The XXXX now lines up to the underlying uid and has no offset.
Work with AID_OEM_RESERVED uids.

Test uses hard coded values to catch changes in the API expectations
that may occur in private/android_filesystem_config.h.

SideEffects: names change, some product dependencies.

Bug: 27999086
Change-Id: Ic2b4c36de74ae009a44e14711c75834293828207

8 years agoMerge "Fix b64_pton."
Elliott Hughes [Wed, 6 Apr 2016 21:02:34 +0000 (21:02 +0000)]
Merge "Fix b64_pton."

8 years agoTeach our script to ignore more dead POSIX stuff.
Elliott Hughes [Wed, 6 Apr 2016 20:29:22 +0000 (13:29 -0700)]
Teach our script to ignore more dead POSIX stuff.

Change-Id: Ic29451b7110ac35291125d427e1ae6fd334bdbd5

8 years agoFix b64_pton.
Elliott Hughes [Wed, 6 Apr 2016 18:56:41 +0000 (11:56 -0700)]
Fix b64_pton.

This was fixed upstream years ago. While we're here, let's switch to the
OpenBSD copy (because that's our majority upstream BSD, not because they
found and fixed this bug first).

Bug: http://b/28035006
Change-Id: I53dd915a8122bfd7a6d58f01f9902d1586a47e23

8 years agoMerge "Add <sys/quota.h>."
Elliott Hughes [Wed, 6 Apr 2016 18:08:34 +0000 (18:08 +0000)]
Merge "Add <sys/quota.h>."

8 years agoAdd <sys/quota.h>.
Elliott Hughes [Wed, 6 Apr 2016 06:01:42 +0000 (23:01 -0700)]
Add <sys/quota.h>.

It turns out that at least the Nexus 9 kernel is built without CONFIG_QUOTA.
If we decide we're going to mandate quota functionality, I'm happy for us to
be a part of CTS that ensures that happens, but I don't want to be first, so
there's not much to test here other than "will it compile?". The strace
output looks right though.

Bug: http://b/27948821
Bug: http://b/27952303
Change-Id: If667195eee849ed17c8fa9110f6b02907fc8fc04

8 years agoMerge "Rename the <grp.h>/<pwd.h> tests to reflect that they're no longer in stubs...
Elliott Hughes [Wed, 6 Apr 2016 17:00:45 +0000 (17:00 +0000)]
Merge "Rename the <grp.h>/<pwd.h> tests to reflect that they're no longer in stubs.cpp."

8 years agoMerge "Break up the rest of stubs.cpp."
Elliott Hughes [Wed, 6 Apr 2016 16:47:33 +0000 (16:47 +0000)]
Merge "Break up the rest of stubs.cpp."

8 years agoRename the <grp.h>/<pwd.h> tests to reflect that they're no longer in stubs.cpp.
Elliott Hughes [Wed, 6 Apr 2016 15:38:21 +0000 (08:38 -0700)]
Rename the <grp.h>/<pwd.h> tests to reflect that they're no longer in stubs.cpp.

Bug: http://b/27999086
Change-Id: I3255ad5861a705beeb9b462e22f79ae1e5a85a79

8 years agoBreak up the rest of stubs.cpp.
Elliott Hughes [Wed, 6 Apr 2016 15:34:58 +0000 (08:34 -0700)]
Break up the rest of stubs.cpp.

Bug: http://b/27999086
Change-Id: Ibcc2c5171d43ebd26b486642052738473f3b7714

8 years agoMerge "bionic: split out getpwnam and friends"
Mark Salyzyn [Wed, 6 Apr 2016 15:05:41 +0000 (15:05 +0000)]
Merge "bionic: split out getpwnam and friends"

8 years agobionic: split out getpwnam and friends
Mark Salyzyn [Tue, 5 Apr 2016 16:09:46 +0000 (09:09 -0700)]
bionic: split out getpwnam and friends

- added grp_pwd.cpp containing POSIX passwd and group functions,
  colocated because they share with the Android ID (AID) roots.
- stubs.cpp contains all the truly empty functions (network and
  protocol accessors)

Bug: 27999086
Change-Id: I036f9e2dd246f48302cb7c97d23176fa24d19c33

8 years agoMerge "Reduce the amount of logging in Bionic's resolver."
Pierre Imai [Wed, 6 Apr 2016 03:01:51 +0000 (03:01 +0000)]
Merge "Reduce the amount of logging in Bionic's resolver."

8 years agoReduce the amount of logging in Bionic's resolver.
Pierre Imai [Wed, 6 Apr 2016 02:23:47 +0000 (11:23 +0900)]
Reduce the amount of logging in Bionic's resolver.

Change-Id: I250d9a352f1fa0cafef349d0e23f72a9dd8e399d

8 years agoMerge "Do not test ifunc on mips"
Dimitry Ivanov [Wed, 6 Apr 2016 00:38:23 +0000 (00:38 +0000)]
Merge "Do not test ifunc on mips"

8 years agoDo not test ifunc on mips
Dimitry Ivanov [Wed, 6 Apr 2016 00:12:01 +0000 (17:12 -0700)]
Do not test ifunc on mips

This commit fixes mips build

Bug: http://b/28009632
Change-Id: I5c657b31947791aea4cc02a2fc4ede6d0ecde851

8 years agoMerge "linker: Add unit-test for sleb128_decoder"
Dimitry Ivanov [Wed, 6 Apr 2016 00:15:02 +0000 (00:15 +0000)]
Merge "linker: Add unit-test for sleb128_decoder"

8 years agolinker: Add unit-test for sleb128_decoder
Dimitry Ivanov [Tue, 5 Apr 2016 20:29:50 +0000 (13:29 -0700)]
linker: Add unit-test for sleb128_decoder

Add missing test for sleb128_decoder. Also remove
dependency to static library because it exposes malloc/free
which interfere with libc.so malloc/free causing test to crash.

Change-Id: Iedd3268011df9f67ed58c0b58c71f34e30370b23

8 years agoMerge "Add sync_file_range to <fcntl.h>."
Elliott Hughes [Tue, 5 Apr 2016 23:38:37 +0000 (23:38 +0000)]
Merge "Add sync_file_range to <fcntl.h>."

8 years agoAdd sync_file_range to <fcntl.h>.
Elliott Hughes [Tue, 5 Apr 2016 18:56:03 +0000 (11:56 -0700)]
Add sync_file_range to <fcntl.h>.

Bug: http://b/27952303
Change-Id: Idadfacd657ed415abc11684b9471e4e24c2fbf05

8 years agoMerge "Add missing prototype for readahead in <fcntl.h>."
Elliott Hughes [Tue, 5 Apr 2016 18:50:09 +0000 (18:50 +0000)]
Merge "Add missing prototype for readahead in <fcntl.h>."

8 years agoAdd missing prototype for readahead in <fcntl.h>.
Elliott Hughes [Tue, 5 Apr 2016 18:06:02 +0000 (11:06 -0700)]
Add missing prototype for readahead in <fcntl.h>.

Change-Id: Icfe85e9cf95c657b495c4e9cd10dec50b0b8f6db

8 years agoMerge "Add POSIX getsubopt(3)."
Elliott Hughes [Tue, 5 Apr 2016 18:03:56 +0000 (18:03 +0000)]
Merge "Add POSIX getsubopt(3)."

8 years agoMerge "Add SysV signal handling"
Elliott Hughes [Tue, 5 Apr 2016 17:01:23 +0000 (17:01 +0000)]
Merge "Add SysV signal handling"

8 years agoMerge "Fix off-by-one error in res_cache.c"
Pierre Imai [Tue, 5 Apr 2016 07:35:46 +0000 (07:35 +0000)]
Merge "Fix off-by-one error in res_cache.c"

8 years agoFix off-by-one error in res_cache.c
Pierre Imai [Tue, 5 Apr 2016 06:49:08 +0000 (15:49 +0900)]
Fix off-by-one error in res_cache.c

Change-Id: I58264902c123b3bc0d392d17837aa537ca0a3ca2

8 years agoMerge "Ignore unreliable DNS servers."
Pierre Imai [Tue, 5 Apr 2016 03:44:35 +0000 (03:44 +0000)]
Merge "Ignore unreliable DNS servers."

8 years agoIgnore unreliable DNS servers.
Pierre Imai [Mon, 22 Feb 2016 08:50:41 +0000 (17:50 +0900)]
Ignore unreliable DNS servers.

Collect statistics about DNS query success state and delay. Ignore
servers that have been tried at least five times and have a success rate
of < 0.25. Retry these servers once every 180s.

Bug: 25731675
Change-Id: I78e24f43e388dca82fb81835e1796f4c7dce8da3

8 years agoMerge "Make it harder to use a broken legacy function by accident."
Elliott Hughes [Tue, 5 Apr 2016 00:36:08 +0000 (00:36 +0000)]
Merge "Make it harder to use a broken legacy function by accident."

8 years agoAdd POSIX getsubopt(3).
Elliott Hughes [Tue, 5 Apr 2016 00:34:04 +0000 (17:34 -0700)]
Add POSIX getsubopt(3).

Bug: http://b/27952303
Change-Id: I8a816477545dadcbd5c055714e76263574446b6f

8 years agoMerge "Format code to calculate thread stack and signal stack."
Yabin Cui [Tue, 5 Apr 2016 00:08:05 +0000 (00:08 +0000)]
Merge "Format code to calculate thread stack and signal stack."

8 years agoAdd SysV signal handling
Greg Hackmann [Mon, 29 Feb 2016 20:35:33 +0000 (12:35 -0800)]
Add SysV signal handling

Implement the legacy SysV signal handling functions sighold(),
sigignore(), sigpause(), sigrelse(), and sigset() in terms of the newer
POSIX signal APIs.  As of POSIX 2013 the SysV signal APIs are deprecated
but still required.

Change-Id: I4ca40e3d706605a7d1a30dc76c78b2b24586387d
Signed-off-by: Greg Hackmann <ghackmann@google.com>
8 years agoFormat code to calculate thread stack and signal stack.
Yabin Cui [Thu, 31 Mar 2016 00:48:50 +0000 (17:48 -0700)]
Format code to calculate thread stack and signal stack.

The code to calculate thread stack and signal stack looks weird:
the thread stack size and signal stack size are related with
each other on 32-bit mode, but not on 64-bit mode. So change the
code to make the logic more resonable. This doesn't change anything
as we have defined SIGSTKSZ to 16K on arm64.

Bug: 28005110

Change-Id: I04d2488cfb96ee7e2d894d062c66cef950fec418

8 years agoMake it harder to use a broken legacy function by accident.
Elliott Hughes [Mon, 4 Apr 2016 23:15:37 +0000 (16:15 -0700)]
Make it harder to use a broken legacy function by accident.

This function only exists for backwards compatibility, so leave it as it was.

Bug: http://b/26944282
Change-Id: I31973d1402660933103ee2d815649ab9569e4dfc

8 years agoMerge "Update Android.bp with recent Android.mk changes"
Dan Willemsen [Mon, 4 Apr 2016 21:14:01 +0000 (21:14 +0000)]
Merge "Update Android.bp with recent Android.mk changes"

8 years agoMerge "Enable ifunc test for arm"
Dimitry Ivanov [Mon, 4 Apr 2016 20:25:21 +0000 (20:25 +0000)]
Merge "Enable ifunc test for arm"

8 years agoUpdate Android.bp with recent Android.mk changes
Dan Willemsen [Mon, 4 Apr 2016 20:18:46 +0000 (13:18 -0700)]
Update Android.bp with recent Android.mk changes

This ports Idb3d445e053c44180773f59774df19b324f6817f to Android.bp

Change-Id: Id5cdb450330792810b8eb61b3cab115ef046e55d

8 years agoMerge "Remove a workaround from stack_protector_test that's not needed in master."
Elliott Hughes [Mon, 4 Apr 2016 19:46:18 +0000 (19:46 +0000)]
Merge "Remove a workaround from stack_protector_test that's not needed in "

8 years agoMerge "Move math headers in with the other headers."
Elliott Hughes [Mon, 4 Apr 2016 18:41:05 +0000 (18:41 +0000)]
Merge "Move math headers in with the other headers."

8 years agoEnable ifunc test for arm
Dimitry Ivanov [Wed, 30 Mar 2016 23:44:48 +0000 (16:44 -0700)]
Enable ifunc test for arm

Bug: http://b/27930475
Change-Id: I1f9e7c5b9ffabfd77ae6ebd534938aef39ec7987

8 years agoMerge "Revert "[MIPS] Link .dex or .oat code lacking .MIPS.abiflags segment""
Dimitry Ivanov [Mon, 4 Apr 2016 16:49:21 +0000 (16:49 +0000)]
Merge "Revert "[MIPS] Link .dex or .oat code lacking .MIPS.abiflags segment""

8 years agoMerge "tests: allow brk to fail with ENOMEM"
Nick Kralevich [Sun, 3 Apr 2016 16:20:25 +0000 (16:20 +0000)]
Merge "tests: allow brk to fail with ENOMEM"

8 years agotests: allow brk to fail with ENOMEM
Daniel Micay [Thu, 31 Dec 2015 13:04:53 +0000 (08:04 -0500)]
tests: allow brk to fail with ENOMEM

Any caller of brk needs to handle failure by falling back to mmap as
there's no guarantee that other mappings are not placed above the brk
heap. Since jemalloc starts with mmap in the first place and dlmalloc
knows how to fall back to mmap, it's already a legacy API in Android.

Forcing it to succeed rules out stronger ASLR implementations where the
brk heap might not have any room to grow. It's also valid for the brk
implementation to simply return -1 with errno set to ENOMEM in every
case and that's a good way of finding anything relying on it. It would
make sense for it to be an optional kernel feature.

The brk heap is also not guaranteed to be initially page aligned. PaX
ASLR randomizes the internal bits. It was only mentioned in a comment to
explain the design of the test though.

Bug: 24233096
Change-Id: I16e9bc8677e796c73915b830b99b0ce39c02b31d

8 years agoMove math headers in with the other headers.
Elliott Hughes [Sat, 2 Apr 2016 15:36:33 +0000 (08:36 -0700)]
Move math headers in with the other headers.

Keeping them separate is a pain for the NDK, and doesn't help the platform.

Change-Id: I96b8beef307d4a956e9c0a899ad9315adc502582

8 years agoRemove a workaround from stack_protector_test that's not needed in master.
Elliott Hughes [Sat, 2 Apr 2016 04:02:25 +0000 (21:02 -0700)]
Remove a workaround from stack_protector_test that's not needed in 

The compiler in master doesn't leave a gap between the buffer and the stack
guard canary.

Bug: http://b/27815668
Change-Id: Iae6681683881055c2719d661a2179f5305c23135

8 years agoMerge "Fix the stack-protector test for x86/x86-64."
Elliott Hughes [Sat, 2 Apr 2016 04:01:54 +0000 (04:01 +0000)]
Merge "Fix the stack-protector test for x86/x86-64."

8 years agoFix the stack-protector test for x86/x86-64.
Elliott Hughes [Fri, 1 Apr 2016 21:51:10 +0000 (14:51 -0700)]
Fix the stack-protector test for x86/x86-64.

Built for fugu this was working fine, but built for generic x86/x86-64
the compiler was (a) optimizing out all the stack writes and (b) inserting
enough padding on x86-64 for the canary to be safely out of the way.

While here, let's tighten up this test so we test that it's sufficient to
only overwrite the buffer by one byte...

(cherry-pick of 6f90c1ac59eb4e7811b7b0e408615049c935c0a9.)

Bug: http://b/27815668
Change-Id: I80a646de4b30fd5c78df20fdaa7e3eb163585caf