OSDN Git Service

android-x86/bionic.git
7 years agoMerge "Match __bos0 to __pass_object_size0 in FORTIFY"
Treehugger Robot [Mon, 13 Feb 2017 19:39:28 +0000 (19:39 +0000)]
Merge "Match __bos0 to __pass_object_size0 in FORTIFY"

7 years agoMerge "Replace public library list with shared lib sonames (part 2/2)"
Dimitry Ivanov [Sat, 11 Feb 2017 19:26:48 +0000 (19:26 +0000)]
Merge "Replace public library list with shared lib sonames (part 2/2)"

7 years agoMerge "loader: fix d-tor call order"
Dimitry Ivanov [Sat, 11 Feb 2017 05:50:53 +0000 (05:50 +0000)]
Merge "loader: fix d-tor call order"

7 years agoMatch __bos0 to __pass_object_size0 in FORTIFY
George Burgess IV [Fri, 10 Feb 2017 21:56:22 +0000 (13:56 -0800)]
Match __bos0 to __pass_object_size0 in FORTIFY

pass_object_size(N) forwards the result of __builtin_object_size(param,
N) to a function. So, a function that looks like:

  size_t foo(void *const p __pass_object_size) { return __bos0(p); }
  int bar = foo(baz);

would effectively be turned into

  size_t foo(void *const p, size_t sz) { return sz; }
  int bar = foo(baz, __bos(baz)); // note that this is not __bos0

This is bad, since if we're using __bos0, we want more relaxed
objectsize checks.

__bos0 should be more permissive than __bos in all cases, so this
change Should Be Fineā„¢.

This change also makes GCC and clang share another function's
implementation (recv). I just realized we need to add special
diagnostic-related overloads bits for clang to it, but I can do that in
another patch.

Bug: None
Test: Bullhead builds and boots; CtsBionicTestCases passes.
Change-Id: I6818d0041328ab5fd0946a1e57321a977c1e1250

7 years agoloader: fix d-tor call order
Dimitry Ivanov [Fri, 10 Feb 2017 19:04:20 +0000 (11:04 -0800)]
loader: fix d-tor call order

In the case when there are multiple dependencies on
the same library in the local_group the unload may
in some situations (covered now by tests) result
calling d-tors for some libraries prematurely.

In order to have correct call order loader checks if this
is last dependency in local group before adding it to BFS
queue.

Bug: http://b/35201832
Test: bionic-unit-tests --gtest_filter=dl*:Dl*
Test: bionic-unit-tests-glibc --gtest_filter=dl*
Change-Id: I4c6955b9032acc7147a51d9f09b61d9e0818700c

7 years agoMerge "Replace public library list with shared lib sonames (part 1/2)"
Treehugger Robot [Fri, 10 Feb 2017 19:01:18 +0000 (19:01 +0000)]
Merge "Replace public library list with shared lib sonames (part 1/2)"

7 years agoReplace public library list with shared lib sonames (part 2/2)
Dimitry Ivanov [Fri, 3 Feb 2017 22:07:34 +0000 (14:07 -0800)]
Replace public library list with shared lib sonames (part 2/2)

This commit updates interface of libdl.c.

1. android_init_namespaces is replaces with android_init_anonymous_namespace
2. added 2 arguments to android_create_namespace to specify linked namespace
   and the list of shared libraries sonames.
3. symbol lookup does not get past boundary libraries (added check and test for it).

Bug: http://b/26833548
Bug: http://b/21879602
Test: bionic-unit-tests --gtest_filter=dl*:Dl*
Change-Id: I32921da487a02e5bd0d2fc528904d1228394bfb9

7 years agoReplace public library list with shared lib sonames (part 1/2)
Dimitry Ivanov [Wed, 1 Feb 2017 23:28:52 +0000 (15:28 -0800)]
Replace public library list with shared lib sonames (part 1/2)

Replace public library list with shared lib sonames
which are property of a link between namespaces

This change does not touch any external interfaces
so from outside it behaves almost as it was before

One significant difference is that there is no longer
need to preload public libraries.

Bug: http://b/26833548
Test: bionic-unit-tests --gtest_filter=dl*:Dl*
Change-Id: I57e44e18a9b4f07dcd6556436346be52f52b79d7

7 years agoMerge "Removing the kuser_helper elf note from building"
Treehugger Robot [Fri, 10 Feb 2017 06:24:31 +0000 (06:24 +0000)]
Merge "Removing the kuser_helper elf note from building"

7 years agoRemoving the kuser_helper elf note from building
mspector [Thu, 9 Feb 2017 01:01:27 +0000 (17:01 -0800)]
Removing the kuser_helper elf note from building

