OSDN Git Service

android-x86/bionic.git
7 years agoMerge "Remove g_default_ld_paths global variable"
Dimitry Ivanov [Tue, 7 Mar 2017 03:39:16 +0000 (03:39 +0000)]
Merge "Remove g_default_ld_paths global variable"
am: 4dde93a73a

Change-Id: If37b5aa17de2229dc59555b824810798608ff6ac

7 years agoMerge "Remove g_default_ld_paths global variable"
Treehugger Robot [Tue, 7 Mar 2017 03:36:01 +0000 (03:36 +0000)]
Merge "Remove g_default_ld_paths global variable"

7 years agoRemove g_default_ld_paths global variable
Dimitry Ivanov [Mon, 6 Mar 2017 21:02:29 +0000 (13:02 -0800)]
Remove g_default_ld_paths global variable

Test: boot, run bionic-unit-tests
Change-Id: Id05d53475cbea6d62bd5fa1ab5e457ac82bab523

7 years agoMerge "Generate both static and shared libseccomp_policy."
Elliott Hughes [Sat, 4 Mar 2017 00:33:31 +0000 (00:33 +0000)]
Merge "Generate both static and shared libseccomp_policy."
am: cdf19c84e8

Change-Id: Ie807df197332228fb86ba97dc909dcc61d478c8e

7 years agoMerge "Generate both static and shared libseccomp_policy."
Elliott Hughes [Sat, 4 Mar 2017 00:20:12 +0000 (00:20 +0000)]
Merge "Generate both static and shared libseccomp_policy."

7 years agoMerge "Refactor the kernel update scripts."
Christopher Ferris [Fri, 3 Mar 2017 23:43:49 +0000 (23:43 +0000)]
Merge "Refactor the kernel update scripts."
am: b7e8fe5412

Change-Id: I902d43a8903c9a11bc9b41b18c2e5f8418ea0297

7 years agoMerge "Refactor the kernel update scripts."
Christopher Ferris [Fri, 3 Mar 2017 23:40:11 +0000 (23:40 +0000)]
Merge "Refactor the kernel update scripts."

7 years agoMerge "Expand whitelist"
Paul Lawrence [Fri, 3 Mar 2017 21:08:08 +0000 (21:08 +0000)]
Merge "Expand whitelist"
am: c7dde49ab0

Change-Id: I22c6b772900c0aac068ca857cc3aa17310407795

7 years agoMerge "Expand whitelist"
Treehugger Robot [Fri, 3 Mar 2017 21:02:42 +0000 (21:02 +0000)]
Merge "Expand whitelist"

7 years agoExpand whitelist
Paul Lawrence [Fri, 3 Mar 2017 19:14:45 +0000 (11:14 -0800)]
Expand whitelist

Bug: 35917228
Test: App now runs fine with setenforce 0
Change-Id: I039385e5d0e5105ec337c62dd098dd1662442a2e

7 years agoGenerate both static and shared libseccomp_policy.
Elliott Hughes [Fri, 3 Mar 2017 02:56:12 +0000 (18:56 -0800)]
Generate both static and shared libseccomp_policy.

Also switch to Android.bp

Bug: N/A
Test: builds
Change-Id: I33697a40b30d071f8d07aa33e1fb2b0c6e8a9f6d

7 years agoRefactor the kernel update scripts.
Christopher Ferris [Fri, 24 Feb 2017 20:26:48 +0000 (12:26 -0800)]
Refactor the kernel update scripts.

The previous versions of the scripts did a lot of redundant changes
and were hard to follow.

I rewrote most of update_all.py so that it's clear about what's going on.

I updated clean_header.py to change the cleanupFile function so that
there is no magic about where the destination file is going to wind up.
Now the caller specifies the final location.

I updated utils.py so that if you are trying to do an update in one
location, but your lunch target is from another location, it causes
an error.

Bug: 35726570

Change-Id: Ic5a44d90c2774a627eecde34c0c403bc925a497c
Test: Ran the updater and verified it works properly.
Test: Verified that doing an update in one tree to another tree
Test: fails.

7 years agoMerge "Expand whitelist"
Paul Lawrence [Thu, 2 Mar 2017 18:54:31 +0000 (18:54 +0000)]
Merge "Expand whitelist"
am: 5faa3166ce

Change-Id: I1a7ea74631e8fb72550d44639d307d18ee041dd6

