Commit graph

16868 commits

Author SHA1 Message Date
Dimitry Ivanov
5fa5717674 Merge "Correctly handle the case of empty LD_PRELOAD entries" 2016-05-24 23:13:06 +00:00
Dimitry Ivanov
d799b2bb7e Correctly handle the case of empty LD_PRELOAD entries
Previous android versions ignored empty entries for LD_PRELOAD

Bug: http://b/28936779
Change-Id: I757478fe0c604ee378186511cb13b757fd9a9864
2016-05-24 14:45:46 -07:00
Treehugger Robot
d1c96e2159 Merge "Change use of /data to /data/local/tmp." 2016-05-23 21:39:22 +00:00
Treehugger Robot
878004f5b0 Merge "Run fsync tests on mutable filesystem." 2016-05-23 20:36:33 +00:00
Christopher Ferris
a948a4e050 Change use of /data to /data/local/tmp.
The unistd fsync/fdatasync were changed to use /data from /.
Unfortunately, this directory is unreadable unless you are root, so
change this path to /data/local/tmp.

Bug: 28885777
(cherry picked from commit 7e53843f7b)

Change-Id: I14514e985af8039ab63ac2bcf890f8d04dd82ccb
2016-05-23 12:53:42 -07:00
Shuhei Takahashi
2e6e99128a Run fsync tests on mutable filesystem.
The purpose of those tests is to ensure fsync succeeds for
directories. However, they try to call fsync for / (the root
filesystem) that is usually mounted read-only, which does not
make sense because the whole point of fsync is to flush
uncommitted changes to the filesystem.

In fact, some well-known read-only filesystems (e.g. squashfs)
does not support fsync, so these tests fail if we use such
filesystems as the root filesystem.

This patch changes the tests to call fsync against /data
instead. /data is a user data partition and should be always
mounted read-write.

Bug: 28681455

(cherry picked from commit cfa3262ce4)

Change-Id: I3e50f7b6ef07e96138711eef1f678f90cc9eb632
2016-05-23 12:53:16 -07:00
Dimitry Ivanov
ccfcc8ced7 Merge "Do not resolve caller_ns when it is not needed" 2016-05-23 19:35:45 +00:00
Treehugger Robot
c7e0ae064d Merge "Make all rt_sigtimedwait signatures match." 2016-05-23 19:16:26 +00:00
Elliott Hughes
8963dd337e Make all rt_sigtimedwait signatures match.
There's no change to the generated stubs, because the script only cares
that this is a pointer type, not what it's a pointer to.

Change-Id: I766720965f0f3d201fc90677a076b26870485377
2016-05-23 11:20:19 -07:00
Dimitry Ivanov
5240863ed5 Do not resolve caller_ns when it is not needed
create_namespace resolves caller namespace only
when caller did not explicitly specify parent namespace.

This saves about 25 microseconds for the case when
parent_namepsace is not null (for example when creating
second classloader for the app).

Bug: http://b/28801010
Change-Id: I50ded272c931db701e5a1d8c88ed5ffb13416539
2016-05-23 10:31:11 -07:00
Christopher Ferris
51ee871e19 Merge "Updated to v4.4.11 kernel headers." 2016-05-20 01:27:47 +00:00
Christopher Ferris
82ef6a19cb Updated to v4.4.11 kernel headers.
Change-Id: I6b55a921670d32d7bfff3c304d8001058409d3f7
2016-05-19 17:03:14 -07:00
Treehugger Robot
3c095578ee Merge "Do not check zip-entry validity on create_namespace" 2016-05-19 18:42:34 +00:00
Dimitry Ivanov
d2205a641c Do not check zip-entry validity on create_namespace
This operation is the most expensive one and since it is
unlikely that the zip-entry name is invalid (given that it
is constructed by the platform) - it can removed.

The worst case scenario is dlopen() of non-existing libraries
taking more time. And this use-case is not on the critical path.

Bug: http://b/28801010
Change-Id: I10a6b0bf342404ab72f0f5102ebf19f6c06ee6bf
(cherry picked from commit a5c1c8e820)
2016-05-19 10:47:23 -07:00
Treehugger Robot
7d99bd38e4 Merge "Force clang for bionic" 2016-05-18 21:58:59 +00:00
Colin Cross
5a22d3e13d Force clang for bionic
Bionic will only compile with clang, and Android.mk files force clang,
turn it on in Android.bp.