This change removes the kuser_helper note from building automatically
with any binary but leaves the note.
Also fixes a typo in the note.

Original patch adding the note:
Ib8366e2a0810092b71381d57dee4bdaa56369a24

Bug: 34815073
Test: Manual - Note is no longer added to binaries
Change-Id: Ieb81f9d9127d1f8a522434a31c696d743238e2a5

7 years agoMerge "Remove unnecessary memsets in linker allocators"
Treehugger Robot [Fri, 10 Feb 2017 02:32:16 +0000 (02:32 +0000)]
Merge "Remove unnecessary memsets in linker allocators"

7 years agoMerge "libc: add clang FORTIFY support"
Treehugger Robot [Fri, 10 Feb 2017 02:07:28 +0000 (02:07 +0000)]
Merge "libc: add clang FORTIFY support"

7 years agoMerge "Add test checking init/fini call order"
Treehugger Robot [Fri, 10 Feb 2017 00:21:06 +0000 (00:21 +0000)]
Merge "Add test checking init/fini call order"

7 years agoRemove unnecessary memsets in linker allocators
Dimitry Ivanov [Thu, 9 Feb 2017 23:53:54 +0000 (15:53 -0800)]
Remove unnecessary memsets in linker allocators

Test: linker-unit-tests
Test: bionic-unit-tests --gtest_filter=dl*:Dl*
Change-Id: I96f983dba77c9cb5698a9eb2e51b33bc128c6dd7

7 years agolibc: add clang FORTIFY support
George Burgess IV [Thu, 9 Feb 2017 08:00:31 +0000 (00:00 -0800)]
libc: add clang FORTIFY support

This patch adds clang-style FORTIFY to Bionic. For more information on
FORTIFY, please see https://goo.gl/8HS2dW . This implementation works
for versions of clang that don't support diagnose_if, so please see the
"without diagnose_if" sections. We plan to swap to a diagnose_if-based
FORTIFY later this year (since it doesn't really add any features; it
just simplifies the implementation a lot, and it gives us much prettier
diagnostics)

Bug: 32073964
Test: Builds on angler, bullhead, marlin, sailfish. Bionic CTS tests
pass on Angler and Bullhead.

Change-Id: I607aecbeee81529709b1eee7bef5b0836151eb2b

7 years agoAdd test checking init/fini call order
Dimitry Ivanov [Thu, 9 Feb 2017 21:31:57 +0000 (13:31 -0800)]
Add test checking init/fini call order

This test is checking that loader complies with the order described in
http://www.sco.com/developers/gabi/latest/ch5.dynamic.html#init_fini

Bug: http://b/35201832
Test: bionic-unit-tests --gtest_filter=dl*:Dl*
Test: bionic-unit-tests-glibc --gtest_filter=dl*
Change-Id: I4cdf878c043112442c191e82aa9f5d5077e4d8c4

7 years agoMerge "Add "benchmark" to time atomic operations"
Hans Boehm [Thu, 9 Feb 2017 02:03:22 +0000 (02:03 +0000)]
Merge "Add "benchmark" to time atomic operations"

7 years agoMerge "Revert "Stop checking the global thread list in several trivial cases.""
Elliott Hughes [Tue, 7 Feb 2017 21:12:22 +0000 (21:12 +0000)]
Merge "Revert "Stop checking the global thread list in several trivial cases.""

7 years agoRevert "Stop checking the global thread list in several trivial cases."
Elliott Hughes [Tue, 7 Feb 2017 21:05:30 +0000 (21:05 +0000)]
Revert "Stop checking the global thread list in several trivial cases."

This reverts commit f5a4992b7186c01b98cb9400b2b5b490805a87bb.