7 years agoMerge "Expand whitelist"
Paul Lawrence [Thu, 2 Mar 2017 18:48:46 +0000 (18:48 +0000)]
Merge "Expand whitelist"

7 years agoExpand whitelist
Paul Lawrence [Thu, 2 Mar 2017 16:50:59 +0000 (08:50 -0800)]
Expand whitelist

Bug: 35906875
Test: Device boots, app runs further and fails with different error
Change-Id: I8df40ff85f8248504bca9a048510153970b31716

7 years agoMerge "Stop using __system_property_area__"
Victor Khimenko [Wed, 1 Mar 2017 21:51:00 +0000 (21:51 +0000)]
Merge "Stop using __system_property_area__"
am: 9e10b7fa44

Change-Id: I2b3add48f5d5e41e250a1024dab6fd8411447416

7 years agoMerge "Stop using __system_property_area__"
Victor Khimenko [Wed, 1 Mar 2017 21:31:03 +0000 (21:31 +0000)]
Merge "Stop using __system_property_area__"

7 years agoStop using __system_property_area__
Victor Khimenko [Wed, 1 Mar 2017 19:36:13 +0000 (20:36 +0100)]
Stop using __system_property_area__

Apparently that "backdoor" is no longer needed - the proper way is
to reinitialize properties:
    https://android-review.googlesource.com/#/c/181794/24/tests/system_properties_test.cpp

Also removes mentions of libnativehelper test (it no longer uses
__system_property_area__) and removes useless "extern" declaration
(actual use was removed long ago).

Test: refactoring CL, existsing tests still pass

BUG=21852512
BUG=34114501

Change-Id: I2223cab2fcb671ea180ad4470a7aba5c9cd20bd8

7 years agoMerge "Revert "Revert "Revert "Make libc.so global""""
Dimitry Ivanov [Wed, 1 Mar 2017 00:41:42 +0000 (00:41 +0000)]
Merge "Revert "Revert "Revert "Make libc.so global""""
am: ebceea8e85

Change-Id: I12848c7afa25fbe7b42946a1586f7a78e8af2464

7 years agoMerge "Revert "Revert "Revert "Make libc.so global""""
Dimitry Ivanov [Wed, 1 Mar 2017 00:39:05 +0000 (00:39 +0000)]
Merge "Revert "Revert "Revert "Make libc.so global""""

7 years agoRevert "Revert "Revert "Make libc.so global"""
Dimitry Ivanov [Tue, 28 Feb 2017 21:04:30 +0000 (21:04 +0000)]
Revert "Revert "Revert "Make libc.so global"""

This reverts commit 2a4d892c7f14d849b5f349528ed2b921b19f5645.

Bug: http://b/35417197
Bug: http://b/35338922
Bug: http://b/35700074
Test: manual
Change-Id: Ib99d23d46664f3efa5be70213aa093b505e38775

7 years agoMerge "Move seccomp policy to bionic"
Paul Lawrence [Tue, 28 Feb 2017 15:41:01 +0000 (15:41 +0000)]
Merge "Move seccomp policy to bionic"
am: d9e52fed2a

Change-Id: I4bf75eaebe4adacabda2c2b4cd8047b1103e6016

7 years agoMerge "Move seccomp policy to bionic"
Treehugger Robot [Tue, 28 Feb 2017 15:36:07 +0000 (15:36 +0000)]
Merge "Move seccomp policy to bionic"

7 years agoMerge "Fix greylist exception to account for linked namespaces"
Dimitry Ivanov [Tue, 28 Feb 2017 00:47:49 +0000 (00:47 +0000)]
Merge "Fix greylist exception to account for linked namespaces"
am: 6e528631d1

Change-Id: I639c4ac215359a5c3caa6b19a2cd59ace1ff1ca4

7 years agoMerge "Fix greylist exception to account for linked namespaces"
Treehugger Robot [Tue, 28 Feb 2017 00:42:54 +0000 (00:42 +0000)]
Merge "Fix greylist exception to account for linked namespaces"

7 years agoMerge "Fix pre-L MB_CUR_MAX."
Dan Albert [Mon, 27 Feb 2017 22:30:09 +0000 (22:30 +0000)]
Merge "Fix pre-L MB_CUR_MAX."
am: ca1fda834f

Change-Id: Ib6f2b309be4ce297577174fd0de8e624d37d37e2

