Commit graph

20269 commits

Author SHA1 Message Date
Hans Boehm
3f5578708d 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
2017-01-31 10:20:26 -08:00
Treehugger Robot
eb35144e58 Merge "s/NULL/nullptr/ in system properties code." 2017-01-31 18:19:48 +00:00
Elliott Hughes
8e7396c9d7 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
2017-01-31 08:24:43 -08:00
Treehugger Robot
44bea80d31 Merge "clang-format system_properties.cpp." 2017-01-31 15:20:20 +00:00
Alex Cheung
9750d6b691 Merge "Revert "Fix CFI initialization crash on x86."" 2017-01-31 06:27:17 +00:00
Alex Cheung
6fcd7a7d28 Revert "Fix CFI initialization crash on x86."
This reverts commit be46d3871c.

Reverting due to broken build:

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

Change-Id: I30968398edd9a094fce878839ba0a002ed487a77
2017-01-31 04:19:50 +00:00
Elliott Hughes
9160ed9bb7 clang-format system_properties.cpp.
Asked for on a previous code review.

Bug: http://b/33926793
Test: builds and boots.
Change-Id: Idf34804896149db5edbddf4ed88396a5df7f708a
2017-01-30 17:54:57 -08:00
Evgenii Stepanov
a5066640cc Merge "Fix CFI initialization crash on x86." 2017-01-31 00:58:10 +00:00
Treehugger Robot
5dc75c6c4d Merge "glibc ipc64_perm __key compatibility." 2017-01-30 23:01:01 +00:00
Evgenii Stepanov
be46d3871c Fix CFI initialization crash on x86.
Bug: 34752378
Test: bionic tests
Change-Id: If8e33f76a1a2d83356d818fed506ea624f579860
2017-01-30 14:29:48 -08:00
Sandeep Patil
93e272d00a Merge "property_contexts: split into platform and non-platform components" 2017-01-30 19:16:17 +00:00
Treehugger Robot
0c6f806b1d Merge "Remove backwards compatibility for old system properties." 2017-01-28 16:44:11 +00:00
Elliott Hughes
a29821bb45 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
2017-01-27 19:12:32 -08:00
Elliott Hughes
f8562c5f8f 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
2017-01-27 16:19:59 -08:00
Sandeep Patil
34f0cfa3a8 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>
2017-01-27 13:12:32 -08:00
Treehugger Robot
6a9e0c8f15 Merge "Update to kernel headers v4.9.6." 2017-01-27 21:11:51 +00:00
Greg Hackmann
7518109063 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>
2017-01-27 13:01:51 -08:00
Christopher Ferris
351a796d2d Update to kernel headers v4.9.6.
Test: Built arm/arm64/x86/x86_64 targets.
Change-Id: Id4d2711aaa96fe537f3726a0a89f2959e9cca34a
2017-01-27 10:49:48 -08:00
Christopher Ferris
00e388df4e Merge "Update to kernel headers v4.9.3." 2017-01-27 17:50:46 +00:00
Pavel Labath
15db5d0d29 Merge "Silence unused variable warning in sys_ptrace_test" 2017-01-27 13:59:17 +00:00
Pavel Labath
bb9713dd91 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
2017-01-27 13:06:22 +00:00
Pavel Labath
3f62787cf9 Merge "Add hardware breakpoint ptrace test" 2017-01-27 12:39:52 +00:00
Pavel Labath
fb082ee00c 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
2017-01-27 12:39:32 +00:00
Treehugger Robot
2ca556bb6e Merge "Remove dependency on libc.a from the linker" 2017-01-27 03:03:50 +00:00
Dimitry Ivanov
55aae03a60 Merge "Remove bionic-unit-tests-gcc" 2017-01-27 01:28:03 +00:00
Dimitry Ivanov
451909da31 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
2017-01-26 17:08:01 -08:00
Dimitry Ivanov
3c81d5b361 Remove bionic-unit-tests-gcc
Test: mm
Bug: 34747525
Change-Id: Ib17ac3535b6f3358af7098df0602d19c6e318cb7
2017-01-26 15:47:55 -08:00
Max Spector
577a944200 Merge "Adding kuser_helper on note to all arm32 binaries." 2017-01-26 18:43:40 +00:00
Victor Khimenko
3c0363d7fd Merge "Fix bionic-unit-tests in arch with binary translator" 2017-01-26 10:11:14 +00:00
Treehugger Robot
0c45c7dc5e Merge "Don't mark __res_params or android_net_context as packed." 2017-01-26 07:13:21 +00:00
mspector
2e3d6a1d67 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
2017-01-25 17:33:05 -08:00
Christopher Ferris
6a9755d20a 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
2017-01-25 16:23:56 -08:00
Paul Lawrence
6418f95ca2 Merge "Use trap not kill in seccomp filter" 2017-01-25 22:46:06 +00:00
Victor Khimenko
14b9d7199c 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
2017-01-25 20:57:48 +01:00
Victor Khimenko
18c009ca96 Merge "Fix bionic-unit-tests in some non-standard builds" 2017-01-25 10:05:41 +00:00
Stephen Hines
9935e0fcee 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
2017-01-25 00:42:45 -08:00
Dimitry Ivanov
3f6d599775 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""
2017-01-25 03:54:04 +00:00
Dimitry Ivanov
cafd355375 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
2017-01-24 14:19:03 -08:00
Victor Khimenko
65273fb630 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
2017-01-24 22:20:03 +01:00
Dimitry Ivanov
16b2a4de14 Revert "Revert "Remove limit of system property name length""
This reverts commit 489f58b5ea.
Bug: http://b/33926793
Bug: http://b/34670529
Test: Run bionic-unit-tests --gtest_filter=prop*

Change-Id: Id4e94652dc2310a21f5b7bd3af098bf79df3f380
2017-01-24 12:58:18 -08:00
Evgenii Stepanov
d8388cd303 Merge "[cfi] Handle large libraries correctly." 2017-01-24 20:56:30 +00:00
Dimitry Ivanov
40250bb683 Merge "Revert "Remove limit of system property name length"" 2017-01-24 20:00:44 +00:00
Paul Lawrence
3d9fc696a5 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
2017-01-24 11:07:04 -08:00
Dimitry Ivanov
489f58b5ea Revert "Remove limit of system property name length"
This reverts commit 5c1ce278f3.
Bug: http://b/33926793
Bug: http://b/34670529

Change-Id: I0dc4a8ae55576c69b34b2958d8e664f7066b9c54
2017-01-24 18:39:04 +00:00
Vijay Venkatraman
f0b42ae973 Merge "Removed include log\logger.h from log_fake.cpp" 2017-01-24 17:36:09 +00:00
Vijay Venkatraman
191d2f3c99 Removed include log\logger.h from log_fake.cpp
Test: Compile malloc_debug_unit_tests
Change-Id: I635687016570ba52c571435b87d8e89f7f04d609
2017-01-23 18:56:53 -08:00
Dimitry Ivanov
440d6c7644 Merge "Remove limit of system property name length" 2017-01-24 02:54:34 +00:00
Treehugger Robot
8bb01c0719 Merge "Remove libc++ dependency from prebuilt test-libs" 2017-01-24 00:36:00 +00:00
Treehugger Robot
3685e4515f Merge "Mark ifunc tests failing on arm as known failures" 2017-01-24 00:24:41 +00:00
Dimitry Ivanov
01c888c857 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
2017-01-23 14:52:07 -08:00