Breaks OMX_ImgEnc in cameraserver (http://b/35088254).

Change-Id: I6dcf12706a184b0b8b72451584567a42dfa1bb4f

7 years agoMerge "Improve a comment."
Elliott Hughes [Tue, 7 Feb 2017 17:01:15 +0000 (17:01 +0000)]
Merge "Improve a comment."

7 years agoMerge "Stop checking the global thread list in several trivial cases."
Treehugger Robot [Tue, 7 Feb 2017 00:29:02 +0000 (00:29 +0000)]
Merge "Stop checking the global thread list in several trivial cases."

7 years agoStop checking the global thread list in several trivial cases.
Elliott Hughes [Mon, 6 Feb 2017 22:09:53 +0000 (14:09 -0800)]
Stop checking the global thread list in several trivial cases.

Since removing the global thread is hard, let's take the different
groups of functions individually.

The existing code was racy anyway, because the thread might still be
on the list but have exited (leaving tid == 0).

Bug: http://b/19636317
Test: ran tests
Change-Id: Icc0986ff124d5f9b8a653edf718c549d1563973b

7 years agoImprove a comment.
Elliott Hughes [Mon, 6 Feb 2017 18:26:20 +0000 (10:26 -0800)]
Improve a comment.

Bug: http://b/23675822
Test: builds
Change-Id: Ia58ffabf38012035076e4c682faa4c93f3690e24

7 years agoMerge "Create seccomp policy without TRAP for further processing"
Paul Lawrence [Fri, 3 Feb 2017 20:14:14 +0000 (20:14 +0000)]
Merge "Create seccomp policy without TRAP for further processing"

7 years agoCreate seccomp policy without TRAP for further processing
Paul Lawrence [Wed, 25 Jan 2017 23:20:52 +0000 (15:20 -0800)]
Create seccomp policy without TRAP for further processing

Bug: 34946764
Test: Make sure boots, seccomp still blocks, and is faster
Change-Id: Ib4abf4307ae545ee69a3fb9328f62c760a1b40f7

7 years agoMerge "Fix CFI initialization crash on x86."
Evgenii Stepanov [Fri, 3 Feb 2017 01:47:14 +0000 (01:47 +0000)]
Merge "Fix CFI initialization crash on x86."

7 years agoMerge "isnan and isinf aren't functions."
Elliott Hughes [Fri, 3 Feb 2017 00:32:00 +0000 (00:32 +0000)]
Merge "isnan and isinf aren't functions."

7 years agoFix CFI initialization crash on x86.
Evgenii Stepanov [Tue, 31 Jan 2017 21:19:30 +0000 (13:19 -0800)]
Fix CFI initialization crash on x86.

Third try.

Bug: 34752378
Test: bionic tests
Change-Id: I247c127489a8ee38404e104f28d916a704e35f36

7 years agoisnan and isinf aren't functions.
Elliott Hughes [Thu, 2 Feb 2017 22:02:49 +0000 (14:02 -0800)]
isnan and isinf aren't functions.

isnan was a function in POSIX in 1997, but changed to a macro only in 2004
to align with the C standard. isinf wasn't in POSIX until 2004, where it
appeared as a macro only (but other C libraries already had it as a
function).

Now the C++ standard has added ::isnan and ::isinf functions with different
signatures from the historical ones, so we need to move our historical cruft
out of the way.

We'll keep the implementations for backwards compatibility.

Bug: http://b/34724220
Test: ran tests
Change-Id: Id665f0344af6fe6ed245106e60231f4ef2027f41

7 years agoMerge "Revert "Remove the global thread list.""
David James [Thu, 2 Feb 2017 02:46:40 +0000 (02:46 +0000)]
Merge "Revert "Remove the global thread list.""

7 years agoRevert "Remove the global thread list."
Elliott Hughes [Thu, 2 Feb 2017 02:41:38 +0000 (02:41 +0000)]
Revert "Remove the global thread list."

This reverts commit b0e8c565a622b5519e03d4416b0b5b1a5f20d7f5.

Breaks swiftshader (http:/b/34883464).

Change-Id: I7b21193ba8a78f07d7ac65e41d0fe8516940a83b

7 years agoMerge "Exit failure if trying to load non-PIE."
Dan Albert [Wed, 1 Feb 2017 23:38:33 +0000 (23:38 +0000)]
Merge "Exit failure if trying to load non-PIE."

7 years agoMerge "Check overflows in c-tor instead of doing it in d-tor"
Treehugger Robot [Wed, 1 Feb 2017 22:58:22 +0000 (22:58 +0000)]
Merge "Check overflows in c-tor instead of doing it in d-tor"

7 years agoCheck overflows in c-tor instead of doing it in d-tor
Dimitry Ivanov [Wed, 1 Feb 2017 20:55:11 +0000 (12:55 -0800)]
Check overflows in c-tor instead of doing it in d-tor

Test: bionic-unit-tests --gtest_filter=dl*:Dl*
Change-Id: Id3b17a79732155b4e469c43c764afef1dfc59057

7 years agoMerge "Do not load second copy of a library into same namespace"
Treehugger Robot [Wed, 1 Feb 2017 19:23:55 +0000 (19:23 +0000)]
Merge "Do not load second copy of a library into same namespace"

7 years agoDo not load second copy of a library into same namespace
Dimitry Ivanov [Wed, 1 Feb 2017 16:54:43 +0000 (08:54 -0800)]
Do not load second copy of a library into same namespace

This workaround was introduced in M in order to make sure
that linker loads libraries provided in apk in case a library
with the same name was loaded by the system.

This is no longer a problem starting with Android N because
app is using different namespace and therefore does not see
libraries loaded by the system.

Test: bionic-unit-tests --gtest_filter=dl*:Dl*
Change-Id: I9995258c0f361e8df35420682b84e85a0cb924b4

7 years agoMerge "Remove the global thread list."
Elliott Hughes [Wed, 1 Feb 2017 16:16:41 +0000 (16:16 +0000)]
Merge "Remove the global thread list."

7 years agoMerge "bionic: move ADF uapi header out of bionic"
Treehugger Robot [Wed, 1 Feb 2017 04:38:12 +0000 (04:38 +0000)]
Merge "bionic: move ADF uapi header out of bionic"

7 years agoMerge "Revert "Fix CFI initialization crash on x86.""
Evgenii Stepanov [Wed, 1 Feb 2017 01:14:48 +0000 (01:14 +0000)]
Merge "Revert "Fix CFI initialization crash on x86.""

7 years agoRevert "Fix CFI initialization crash on x86."
Evgenii Stepanov [Wed, 1 Feb 2017 01:10:03 +0000 (17:10 -0800)]
Revert "Fix CFI initialization crash on x86."

Breaks aosp-master/sdk.

This reverts commit 4ccd4317f9301ec9b32aa0d3317a0439b994d7bf.

7 years agoMerge "Fix CFI initialization crash on x86."
Evgenii Stepanov [Wed, 1 Feb 2017 00:29:57 +0000 (00:29 +0000)]
Merge "Fix CFI initialization crash on x86."

7 years agoExit failure if trying to load non-PIE.
Dan Albert [Wed, 1 Feb 2017 00:02:43 +0000 (16:02 -0800)]
Exit failure if trying to load non-PIE.

Amazingly this was actually breaking the NDK's ability to build
libstdc++ for x86.

Test: mma
Bug: None
Change-Id: Iafa55c31fdeb35caca7d7d7a39a3e7afa0713557

7 years agoFix CFI initialization crash on x86.
Evgenii Stepanov [Tue, 31 Jan 2017 21:19:30 +0000 (13:19 -0800)]
Fix CFI initialization crash on x86.

Second try.

Bug: 34752378
Test: bionic tests
Change-Id: I0a7453154671918b2e6e72f0bb9074c29ceb0f34

7 years agoAdd "benchmark" to time atomic operations
Hans Boehm [Tue, 24 Jan 2017 01:30:44 +0000 (17:30 -0800)]
Add "benchmark" to time atomic operations

The intent here is to confirm that the compiler behaves as expected,
and to guide optimization efforts, particularly where there is a
choice between primitives.

Test: Built and ran benchmark on Angler repeatedly. Manually confirmed
that the compiler behaves roughly as expected.

Change-Id: I059b245d1ba8296e9b28602559b53eafafe0a30f

7 years agoMerge "s/NULL/nullptr/ in system properties code."
Treehugger Robot [Tue, 31 Jan 2017 18:19:46 +0000 (18:19 +0000)]
Merge "s/NULL/nullptr/ in system properties code."

7 years agos/NULL/nullptr/ in system properties code.
Elliott Hughes [Tue, 31 Jan 2017 16:24:43 +0000 (08:24 -0800)]
s/NULL/nullptr/ in system properties code.

gerrit still hasn't sent out the mail asking for this in an earlier code
review...

Bug: http://b/33926793
Test: builds and boots.
Change-Id: I080de633e50e47f9a052211d47da96b971b16424

7 years agoMerge "clang-format system_properties.cpp."
Treehugger Robot [Tue, 31 Jan 2017 15:20:19 +0000 (15:20 +0000)]
Merge "clang-format system_properties.cpp."

7 years agoMerge "Revert "Fix CFI initialization crash on x86.""
Alex Cheung [Tue, 31 Jan 2017 06:27:17 +0000 (06:27 +0000)]
Merge "Revert "Fix CFI initialization crash on x86.""

7 years agoRevert "Fix CFI initialization crash on x86."
Alex Cheung [Tue, 31 Jan 2017 04:05:00 +0000 (04:05 +0000)]
Revert "Fix CFI initialization crash on x86."

This reverts commit be46d3871c91902504e5ec4c7f575c86f647aafc.

Reverting due to broken build:

https://android-build.googleplex.com/builds/branch-dashboard/aosp-master?build_id=3687823

Change-Id: I30968398edd9a094fce878839ba0a002ed487a77

7 years agoclang-format system_properties.cpp.
Elliott Hughes [Tue, 31 Jan 2017 01:54:57 +0000 (17:54 -0800)]
clang-format system_properties.cpp.

Asked for on a previous code review.

Bug: http://b/33926793
Test: builds and boots.
Change-Id: Idf34804896149db5edbddf4ed88396a5df7f708a

7 years agoMerge "Fix CFI initialization crash on x86."
Evgenii Stepanov [Tue, 31 Jan 2017 00:58:09 +0000 (00:58 +0000)]
Merge "Fix CFI initialization crash on x86."

7 years agoMerge "glibc ipc64_perm __key compatibility."
Treehugger Robot [Mon, 30 Jan 2017 23:01:00 +0000 (23:01 +0000)]
Merge "glibc ipc64_perm __key compatibility."

7 years agoFix CFI initialization crash on x86.
Evgenii Stepanov [Fri, 27 Jan 2017 21:42:03 +0000 (13:42 -0800)]
Fix CFI initialization crash on x86.

Bug: 34752378
Test: bionic tests
Change-Id: If8e33f76a1a2d83356d818fed506ea624f579860

7 years agoMerge "property_contexts: split into platform and non-platform components"
Sandeep Patil [Mon, 30 Jan 2017 19:16:16 +0000 (19:16 +0000)]
Merge "property_contexts: split into platform and non-platform components"

7 years agoMerge "Remove backwards compatibility for old system properties."
Treehugger Robot [Sat, 28 Jan 2017 16:44:09 +0000 (16:44 +0000)]
Merge "Remove backwards compatibility for old system properties."

7 years agoglibc ipc64_perm __key compatibility.
Elliott Hughes [Sat, 28 Jan 2017 03:12:32 +0000 (19:12 -0800)]
glibc ipc64_perm __key compatibility.

glibc gives the `struct ipc64_perm` fields `key` and `seq` double-underscore
names. strace refers to the fields by those names, and there's no obvious
reason not to go along with this.

Bug: N/A
Test: built strace 4.15 with a hacked NDK
Change-Id: I8b2b0f75363349d99edaecda50fe897ee0fa0c65

7 years agoRemove backwards compatibility for old system properties.
Elliott Hughes [Fri, 27 Jan 2017 00:48:57 +0000 (16:48 -0800)]
Remove backwards compatibility for old system properties.

No-one is directly upgrading from pre-K to O...

Also move more implementation details out of the header file.

Bug: http://b/33926793
Test: boots
Change-Id: I7a0936acbb1cea8a3b2cd6797ec53ba7e4a050f3

7 years agoproperty_contexts: split into platform and non-platform components
Sandeep Patil [Wed, 28 Dec 2016 01:37:44 +0000 (17:37 -0800)]
property_contexts: split into platform and non-platform components

Bug: 33746484
Bug: 34370523
Test: Successfully boot with original service and property contexts.
Test: Successfully boot with split serivce and property contexts.
Test: Incremental build works on sailfish (reported in b/34370523)
Test: adb sideload works with aosp updater (reported in b/34370523)

Change-Id: Idf24856193032a8bc89ec384a72451e578a9d5ac
Signed-off-by: Sandeep Patil <sspatil@google.com>
7 years agoMerge "Update to kernel headers v4.9.6."
Treehugger Robot [Fri, 27 Jan 2017 21:11:50 +0000 (21:11 +0000)]
Merge "Update to kernel headers v4.9.6."

7 years agobionic: move ADF uapi header out of bionic
Greg Hackmann [Fri, 27 Jan 2017 18:07:36 +0000 (10:07 -0800)]
bionic: move ADF uapi header out of bionic

ADF isn't a candidate for upstreaming and isn't (directly) usable from
unprivileged NDK code, so it makes more sense to keep video/adf.h as a
private header inside libadf, where it'll still be usable by HWC
implementations without shipping in the NDK.

libadf exports its entire include/ directory, so this shouldn't have any
impact on HWC implementations that already link against libadf.

Test: mmm system/core/adf/libadf
Test: /data/nativetest64/adf-unit-tests/adf-unit-tests (on Nexus 9)
Change-Id: I6573f539cfd7fc65433237d0b115b8b7b2728133
Signed-off-by: Greg Hackmann <ghackmann@google.com>
7 years agoUpdate to kernel headers v4.9.6.
Christopher Ferris [Fri, 27 Jan 2017 18:49:48 +0000 (10:49 -0800)]
Update to kernel headers v4.9.6.

Test: Built arm/arm64/x86/x86_64 targets.
Change-Id: Id4d2711aaa96fe537f3726a0a89f2959e9cca34a

7 years agoMerge "Update to kernel headers v4.9.3."
Christopher Ferris [Fri, 27 Jan 2017 17:50:45 +0000 (17:50 +0000)]
Merge "Update to kernel headers v4.9.3."

7 years agoMerge "Silence unused variable warning in sys_ptrace_test"
Pavel Labath [Fri, 27 Jan 2017 13:59:15 +0000 (13:59 +0000)]
Merge "Silence unused variable warning in sys_ptrace_test"

7 years agoSilence unused variable warning in sys_ptrace_test
Pavel Labath [Fri, 27 Jan 2017 13:04:26 +0000 (13:04 +0000)]
Silence unused variable warning in sys_ptrace_test

This fixes the mips build broken by
I7d8a7d79585477d78da1f033c85f8d2cc3b34340.

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

7 years agoMerge "Add hardware breakpoint ptrace test"
Pavel Labath [Fri, 27 Jan 2017 12:39:51 +0000 (12:39 +0000)]
Merge "Add hardware breakpoint ptrace test"

7 years agoAdd hardware breakpoint ptrace test
Pavel Labath [Mon, 23 Jan 2017 15:41:35 +0000 (15:41 +0000)]
Add hardware breakpoint ptrace test

This adds a ptrace test which tests the hardware breakpoint
functionality of the ptrace api.

I've also renamed the test case to sys_ptrace to better match the naming
scheme in the other files. I've ran the tests on angler (32 and 64 bit)
and fugu.

Test: run the test
Change-Id: I7d8a7d79585477d78da1f033c85f8d2cc3b34340

7 years agoMerge "Remove dependency on libc.a from the linker"
Treehugger Robot [Fri, 27 Jan 2017 03:03:50 +0000 (03:03 +0000)]
Merge "Remove dependency on libc.a from the linker"

7 years agoMerge "Remove bionic-unit-tests-gcc"
Dimitry Ivanov [Fri, 27 Jan 2017 01:28:03 +0000 (01:28 +0000)]
Merge "Remove bionic-unit-tests-gcc"

7 years agoRemove dependency on libc.a from the linker
Dimitry Ivanov [Fri, 27 Jan 2017 00:52:59 +0000 (16:52 -0800)]
Remove dependency on libc.a from the linker

Provide stub for unused but needed symbol __find_icu_symbol
which is not included to libc_nomalloc.a.

Test: mm and boot
Change-Id: I57ca09c990556d1d401e2f4a75bc49b61b4cd85d

7 years agoRemove bionic-unit-tests-gcc
Dimitry Ivanov [Thu, 17 Nov 2016 21:01:47 +0000 (13:01 -0800)]
Remove bionic-unit-tests-gcc

Test: mm
Bug: 34747525
Change-Id: Ib17ac3535b6f3358af7098df0602d19c6e318cb7

7 years agoMerge "Adding kuser_helper on note to all arm32 binaries."
Max Spector [Thu, 26 Jan 2017 18:43:39 +0000 (18:43 +0000)]
Merge "Adding kuser_helper on note to all arm32 binaries."

7 years agoMerge "Fix bionic-unit-tests in arch with binary translator"
Victor Khimenko [Thu, 26 Jan 2017 10:11:13 +0000 (10:11 +0000)]
Merge "Fix bionic-unit-tests in arch with binary translator"

7 years agoMerge "Don't mark __res_params or android_net_context as packed."
Treehugger Robot [Thu, 26 Jan 2017 07:13:16 +0000 (07:13 +0000)]
Merge "Don't mark __res_params or android_net_context as packed."

7 years agoAdding kuser_helper on note to all arm32 binaries.
mspector [Wed, 25 Jan 2017 05:51:51 +0000 (21:51 -0800)]
Adding kuser_helper on note to all arm32 binaries.

A kernel change is going in for 64bit arm to disable kuser_helper vector
pages for 32bit processes.  This change adds a special elf note to
all arm32 binaries built with bionic.  This note tells the kernel to
load the kuser_helper vector page for the process.

Bug: 33689037
Test: Manual - Phone boots, 32bit binaries have the notes, 64bit
binaries do not.
Change-Id: Ib8366e2a0810092b71381d57dee4bdaa56369a24

7 years agoUpdate to kernel headers v4.9.3.
Christopher Ferris [Fri, 13 Jan 2017 22:09:31 +0000 (14:09 -0800)]
Update to kernel headers v4.9.3.

Test: Built arm, arm64, x86, x86_64 targets.
Test: Booted on angler, and ran bionic unit tests (32 bit and 64 bit).

Change-Id: I14a8dcbea11b41f83431eabed6590cd25af07b1d

7 years agoMerge "Use trap not kill in seccomp filter"
Paul Lawrence [Wed, 25 Jan 2017 22:46:05 +0000 (22:46 +0000)]
Merge "Use trap not kill in seccomp filter"

7 years agoFix bionic-unit-tests in arch with binary translator
Victor Khimenko [Wed, 25 Jan 2017 18:59:16 +0000 (19:59 +0100)]
Fix bionic-unit-tests in arch with binary translator

If binary translator is involved then libc is not place in /system/lib
or /system/lib64.  It's placed into /syste/lib/arm, /system/lib/arm64,
etc.  FUGU is an example of such an architecture.

Support both cases by picking right path at runtime.

Test: run bionic-unit-tests --gtest_filter=dlfcn.dladdr_libc
Change-Id: I8345c0f6c19376ebe5106f9670fd2addeb9b9080

7 years agoMerge "Fix bionic-unit-tests in some non-standard builds"
Victor Khimenko [Wed, 25 Jan 2017 10:05:40 +0000 (10:05 +0000)]
Merge "Fix bionic-unit-tests in some non-standard builds"

7 years agoDon't mark __res_params or android_net_context as packed.
Stephen Hines [Wed, 25 Jan 2017 08:39:47 +0000 (00:39 -0800)]
Don't mark __res_params or android_net_context as packed.

Bug: http://b/31532493

These internal API structures are never actually used anywhere that
would change behavior because it is "packed", so it is safe to remove.

Test: Builds correctly with the latest toolchain.
Change-Id: I5431992d840777605be75ab91dc21158d6d22c26

7 years agoMerge changes from topic 'property_service_protocol_v2'
Dimitry Ivanov [Wed, 25 Jan 2017 03:53:56 +0000 (03:53 +0000)]
Merge changes from topic 'property_service_protocol_v2'

* changes:
  Do not send 0 byte string content.
  Revert "Revert "Remove limit of system property name length""

7 years agoDo not send 0 byte string content.
Dimitry Ivanov [Tue, 24 Jan 2017 20:39:33 +0000 (12:39 -0800)]
Do not send 0 byte string content.

Trying to send even 0 bytes to closed socket leads to
broken pipe error. Sometimes property service is just
quick enough and closes the socket between send(valuelen)
and send(value) in the case where valuelen is 0.

Bug: http://b/34670529
Test: adb reboot 20 times and make sure phone service did not fail
Test: run bionic-unit-tests --gtest_filter=prop*
Change-Id: I96f90ca6fe1790614e7efd3015bffed1ef1e9040

7 years agoFix bionic-unit-tests in some non-standard builds
Victor Khimenko [Tue, 24 Jan 2017 21:12:07 +0000 (22:12 +0100)]
Fix bionic-unit-tests in some non-standard builds

The binary bionic-unit-tests is linked with some shared libraries
and these libraries are found in ${ORIGIN}/../bionic-loader-test-libs
directory specified by runpath.  This makes it higly unlikely that
anyone would be run these files when ${ORIGIN}/../bionic-loader-test-libs
does not include proper files.

Bug: http://b/34681268
Test: run bionic-unit-tests --gtest_filter=dl*:Dl*

Change-Id: I52fc31339fdfa232c0fdafa218eadaeaf5551a8d

7 years agoRevert "Revert "Remove limit of system property name length""
Dimitry Ivanov [Tue, 24 Jan 2017 20:43:29 +0000 (20:43 +0000)]
Revert "Revert "Remove limit of system property name length""

This reverts commit 489f58b5eaedd5a80635bb3a7b39e97037c585f6.
Bug: http://b/33926793
Bug: http://b/34670529
Test: Run bionic-unit-tests --gtest_filter=prop*

Change-Id: Id4e94652dc2310a21f5b7bd3af098bf79df3f380

7 years agoMerge "[cfi] Handle large libraries correctly."
Evgenii Stepanov [Tue, 24 Jan 2017 20:56:28 +0000 (20:56 +0000)]
Merge "[cfi] Handle large libraries correctly."

7 years agoMerge "Revert "Remove limit of system property name length""
Dimitry Ivanov [Tue, 24 Jan 2017 20:00:43 +0000 (20:00 +0000)]
Merge "Revert "Remove limit of system property name length""

7 years agoUse trap not kill in seccomp filter
Paul Lawrence [Tue, 24 Jan 2017 18:44:55 +0000 (10:44 -0800)]
Use trap not kill in seccomp filter

Bug: 34647665
Test: Make sure boots, check that causing a seccomp failure creates a
      crash dump

Change-Id: I5ab2fe3e8322a3c38318c97d343834baa874af8d

7 years agoRevert "Remove limit of system property name length"
Dimitry Ivanov [Tue, 24 Jan 2017 18:39:04 +0000 (18:39 +0000)]
Revert "Remove limit of system property name length"

This reverts commit 5c1ce278f31bc6fc338b9b951f1adc7c2b343d7c.
Bug: http://b/33926793
Bug: http://b/34670529

Change-Id: I0dc4a8ae55576c69b34b2958d8e664f7066b9c54

7 years agoMerge "Removed include log\logger.h from log_fake.cpp"
Vijay Venkatraman [Tue, 24 Jan 2017 17:36:08 +0000 (17:36 +0000)]
Merge "Removed include log\logger.h from log_fake.cpp"

7 years agoRemoved include log\logger.h from log_fake.cpp
Vijay Venkatraman [Tue, 24 Jan 2017 02:56:53 +0000 (18:56 -0800)]
Removed include log\logger.h from log_fake.cpp

Test: Compile malloc_debug_unit_tests
Change-Id: I635687016570ba52c571435b87d8e89f7f04d609

7 years agoMerge "Remove limit of system property name length"
Dimitry Ivanov [Tue, 24 Jan 2017 02:54:33 +0000 (02:54 +0000)]
Merge "Remove limit of system property name length"

7 years agoMerge "Remove libc++ dependency from prebuilt test-libs"
Treehugger Robot [Tue, 24 Jan 2017 00:35:59 +0000 (00:35 +0000)]
Merge "Remove libc++ dependency from prebuilt test-libs"

7 years agoMerge "Mark ifunc tests failing on arm as known failures"
Treehugger Robot [Tue, 24 Jan 2017 00:24:40 +0000 (00:24 +0000)]
Merge "Mark ifunc tests failing on arm as known failures"

7 years agoMark ifunc tests failing on arm as known failures
Dimitry Ivanov [Mon, 23 Jan 2017 22:48:21 +0000 (14:48 -0800)]
Mark ifunc tests failing on arm as known failures

Bug: http://b/27930475
Test: run bionic-unit-tests on arm and arm64
Change-Id: I5084b6a5ef4b56ca9985da63a5e6896f771810f0

7 years agoRemove libc++ dependency from prebuilt test-libs
Dimitry Ivanov [Fri, 20 Jan 2017 23:47:03 +0000 (15:47 -0800)]
Remove libc++ dependency from prebuilt test-libs

Bug: http://b/27549327
Test: run bionic-unit-tests --gtest_filter=dl*:Dl* on angler
Change-Id: Ia09ed2c00213bc07bf2a4c772e675419f7a30cb3

7 years agoRemove limit of system property name length
Dimitry Ivanov [Thu, 3 Dec 2015 19:26:38 +0000 (11:26 -0800)]
Remove limit of system property name length

This change introduces new __system_property_read_callback
method to use in place of deprecated __system_property_read
__system_property_set() and get() should just work but now
do not have limit on system property names.

Bug: http://b/33926793
Test: boot device, run adb shell propget
Test: boot device with old version of init (protocol v1)
Test: run bionic-unit-tests --gtest_filter=prop*
Change-Id: I619fb5a7e27a272aac30011579665f6160888bc7

7 years ago[cfi] Handle large libraries correctly.
Evgenii Stepanov [Fri, 20 Jan 2017 21:47:04 +0000 (13:47 -0800)]
[cfi] Handle large libraries correctly.

Fallback to unchecked if the shadow offset overflows int16_t.
This may happen when a library's data segment is larger than 256MB.

Also updated some comments.

Bug: 22033465
Test: bionic device tests

Change-Id: I8eef42f75099f24aed566499ff1731a0bbf01ff3

7 years agoMerge "Add props files for each partition"
Treehugger Robot [Fri, 20 Jan 2017 03:58:51 +0000 (03:58 +0000)]
Merge "Add props files for each partition"

7 years agoAdd props files for each partition
Jaekyun Seok [Tue, 17 Jan 2017 05:44:31 +0000 (14:44 +0900)]
Add props files for each partition

The following files will be added.
- /vendor/default.prop for default prop overrides from vendor
 partition.
- /odm/default.prop for default prop overrides from odm partition.
- /odm/build.prop for build prop overrides from odm partition.

Test: tested default/build prop files with enabling early mount, but
didn't test files of odm partition because odm partition doesn't
exist now.
Bug: 34116668
Change-Id: Ia99895a0afcdc522463d95b2f3e2841dcf2e3516

7 years agoMerge "Add seccomp support library"
Treehugger Robot [Thu, 19 Jan 2017 23:26:09 +0000 (23:26 +0000)]
Merge "Add seccomp support library"

7 years agoAdd seccomp support library
Paul Lawrence [Fri, 11 Nov 2016 19:33:42 +0000 (11:33 -0800)]
Add seccomp support library

Policy library which exports an autogenerated policy from SYSCALLS.TXT
blocking any other calls.

Test: Generate policy, install onto Sailfish, check boots, Chrome runs,
calls are blocked.
Bug: 32313202

Change-Id: Ib590704e50122f077eeae26561eb9b0a70386551