7 years agoMerge "Fix pre-L MB_CUR_MAX."
Treehugger Robot [Mon, 27 Feb 2017 22:22:26 +0000 (22:22 +0000)]
Merge "Fix pre-L MB_CUR_MAX."

7 years agoFix greylist exception to account for linked namespaces
Dimitry Ivanov [Mon, 27 Feb 2017 20:17:47 +0000 (12:17 -0800)]
Fix greylist exception to account for linked namespaces

Do not load second copy of libraries that are supposed to
be provided by linked namespaces. Also do not print
error in the log if caller tries to open shared library
using absolute path for apps targeting N+.

Bug: http://b/35454141
Bug: http://b/26833548
Bug: http://b/35338922
Test: run bionic-unit-tests --gtest_filter=dl*
Change-Id: Icf3aeedff18d287d2ba0b3df3808b100f3ef5f7a

7 years agoMove seccomp policy to bionic
Paul Lawrence [Thu, 16 Feb 2017 17:24:39 +0000 (09:24 -0800)]
Move seccomp policy to bionic

Test: Built and checked booted
Change-Id: Iaec1265fe5a55c4df90ab9e45b010ef36faf6bba

7 years agoMerge "Update to kernel headers v4.10."
Christopher Ferris [Mon, 27 Feb 2017 20:16:53 +0000 (20:16 +0000)]
Merge "Update to kernel headers v4.10."
am: 5f41ce25c6

Change-Id: Ib466db6c56b442ac29b56878d19a4c926acf4911

7 years agoMerge "Update to kernel headers v4.10."
Christopher Ferris [Mon, 27 Feb 2017 20:09:54 +0000 (20:09 +0000)]
Merge "Update to kernel headers v4.10."

7 years agoMerge "Revert "Move seccomp policy to bionic""
Paul Lawrence [Mon, 27 Feb 2017 16:46:00 +0000 (16:46 +0000)]
Merge "Revert "Move seccomp policy to bionic""
am: c712aedb0c

Change-Id: I6e95b0579d749e898ef2933fe1fd92c81b28ad8c

7 years agoMerge "Revert "Move seccomp policy to bionic""
Paul Lawrence [Mon, 27 Feb 2017 16:39:11 +0000 (16:39 +0000)]
Merge "Revert "Move seccomp policy to bionic""

7 years agoRevert "Move seccomp policy to bionic"
Paul Lawrence [Mon, 27 Feb 2017 16:32:37 +0000 (16:32 +0000)]
Revert "Move seccomp policy to bionic"

This reverts commit 06a32206c5430321dd3fc02b70acbf99383786c1.

Reverting build-breaking change

Change-Id: Ib3698bca8f905033a9c7f22bc2fa9f7e7bf75873

7 years agoMerge "Move seccomp policy to bionic"
Paul Lawrence [Mon, 27 Feb 2017 16:14:30 +0000 (16:14 +0000)]
Merge "Move seccomp policy to bionic"
am: d0ceac6441

Change-Id: Ia0dfc453985313ae5a098bbe5512a1b1aad741a3

7 years agoMerge "Move seccomp policy to bionic"
Paul Lawrence [Mon, 27 Feb 2017 16:09:39 +0000 (16:09 +0000)]
Merge "Move seccomp policy to bionic"

7 years agoMerge "Add tests for <endian.h>."
Elliott Hughes [Sat, 25 Feb 2017 03:14:15 +0000 (03:14 +0000)]
Merge "Add tests for <endian.h>."
am: 78e6c4ec7c

Change-Id: I3593c8f899707d5e45fad839733b0dcbcc945df0

7 years agoMerge "Add tests for <endian.h>."
Treehugger Robot [Sat, 25 Feb 2017 03:10:18 +0000 (03:10 +0000)]
Merge "Add tests for <endian.h>."

7 years agoMerge "loader: set PT_INTERP to itself"
Dimitry Ivanov [Sat, 25 Feb 2017 02:31:13 +0000 (02:31 +0000)]
Merge "loader: set PT_INTERP to itself"
am: 0b87362f53

Change-Id: I505616f5b4223dcd6cdad396db340c81b61a87b5

7 years agoMerge "loader: set PT_INTERP to itself"
Treehugger Robot [Sat, 25 Feb 2017 02:24:28 +0000 (02:24 +0000)]
Merge "loader: set PT_INTERP to itself"

7 years agoMerge "libc: __system_property_set uses writev to write atomically"
Dimitry Ivanov [Sat, 25 Feb 2017 02:13:42 +0000 (02:13 +0000)]
Merge "libc: __system_property_set uses writev to write atomically"
am: 3246b9d8ae