Change-Id: I9db06298adfeab4eeef031d88aa310776cad3af0
2016-05-18 14:06:22 -07:00
Treehugger Robot
42abf3d241 Merge "linker: Allow caller to specify parent namespace" 2016-05-17 22:43:01 +00:00
Dimitry Ivanov
49fbce11e6 Merge "Fix dlopen of main executable by absolute path" 2016-05-17 22:25:48 +00:00
Dimitry Ivanov
2ba1cf39ae Fix dlopen of main executable by absolute path
This CL adds initialization of inode for the main executable
which enables linker to resolve the correct soinfo when
application calls dlopen with absolute path to the
main executable.

Bug: http://b/28420266
Change-Id: I102e07bde454bd44c6e46075e3faeeb5092830d8
2016-05-17 13:55:46 -07:00
Dimitry Ivanov
fc2da53440 linker: Allow caller to specify parent namespace
This change enables apps to share libraries opened
with RTLD_GLOBAL between different classloader namespaces.

The new parameter to create_namespace allows native_loader
to instruct the linker to share libraries belonging to
global group from a specified namespace instead of
using the caller_ns.

Bug: http://b/28560538
Bug: https://code.google.com/p/android/issues/detail?id=208458
Change-Id: I5d0c62730bbed19cdeb16c7559c74aa262a2475f
2016-05-17 13:37:03 -07:00
Elliott Hughes
5df5884743 Merge "Regenerate NOTICE files." 2016-05-17 03:10:29 +00:00
Elliott Hughes
ecffdeb0e2 Merge "Stop including <machine/cpu-features.h>." 2016-05-17 03:06:48 +00:00
Elliott Hughes
382bd666e2 Stop including <machine/cpu-features.h>.
We're not looking at __ARM_ARCH__, because we don't support ARMv6.

Bug: http://b/18556103
Change-Id: I91fe096af697dc842a57e97515312e3530743678
2016-05-16 17:52:40 -07:00
Elliott Hughes
882b8afedc Regenerate NOTICE files.
Also clean up some near-miss copyright headers in libm, and remove
some cruft in <grp.h>/<pwd.h> that the script can't automatically
ignore since we stripped all the tabs in those files.

Change-Id: I10796c54dda1ceba87822ae0de26b5d71b54972b
2016-05-16 17:46:00 -07:00
Colin Cross
79d0281456 Merge "Use Android.soong.mk to handle mixed Android.mk and Android.bp dirs" 2016-05-17 00:42:17 +00:00
Elliott Hughes
c9a21334c5 Merge "Fix the <netinet/ether.h> tests." 2016-05-17 00:21:06 +00:00
Colin Cross
acf2c26bf6 Use Android.soong.mk to handle mixed Android.mk and Android.bp dirs
When building with soong Android.mk files are ignored in directories
that have Android.bp files.  Only parts of bionic have been converted to
Android.bp files, including some directories that have subdirectories
with Android.mk files.

Add Android.soong.mk files to include subdirectories to any directory
that has an Android.bp file but also has subdirectories with only
Android.mk files.

Change-Id: Ibd3c27d51c44f7a4b42dad0bc747e357b4ae34ca
2016-05-16 16:55:08 -07:00
Elliott Hughes
09e97e638d Fix the <netinet/ether.h> tests.
Looks like I never ran these even once :-(

Change-Id: Ie488dec229cddf59a4f526b3c4e674ad4334c088
2016-05-16 16:21:37 -07:00
Elliott Hughes
cb8ef17b07 Merge "Fix <resolv.h> and <netinet/tcp.h> so dnscap builds." 2016-05-16 21:59:50 +00:00
Elliott Hughes
20fc6ecf90 Merge "We have the _r ether_ntoa/ether_aton functions too." 2016-05-16 21:12:38 +00:00
Elliott Hughes
f021061a23 Fix <resolv.h> and <netinet/tcp.h> so dnscap builds.
Some guy on the internet complained that dnscap doesn't build out of the box.
Now it does.

Bug: http://b/27839637
Change-Id: I8c4f22d3c3f8885a6fe06029d89ef68a15931027
2016-05-16 14:03:43 -07:00
Elliott Hughes
c6190a9839 We have the _r ether_ntoa/ether_aton functions too.
We've also had them since H, not L.

Change-Id: Iee7633ea97a0ee9a00bf7b62ead315acf02a3c8e
2016-05-16 13:24:31 -07:00
Elliott Hughes
e79b630daa Merge "Fix our *ether* headers mess." 2016-05-16 20:00:10 +00:00
Elliott Hughes
f6324d540a Fix our *ether* headers mess.
Move everything to where it should be.

Along the way, we lose <net/ethertypes.h>. glibc only has a handful of these
types, and they're all in <net/ethernet.h>, not <net/ethertypes.h>. I've taken
the liberty of not including the AppleTalk ones, since it is 2016.

Also, <net/if_ether.h> should be <netinet/if_ether.h> (though with different
contents).

Bug: http://b/28519060
Change-Id: Ia41c3fc136fd3e6b008c8d08018e0629134ea6fc
2016-05-13 11:00:22 -07:00
Treehugger Robot
56469e8de2 Merge "Update Android.bp to match Android.mk" 2016-05-12 22:15:00 +00:00
Dan Willemsen
0c6570817f Update Android.bp to match Android.mk
* Remove --exclude-libs ldflags (e29e99c51)
* Mips strlen check was inverted
* ARM specific libc changes only apply to the shared library
* Reorder libjemalloc and malloc_common to match Make's ordering (for
  better binary diffing)