Change-Id: Ica033823bfed9851dfe693a4e079023bc41848a6

7 years agoMerge "Move __system_property_*_serial back to LIBC"
Dimitry Ivanov [Sat, 25 Feb 2017 02:07:13 +0000 (02:07 +0000)]
Merge "Move __system_property_*_serial back to LIBC"
am: bf04e3c00d

Change-Id: I7bd2ab0a5ee0fbcf2ed2d3f87c1658ca6ba42af6

7 years agoMerge "libc: __system_property_set uses writev to write atomically"
Treehugger Robot [Sat, 25 Feb 2017 02:06:19 +0000 (02:06 +0000)]
Merge "libc: __system_property_set uses writev to write atomically"

7 years agoMerge "Move __system_property_*_serial back to LIBC"
Treehugger Robot [Sat, 25 Feb 2017 02:02:02 +0000 (02:02 +0000)]
Merge "Move __system_property_*_serial back to LIBC"

7 years agoloader: set PT_INTERP to itself
Dimitry Ivanov [Thu, 23 Feb 2017 19:53:43 +0000 (11:53 -0800)]
loader: set PT_INTERP to itself

Some versions of kernel set AT_BASE to 0
if dynamic loader does not have PT_INTERP
set.

Bug: http://b/30739481
Test: run /system/bin/linker64 and /system/bin/linker
Change-Id: I1b67777166fe917d3ee1a97277045ca6f5db0084

7 years agoAdd tests for <endian.h>.
Elliott Hughes [Sat, 25 Feb 2017 00:19:53 +0000 (16:19 -0800)]
Add tests for <endian.h>.

Also, for the stuff that's also in <netinet/in.h> as real functions,
check that they're there too (and as functions rather than macros,
since that was historically not true).

Bug: http://b/28432448
Test: ran tests
Change-Id: I7e4ae926f7e02de3b6dd38d1953e5b3b43d44f74

7 years agoMove __system_property_*_serial back to LIBC
Dimitry Ivanov [Fri, 24 Feb 2017 23:36:17 +0000 (15:36 -0800)]
Move __system_property_*_serial back to LIBC

Bug: http://b/35764972
Bug: http://b/34114501
Test: make
Change-Id: Ibbda0107d07c432110a0633de03259e39480fde4

7 years agolibc: __system_property_set uses writev to write atomically
Dimitry Ivanov [Fri, 24 Feb 2017 01:57:14 +0000 (17:57 -0800)]
libc: __system_property_set uses writev to write atomically

__system_property_set sometimes produces broken_pipe error
when trying to write a property.

This change improves error messages and uses writev() instead
of sequence of send() calls.

Bug: http://b/35381074
Test: bionic-unit-tests --gtest_filter=prop*
Change-Id: I7a5b169c015db4e6b720370e58662de8206d1086

7 years agoMove seccomp policy to bionic
Paul Lawrence [Thu, 16 Feb 2017 17:24:39 +0000 (09:24 -0800)]
Move seccomp policy to bionic

Test: Built and checked booted

Change-Id: If777eed75d5280c7a390399261e97125c04767b2

7 years agoMerge "Hide internal __system_property_* functions"
Dimitry Ivanov [Fri, 24 Feb 2017 19:16:12 +0000 (19:16 +0000)]
Merge "Hide internal __system_property_* functions"
am: 5927b04ce7

Change-Id: Ibcb9bd8b5df6d5e5815886b10482ea6fde6213bd

7 years agoMerge "Hide internal __system_property_* functions"
Dimitry Ivanov [Fri, 24 Feb 2017 19:11:12 +0000 (19:11 +0000)]
Merge "Hide internal __system_property_* functions"

7 years agoMerge "Replace cxa_guard fences with acquire loads"
Hans Boehm [Fri, 24 Feb 2017 18:58:11 +0000 (18:58 +0000)]
Merge "Replace cxa_guard fences with acquire loads"
am: 5d0c1fcc8b

Change-Id: I0fe209d4075b3afbff03938cfa4bf5690ba60c23

7 years agoMerge "Replace cxa_guard fences with acquire loads"
Hans Boehm [Fri, 24 Feb 2017 18:50:34 +0000 (18:50 +0000)]
Merge "Replace cxa_guard fences with acquire loads"

7 years agoMerge "Use <linux/eventpoll.h> to implement <sys/epoll.h>."
Elliott Hughes [Fri, 24 Feb 2017 16:59:03 +0000 (16:59 +0000)]
Merge "Use <linux/eventpoll.h> to implement <sys/epoll.h>."
am: 77463d81e6

Change-Id: I563a5c0723fd4e9b0fbcea1aec73614e92b6381d

7 years agoMerge "Use <linux/eventpoll.h> to implement <sys/epoll.h>."
Elliott Hughes [Fri, 24 Feb 2017 16:55:25 +0000 (16:55 +0000)]
Merge "Use <linux/eventpoll.h> to implement <sys/epoll.h>."

7 years agoMerge "Silence a compiler warning due to unused variable on mips"
Pavel Labath [Fri, 24 Feb 2017 10:27:10 +0000 (10:27 +0000)]
Merge "Silence a compiler warning due to unused variable on mips"
am: 3678078440

Change-Id: I789328684c5a5253b515c42a9dbdc6714272b9c1

7 years agoMerge "Silence a compiler warning due to unused variable on mips"
Pavel Labath [Fri, 24 Feb 2017 10:22:40 +0000 (10:22 +0000)]
Merge "Silence a compiler warning due to unused variable on mips"

7 years agoSilence a compiler warning due to unused variable on mips
Pavel Labath [Fri, 24 Feb 2017 10:14:13 +0000 (10:14 +0000)]
Silence a compiler warning due to unused variable on mips

oops, I did it again.

Test: lunch mips && cd bionic && mma
Change-Id: I1fe2cb847d0698b34766869f9626398dbcf81960

7 years agoMerge "Add "imprecise" watchpoint ptrace test"
Pavel Labath [Fri, 24 Feb 2017 09:21:06 +0000 (09:21 +0000)]
Merge "Add "imprecise" watchpoint ptrace test"
am: a936199ce0

Change-Id: I4fbf4ce77868d3483d5ea34c51b3d6f51cfb1b4d

7 years agoMerge "Add "imprecise" watchpoint ptrace test"
Pavel Labath [Fri, 24 Feb 2017 09:16:19 +0000 (09:16 +0000)]
Merge "Add "imprecise" watchpoint ptrace test"

7 years agoAdd "imprecise" watchpoint ptrace test
Pavel Labath [Wed, 22 Feb 2017 18:22:46 +0000 (18:22 +0000)]
Add "imprecise" watchpoint ptrace test

This tests for the presence of a kernel bug that meant that the kernel
would sometimes fail to report the watchpoint hit if the hardware
reported a address which did not exactly match the address range being
watched (which it is allowed to do per ARM spec if the instruction
accesses a larger block of memory than the region being watched). This
bug was fixed in linux kernel 4.9, and has been backported to older
android kernels.

Bug: 30802222
Bug: 30919905
Test: bionic-unit-tests --gtest_filter="sys_ptrace.*"
Change-Id: I80c35b29eaf28e2dbacb9e8ee5317fdea653fc87

7 years agoUse <linux/eventpoll.h> to implement <sys/epoll.h>.
Elliott Hughes [Thu, 23 Feb 2017 07:22:51 +0000 (23:22 -0800)]
Use <linux/eventpoll.h> to implement <sys/epoll.h>.

Bug: https://github.com/android-ndk/ndk/issues/302
Test: builds
Change-Id: Ia3074326a128c38f2488e342c028cc030801cfd9

7 years agoMerge "Expand whitelist"
Paul Lawrence [Thu, 23 Feb 2017 23:58:30 +0000 (23:58 +0000)]
Merge "Expand whitelist"
am: 9eba112c3c

Change-Id: I43b0344fef5e56ccb53a0147ea0aab2a82f3fcb6

7 years agoMerge "Expand whitelist"
Treehugger Robot [Thu, 23 Feb 2017 23:54:34 +0000 (23:54 +0000)]
Merge "Expand whitelist"

7 years agoMerge "versioner: fix darwin build."
Josh Gao [Thu, 23 Feb 2017 23:53:31 +0000 (23:53 +0000)]
Merge "versioner: fix darwin build."
am: 46c8a34a95

Change-Id: I96bf649521d8fd2062aea7c859be2d76759ff09e

7 years agoMerge "versioner: fix darwin build."
Treehugger Robot [Thu, 23 Feb 2017 23:51:14 +0000 (23:51 +0000)]
Merge "versioner: fix darwin build."