Change-Id: Ib41bd47565b1e8fadd285daa7b337cff1edd0808
2016-05-12 13:34:35 -07:00
Pierre Imai
6db7e5a10d Merge "Always update search domain paths." 2016-05-12 02:51:23 +00:00
Elliott Hughes
b277bb755a Merge "Remove <net/if_types.h>." 2016-05-12 02:23:42 +00:00
Elliott Hughes
bab9d7954a Remove <net/if_types.h>.
Bug: http://b/28519060
Change-Id: I7481df528b281344879b4aac32551d8c40824195
2016-05-11 15:00:19 -07:00
Elliott Hughes
d0b173316a Merge "Remove various bits of header cruft." 2016-05-11 21:25:01 +00:00
Dimitry Ivanov
35c115c196 Merge "Remove linker-namespace functions from the header" 2016-05-11 21:14:41 +00:00
Pierre Imai
06e2202a4c Always update search domain paths.
_resolv_set_nameservers_for_net() so far did not update the search
paths, unless the servers changed as well.

BUG: 28437641
Change-Id: Id31f2d97c173e00357fb2ba95908afb4572c0fc1
2016-05-11 11:06:55 +09:00
Elliott Hughes
12f35419ce Remove various bits of header cruft.
Mostly BSD _KERNEL stuff.

Change-Id: Ic0a6914437d0c831a83588a435079d0c719fcbdf
2016-05-10 17:32:48 -07:00
Elliott Hughes
366164da10 Merge "Remove declaration of pthread_cond_timedwait_relative_np." 2016-05-10 19:54:16 +00:00
Dimitry Ivanov
41fd29532b Remove linker-namespace functions from the header
They are intended for platform use only and we shouldn't have them
in the public header file.

Bug: http://b/28174921
Change-Id: Ib9b3d0fa9442cfa2e784a693ad567d1444d774e5
2016-05-09 18:15:41 -07:00
Elliott Hughes
e2f25831eb Remove declaration of pthread_cond_timedwait_relative_np.
It's been deprecated long enough, and nothing left in the tree (except
code that isn't even built) is still using it.

Bug: http://b/27918161
Change-Id: Ibf824c1063d49484037de5c03b98bec5bdd4dcf6
2016-05-09 13:29:26 -07:00
Elliott Hughes
d2f3ce9c89 Merge "Remove pthread_mutex_lock_timeout_np from <pthread.h>." 2016-05-09 20:15:50 +00:00
Elliott Hughes
0155995e8d Merge "Generalize the clone function slightly." 2016-05-09 20:14:50 +00:00
Elliott Hughes
3164ab733c Remove pthread_mutex_lock_timeout_np from <pthread.h>.
It's been deprecated long enough, and nothing left in the tree (except
code that isn't even built) is still using it.

Bug: http://b/27918161
Change-Id: I1786f5e2528a23c17b3f7298f4ba5fc7761a26c5
2016-05-06 17:46:48 -07:00
Elliott Hughes
e104a2edf3 Generalize the clone function slightly.
* Allow clone where both the child function and stack are null. It's
obviously wrong to ask to call a function without a stack, but it's not
necessarily wrong to supply no stack if you're also not supplying a
function.

* Reimplement fork in terms of the clone function, rather than using the
clone system call directly.

This is intended as a step towards enabling use of pid namespaces.

Change-Id: I03c89bd1dc540d8b4ed1c8fdf6644290744b9e91
2016-05-06 16:37:00 -07:00