7 years agoHide internal __system_property_* functions
Dimitry Ivanov [Thu, 16 Feb 2017 23:34:21 +0000 (15:34 -0800)]
Hide internal __system_property_* functions

Bug: http://b/34114501
Test: bionic-unit-tests --gtest_filter=prop*
Change-Id: I1fc57b4ced6aaf841aad64e12e7696d25c2e027b

7 years agoMerge "Add legacy inlines for more termios stuff."
Dan Albert [Thu, 23 Feb 2017 22:05:22 +0000 (22:05 +0000)]
Merge "Add legacy inlines for more termios stuff."
am: 9dbfd8ad7f

Change-Id: I3a493b5ad47ecac27e09f21fa1821851cac31083

7 years agoMerge "Add legacy inlines for more termios stuff."
Treehugger Robot [Thu, 23 Feb 2017 22:01:10 +0000 (22:01 +0000)]
Merge "Add legacy inlines for more termios stuff."

7 years agoversioner: fix darwin build.
Josh Gao [Thu, 23 Feb 2017 21:52:49 +0000 (13:52 -0800)]
versioner: fix darwin build.

Use struct stat::st_mtime instead of the underlying st_mtim, which is
called something different on Darwin.

Test: mma on linux, darwin
Change-Id: I2695a6c83ebb7d08ec56b1355e0f4bc0993a0acb

7 years agoMerge "Revert "Run the versioner as part of the build.""
Dan Albert [Thu, 23 Feb 2017 21:45:14 +0000 (21:45 +0000)]
Merge "Revert "Run the versioner as part of the build.""
am: 7f24a4f556

Change-Id: I46566a05914a13ad8492acebd6c76107df0b51a4

7 years agoMerge "Revert "Run the versioner as part of the build.""
Dan Albert [Thu, 23 Feb 2017 21:36:48 +0000 (21:36 +0000)]
Merge "Revert "Run the versioner as part of the build.""

7 years agoRevert "Run the versioner as part of the build."
Dan Albert [Thu, 23 Feb 2017 21:30:35 +0000 (21:30 +0000)]
Revert "Run the versioner as part of the build."

This reverts commit 45715b2a88c8daf5a721ce9b28391120f5507764.

Reason for revert: Darwin sucks

Change-Id: I004dd7fa5e14a43ffe04ace2f5a06341df61b8cd

7 years agoMerge "Run the versioner as part of the build."
Dan Albert [Thu, 23 Feb 2017 21:11:22 +0000 (21:11 +0000)]
Merge "Run the versioner as part of the build."
am: bd15a909b5

Change-Id: I6fb0081b43f1287cc0ea82e156df9efb1faf2288

7 years agoMerge "Run the versioner as part of the build."
Dan Albert [Thu, 23 Feb 2017 21:06:47 +0000 (21:06 +0000)]
Merge "Run the versioner as part of the build."

7 years agoExpand whitelist
Paul Lawrence [Wed, 15 Feb 2017 21:40:22 +0000 (13:40 -0800)]
Expand whitelist

Bug: 35217603
Test: App no longer triggers seccomp exceptions when launched
Change-Id: I8ea904640a2f14c67a075e593067327407766220

7 years agoMerge "Autogenerate single policy from syscalls and whitelist"
Paul Lawrence [Thu, 23 Feb 2017 20:40:21 +0000 (20:40 +0000)]
Merge "Autogenerate single policy from syscalls and whitelist"
am: b2a74cda90

Change-Id: Iaebc4930e1685570a7daee6bf62719115f909108

7 years agoMerge "Autogenerate single policy from syscalls and whitelist"
Treehugger Robot [Thu, 23 Feb 2017 20:27:45 +0000 (20:27 +0000)]
Merge "Autogenerate single policy from syscalls and whitelist"

7 years agoReplace cxa_guard fences with acquire loads
Hans Boehm [Wed, 22 Feb 2017 23:34:29 +0000 (15:34 -0800)]
Replace cxa_guard fences with acquire loads

This seemed to be the only place in bionic where a fence on a
performance-critical path could be easily replaced by a stronger
load/store order constraint. Do so.

On x86 this should generate the same code either way. Based on
microbenchmarks of the relevant ARM instructions, this is currently
performance-neutral in this kind of context. But in the future, the
newly generated acquire loads should give us a performance benefit.

Test: Booted AOSP
Change-Id: I7823e11d6ae4fd58e0425244c293262e2320fd81

7 years agoAdd legacy inlines for more termios stuff.
Dan Albert [Thu, 23 Feb 2017 19:09:32 +0000 (11:09 -0800)]
Add legacy inlines for more termios stuff.

Test: make checkbuild # with my versioner-in-build patches
Bug: https://github.com/android-ndk/ndk/issues/302
Change-Id: Ib00b5dadf23592d101486b4f2188285ec03c9e2a

7 years agoRun the versioner as part of the build.
Dan Albert [Thu, 16 Feb 2017 01:18:01 +0000 (17:18 -0800)]
Run the versioner as part of the build.

Running this periodically and checking in the results is not working
out, since the result is just that I'm having to spend a lot of time
cleaning up the headers every time I need to update them in the NDK.

Run the versioner as part of the build instead. This way bionic
header changes behave like the rest of the NDK headers and will
affect NDK builds in the platform *immediately*.

Remove the preupload hook for the versioner since it's part of the
normal build now.

The versioner's dependencies directory needs to be moved because
soong won't let us try to do things outside our module's directory
(in this case libc).

Unfortunately this means we need to build the versioner for Darwin,
because we now need it to perform a platform build.

Test: make checkbuild
Bug: None
Change-Id: Icdab8a962354d9e945072dc3f806baea376c8db4

7 years agoAutogenerate single policy from syscalls and whitelist
Paul Lawrence [Tue, 14 Feb 2017 21:32:23 +0000 (13:32 -0800)]
Autogenerate single policy from syscalls and whitelist

Bug: 35392119
Bug: 34465958
Test: Check boots and same syscalls are blocked as before

Change-Id: I9efa97032c59aebbbfd32e6f0d2d491f6254f0a2

7 years agoMerge "Add test for a greylisted library"
Dimitry Ivanov [Thu, 23 Feb 2017 17:13:34 +0000 (17:13 +0000)]
Merge "Add test for a greylisted library"
am: 3f76dadf15

Change-Id: Ia5bb595314b154bca36d816f30b640eaf20c6cd7

7 years agoMerge "Add test for a greylisted library"
Dimitry Ivanov [Thu, 23 Feb 2017 17:11:18 +0000 (17:11 +0000)]
Merge "Add test for a greylisted library"

7 years agoAdd test for a greylisted library
Dimitry Ivanov [Tue, 21 Feb 2017 21:41:08 +0000 (13:41 -0800)]
Add test for a greylisted library

Test: bionic-unit-tests --gtest_filter=dlext.ns*
Bug: http://b/35338922
Change-Id: I2f4895cb1ec458c2f565a7e4d06f7a1f6200e7aa

7 years agoMerge "Cope with argv[0] being null in the dynamic linker."
Elliott Hughes [Thu, 23 Feb 2017 03:32:49 +0000 (03:32 +0000)]
Merge "Cope with argv[0] being null in the dynamic linker."
am: c84e8a507c

Change-Id: I9d864e07d907a5090266658e074953cca119678a

7 years agoMerge "Allocate thread local buffers in __init_tls."
Josh Gao [Thu, 23 Feb 2017 03:30:22 +0000 (03:30 +0000)]
Merge "Allocate thread local buffers in __init_tls."
am: 7009f40e52

Change-Id: I11737e4ea95f517d71f4b08051f67b218c0f2c6c

7 years agoMerge "Cope with argv[0] being null in the dynamic linker."
Treehugger Robot [Thu, 23 Feb 2017 03:29:42 +0000 (03:29 +0000)]
Merge "Cope with argv[0] being null in the dynamic linker."

7 years agoMerge "Allocate thread local buffers in __init_tls."
Josh Gao [Thu, 23 Feb 2017 03:24:44 +0000 (03:24 +0000)]
Merge "Allocate thread local buffers in __init_tls."

7 years agoCope with argv[0] being null in the dynamic linker.
Elliott Hughes [Thu, 23 Feb 2017 01:31:41 +0000 (17:31 -0800)]
Cope with argv[0] being null in the dynamic linker.

Somewhat unsurprisingly, very few commands are happy to be run like this,
in particular multiplexed commands like toybox. But that's no reason for
the linker to get in the way too.

Bug: http://b/33276926
Test: new test
Change-Id: I6dd71ea0183f4da83571039c2198ebb6ed38520e

7 years agoAllocate thread local buffers in __init_tls.
Josh Gao [Wed, 22 Feb 2017 20:19:05 +0000 (12:19 -0800)]
Allocate thread local buffers in __init_tls.

Thread local buffers were using pthread_setspecific for storage with
lazy initialization. pthread_setspecific shares TLS slots between the
linker and libc.so, so thread local buffers being initialized in a
different order between libc.so and the linker meant that bad things
would happen (manifesting as snprintf not working because the
locale was mangled)

Bug: http://b/20464031
Test: /data/nativetest64/bionic-unit-tests/bionic-unit-tests
      everything passes
Test: /data/nativetest/bionic-unit-tests/bionic-unit-tests
      thread_local tests are failing both before and after (KUSER_HELPERS?)
Test: /data/nativetest64/bionic-unit-tests-static/bionic-unit-tests-static
      no additional failures
Change-Id: I9f445a77c6e86979f3fa49c4a5feecf6ec2b0c3f

7 years agoMerge "Add timeout support to __system_property_wait."
Elliott Hughes [Wed, 22 Feb 2017 01:47:53 +0000 (01:47 +0000)]
Merge "Add timeout support to __system_property_wait."
am: c9a840ac76

Change-Id: Ifaa6521599c8d36386cee6e980d0e10a7a6c1ef9

7 years agoMerge "Add timeout support to __system_property_wait."
Treehugger Robot [Wed, 22 Feb 2017 01:43:30 +0000 (01:43 +0000)]
Merge "Add timeout support to __system_property_wait."

7 years agoMerge "Downgrade the special case of pthread_t(0) to a warning."
Elliott Hughes [Wed, 22 Feb 2017 00:42:11 +0000 (00:42 +0000)]
Merge "Downgrade the special case of pthread_t(0) to a warning."
am: 2cb4fb033f

Change-Id: If4f963995645b9d57666d0cef0661aa96d8aa2a1

7 years agoMerge "Downgrade the special case of pthread_t(0) to a warning."
Treehugger Robot [Wed, 22 Feb 2017 00:37:08 +0000 (00:37 +0000)]
Merge "Downgrade the special case of pthread_t(0) to a warning."

7 years agoFix pre-L MB_CUR_MAX.
Dan Albert [Tue, 21 Feb 2017 23:54:58 +0000 (15:54 -0800)]
Fix pre-L MB_CUR_MAX.

The default locale is POSIX, not C.UTF-8. POSIX explicitly states
that MB_CUR_MAX is 1 for the POSIX locale:

http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/stdlib.h.html

Test: Made change in the NDK, built libc++ against it, ran NDK libc++
      tests.
Bug: None

Change-Id: Ic2f6f96aa4a7f20d619030f41323831d01002715

7 years agoUpdate to kernel headers v4.10.
Christopher Ferris [Tue, 21 Feb 2017 20:35:09 +0000 (12:35 -0800)]
Update to kernel headers v4.10.

Test: Built angler, booted on angler, ran bionic unit tests.
Change-Id: Ia24511e74106116ea84b44ab724865ec492de8f9

7 years agoAdd timeout support to __system_property_wait.
Elliott Hughes [Fri, 17 Feb 2017 01:13:04 +0000 (17:13 -0800)]
Add timeout support to __system_property_wait.

Bug: http://b/35201172
Test: ran tests
Change-Id: I3a78813bf3cd50d1b308ecb3c742f923606c0cc4

7 years agoDowngrade the special case of pthread_t(0) to a warning.
Elliott Hughes [Tue, 21 Feb 2017 21:15:20 +0000 (13:15 -0800)]
Downgrade the special case of pthread_t(0) to a warning.

So far this is the only issue we've hit in vendor code, and we've hit
it several times already. Rather than try to fix bullhead (the current
problem), let's just admit that the special case of 0 is a lot less
worrying.

Also fix the test expectations to correspond to the new abort message.

Bug: http://b/35455349 (crashes on 0)
Bug: http://b/35622944 (tests)
Test: ran tests
Change-Id: Iec57011fa699a954ebeaec151db2193e36d1ef35

7 years agoMerge "Fix a comment in the pthread_cond_t implementation."
Elliott Hughes [Sun, 19 Feb 2017 05:23:49 +0000 (05:23 +0000)]
Merge "Fix a comment in the pthread_cond_t implementation."
am: 4085423525

Change-Id: Iaf8f9accf72bca7aa90cbda76014cde5683f1204