OSDN Git Service

android-x86/bionic.git
7 years agoDocument bionic loader logging properties
Dimitry Ivanov [Wed, 14 Dec 2016 22:42:44 +0000 (14:42 -0800)]
Document bionic loader logging properties

Bug: http://b/29458203
Test: spellchecker in vim
Change-Id: I81e60a09fa256110d7ab9b530e7821ae66e8f020

7 years agoMerge "Update socket constants."
Elliott Hughes [Wed, 14 Dec 2016 16:28:24 +0000 (16:28 +0000)]
Merge "Update socket constants."

7 years agoMerge "Update to kernel headers v4.8.14."
Christopher Ferris [Tue, 13 Dec 2016 23:40:00 +0000 (23:40 +0000)]
Merge "Update to kernel headers v4.8.14."

7 years agoUpdate socket constants.
Elliott Hughes [Tue, 13 Dec 2016 23:29:58 +0000 (15:29 -0800)]
Update socket constants.

This corresponds to Linux 4.10.

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

7 years agoMerge "libc: ARM64: update memset/strlen/memcpy/memmove to newlib/cortex-strings"
Christopher Ferris [Tue, 13 Dec 2016 23:11:27 +0000 (23:11 +0000)]
Merge "libc: ARM64: update memset/strlen/memcpy/memmove to newlib/cortex-strings"

7 years agoMerge "Remove BSD cruft from <pwd.h>."
Elliott Hughes [Tue, 13 Dec 2016 22:55:05 +0000 (22:55 +0000)]
Merge "Remove BSD cruft from <pwd.h>."

7 years agoMerge "Rename <grp.h>/<pwd.h> tests to fit the usual pattern."
Elliott Hughes [Tue, 13 Dec 2016 22:53:24 +0000 (22:53 +0000)]
Merge "Rename <grp.h>/<pwd.h> tests to fit the usual pattern."

7 years agoMerge "bionic-unit-tests: Build host testlibs in bionic-loader-test-libs"
Treehugger Robot [Tue, 13 Dec 2016 19:32:09 +0000 (19:32 +0000)]
Merge "bionic-unit-tests: Build host testlibs in bionic-loader-test-libs"

7 years agoUpdate to kernel headers v4.8.14.
Christopher Ferris [Mon, 12 Dec 2016 22:55:36 +0000 (14:55 -0800)]
Update to kernel headers v4.8.14.

Test: Built mips/arm/arm64/x86/x86_64. Built and booted angler.
Change-Id: Icedb035769d8a41a170a6f1ecd707113e332d8dd

7 years agoMerge "Add a way to track all dlsym calls"
Treehugger Robot [Tue, 13 Dec 2016 02:25:48 +0000 (02:25 +0000)]
Merge "Add a way to track all dlsym calls"

7 years agoMerge "Repair dlwarning toast"
Treehugger Robot [Tue, 13 Dec 2016 02:10:50 +0000 (02:10 +0000)]
Merge "Repair dlwarning toast"

7 years agoRename <grp.h>/<pwd.h> tests to fit the usual pattern.
Elliott Hughes [Tue, 13 Dec 2016 01:32:14 +0000 (17:32 -0800)]
Rename <grp.h>/<pwd.h> tests to fit the usual pattern.

Bug: N/A
Test: ran tests
Change-Id: I5ec30cc17f94e631f3376b671055a0e82fb472c3

7 years agoRemove BSD cruft from <pwd.h>.
Elliott Hughes [Tue, 13 Dec 2016 01:31:02 +0000 (17:31 -0800)]
Remove BSD cruft from <pwd.h>.

Other C libraries don't have this, and it doesn't make sense on Android
anyway.

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

7 years agoMerge "versioner: use unique_ptr to handle ownership of FTS*."
Josh Gao [Tue, 13 Dec 2016 01:14:09 +0000 (01:14 +0000)]
Merge "versioner: use unique_ptr to handle ownership of FTS*."

7 years agoAdd a way to track all dlsym calls
Dimitry Ivanov [Tue, 13 Dec 2016 00:30:15 +0000 (16:30 -0800)]
Add a way to track all dlsym calls

Add dlsym option to debug.ld.all and debug.ld.app.<appname> which
enables logging of dlsym calls.

Bug: http://b/29458203
Test: flash, set debug.ld.all to dlsym and check
      if there are messages in logcat

Change-Id: I9cb815a38b5b98aac9ebe3ac1540bcdedd2e8db0

7 years agoMerge "Revert "move android_ids into bionic""
Treehugger Robot [Tue, 13 Dec 2016 00:31:25 +0000 (00:31 +0000)]
Merge "Revert "move android_ids into bionic""

7 years agoRepair dlwarning toast
Dimitry Ivanov [Tue, 13 Dec 2016 00:21:46 +0000 (16:21 -0800)]
Repair dlwarning toast

This was introduced by d9e427cf41893377dcdd0650ba20ff7cf7d72209
where libdl.c android_dlwarning method implementation was
not updated.

This makes it delegate the call to ld-android.so

Bug: http://b/33530622
Test: build, flash and launch test app
Change-Id: I8a379442de94724280638db73e5f7934f2ea394e

7 years agoMerge "Fix gtest_filter of bionic gtest runner."
Yabin Cui [Mon, 12 Dec 2016 23:59:06 +0000 (23:59 +0000)]
Merge "Fix gtest_filter of bionic gtest runner."

7 years agoRevert "move android_ids into bionic"
Elliott Hughes [Mon, 12 Dec 2016 22:11:37 +0000 (22:11 +0000)]
Revert "move android_ids into bionic"

This reverts commit 1a13db5b2675759316a8529873c5d29831a9ba32.

Change-Id: I7f571b3a9d542694d16fb9cf1131ef9e59d330ea

7 years agoMerge "Fix android_dlwarning lookup"
Dimitry Ivanov [Mon, 12 Dec 2016 22:02:08 +0000 (22:02 +0000)]
Merge "Fix android_dlwarning lookup"

7 years agoFix gtest_filter of bionic gtest runner.
Yabin Cui [Mon, 12 Dec 2016 21:32:15 +0000 (13:32 -0800)]
Fix gtest_filter of bionic gtest runner.

Bug: http://b/29514723
Test: run bionic-unit-tests --gtest-filter='*grp*'
Change-Id: I45ed561702bd601bae84c8d77824aa5769dbfa9c

7 years agoFix android_dlwarning lookup
Dimitry Ivanov [Mon, 12 Dec 2016 21:11:50 +0000 (13:11 -0800)]
Fix android_dlwarning lookup

Bug: http://b/33530622
Test: mm
Change-Id: I3eefca58e91b7bbc41f6add9b8c756f1474a7f93

7 years agoMerge "Fix the way to find negative filter pattern."
Yabin Cui [Sat, 10 Dec 2016 03:49:16 +0000 (03:49 +0000)]
Merge "Fix the way to find negative filter pattern."

7 years agoMerge "Bionic loader is no longer hijacking libdl.so"
Treehugger Robot [Sat, 10 Dec 2016 00:37:38 +0000 (00:37 +0000)]
Merge "Bionic loader is no longer hijacking libdl.so"

7 years agoMerge "move android_ids into bionic"
Elliott Hughes [Sat, 10 Dec 2016 00:13:04 +0000 (00:13 +0000)]
Merge "move android_ids into bionic"

7 years agoFix the way to find negative filter pattern.
Yabin Cui [Fri, 9 Dec 2016 23:49:09 +0000 (15:49 -0800)]
Fix the way to find negative filter pattern.

Bug: http://b/29514723
Test: run CtsBionicTestCases --gtest_filter=-Fortify2_clang.strncpy --gtest_list_tests
Change-Id: Ia3adec1fc03252adee4aed238b9c88508da17faf

7 years agoBionic loader is no longer hijacking libdl.so
Dimitry Ivanov [Wed, 23 Nov 2016 00:55:25 +0000 (16:55 -0800)]
Bionic loader is no longer hijacking libdl.so

Do not hijack libdl.so methods but make libdl proxy calls to
loader instead. This will be replaces by calls to libc.so
once loader functionality is migrated.

Also add a lock to dl_unwind_find_exidx function call.

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

7 years agobionic-unit-tests: Build host testlibs in bionic-loader-test-libs
Kevin Brodsky [Fri, 9 Dec 2016 09:54:42 +0000 (09:54 +0000)]
bionic-unit-tests: Build host testlibs in bionic-loader-test-libs

The target test libs are now all built in
nativetest/bionic-loader-test-libs. However, libs built using
libs/Android.build.testlib.mk are still put in lib/ on the host.

This commit refactors libs/Android.build.testlib*.mk so that all test
libs go into nativetest/bionic-loader-test-libs on the host; nothing
changes on the target. Android.build.mk now understands
*_install_to_native_tests_dir both for host and target builds.

Change-Id: I1022e9bab38bf53036c95fd39b3b240bcb31f23a

7 years agoMerge "Fix icu4c calling on x86."
Treehugger Robot [Fri, 9 Dec 2016 02:09:23 +0000 (02:09 +0000)]
Merge "Fix icu4c calling on x86."

7 years agoFix icu4c calling on x86.
Elliott Hughes [Thu, 8 Dec 2016 23:16:37 +0000 (15:16 -0800)]
Fix icu4c calling on x86.

Some of the function pointer types were wrong, and x86 cares if you
say `int` when you meant `int8_t` (because it feels at liberty to
leave the top bits dirty and ignore them, both sides need to agree
which they're dealing with).

Also slightly improve the wcstoimax and wcstoumax tests, since my
investigation started there.

Bug: http://b/33451822
Test: tests pass on x86, arm, and arm64
Change-Id: I553193962f0cb993666f9f8e415990bba5b669e1

7 years agoMerge "Fix linker_asan64 symlink"
Bill Napier [Thu, 8 Dec 2016 20:04:25 +0000 (20:04 +0000)]
Merge "Fix linker_asan64 symlink"

7 years agoFix linker_asan64 symlink
Colin Cross [Thu, 8 Dec 2016 17:57:35 +0000 (09:57 -0800)]
Fix linker_asan64 symlink

Soong now appends the suffix to the symlink, so the multilib-specific
symlink is no longer necessary.

Test: m -j out/target/product/angler/system/bin/linker_asan64
Test: Examine LOCAL_MODULE_SYMLINKS in out/soong/Android-aosp_angler.mk
Change-Id: I913a318bb31de3e630eebd2d68041a55ce3eccaf

7 years agoMerge "Add test for ambient caps"
Treehugger Robot [Wed, 7 Dec 2016 16:15:54 +0000 (16:15 +0000)]
Merge "Add test for ambient caps"

7 years agoAdd test for ambient caps
Greg Hackmann [Tue, 6 Dec 2016 23:17:59 +0000 (15:17 -0800)]
Add test for ambient caps

PR_CAP_AMBIENT landed in 4.3 and has been backported to earlier kernels
in kernel/common.

Test: bionic-unit-test --gtest_filter=sys_prctl.pr_cap_ambient
Change-Id: I632f6316ef1a4eb636d2bf7e07d541e400567ef4
Signed-off-by: Greg Hackmann <ghackmann@google.com>
7 years agoMerge remote-tracking branch 'goog/stage-aosp-master' into HEAD
Bill Yi [Tue, 6 Dec 2016 22:30:02 +0000 (14:30 -0800)]
Merge remote-tracking branch 'goog/stage-aosp-master' into HEAD

7 years agoMerge "loader: stop linking libdl/c/m into the loader"
Treehugger Robot [Tue, 6 Dec 2016 22:09:18 +0000 (22:09 +0000)]
Merge "loader: stop linking libdl/c/m into the loader"

7 years agoloader: stop linking libdl/c/m into the loader
Dimitry Ivanov [Tue, 6 Dec 2016 19:10:09 +0000 (11:10 -0800)]
loader: stop linking libdl/c/m into the loader

This is to prevent situations when libgcc.a calls into incorrect
implementation of dl_iterate_phdr.

Bug: http://b/27106625
Test: build && run bionic-unit-tests --getst_filter=dl*:Dl*
Change-Id: I4cba8c4a156f91f17ba3d95c39cb80f9b70c9d8f

7 years agoMerge "loader: asan path translation now works for symlinks"
Dimitry Ivanov [Tue, 6 Dec 2016 16:46:49 +0000 (16:46 +0000)]
Merge "loader: asan path translation now works for symlinks"
am: 53cad4beda

Change-Id: I6c8a67728d4af7a63a545ab76f6eb5148fe4c275

7 years agoMerge "loader: asan path translation now works for symlinks"
Dimitry Ivanov [Tue, 6 Dec 2016 16:42:49 +0000 (16:42 +0000)]
Merge "loader: asan path translation now works for symlinks"

7 years agoMerge "Revert "Bionic loader is no longer hijacking libdl.so""
Andreas Gampe [Tue, 6 Dec 2016 03:54:47 +0000 (03:54 +0000)]
Merge "Revert "Bionic loader is no longer hijacking libdl.so""
am: b1481bf347

Change-Id: I4c6302cb17125b67835b6b8b2657c8a472b620ec

7 years agoMerge "Revert "Bionic loader is no longer hijacking libdl.so""
Treehugger Robot [Tue, 6 Dec 2016 03:48:18 +0000 (03:48 +0000)]
Merge "Revert "Bionic loader is no longer hijacking libdl.so""

7 years agoRevert "Bionic loader is no longer hijacking libdl.so"
Andreas Gampe [Tue, 6 Dec 2016 02:10:13 +0000 (02:10 +0000)]
Revert "Bionic loader is no longer hijacking libdl.so"

This reverts commit c12acef96bd80c419654e159e1dc24a69513a86d.

Breaks the Mips build.

Bug: 27106625
Change-Id: I27edb7114065c36e1b618e387530d58189cdb184

7 years agoMerge "Document how to run CTS in the public documentation too."
Elliott Hughes [Mon, 5 Dec 2016 23:24:47 +0000 (23:24 +0000)]
Merge "Document how to run CTS in the public documentation too."
am: c28c8abc3e

Change-Id: Idf04c1d3e3cf0aec857a81d491675cbe07bdee2e

7 years agoMerge "Document how to run CTS in the public documentation too."
Treehugger Robot [Mon, 5 Dec 2016 23:19:45 +0000 (23:19 +0000)]
Merge "Document how to run CTS in the public documentation too."

7 years agoDocument how to run CTS in the public documentation too.
Elliott Hughes [Fri, 2 Dec 2016 21:22:21 +0000 (13:22 -0800)]
Document how to run CTS in the public documentation too.

Bug: N/A
Test: N/A
Change-Id: Ib9f46d09b56795d5202ec7167328042381cdc667

7 years agoloader: asan path translation now works for symlinks
Dimitry Ivanov [Mon, 5 Dec 2016 21:35:47 +0000 (13:35 -0800)]
loader: asan path translation now works for symlinks

Bionic Loader now resolves real path for a library before running
asan path-translation. This fixes situations for bundled loading
libraries which are effectively symlinks to system library;
for example:

 $ adb shell ls -l /system/app/NfcNci/lib/arm64/libnfc_nci_jni.so
 /system/app/NfcNci/lib/arm64/libnfc_nci_jni.so -> /system/lib64/libnfc_nci_jni.so

Bug: http://b/33278445
Test: make and boot
Change-Id: If14a12087c92f8ca628504556332ba0cb67c9118

7 years agoMerge "Bionic loader is no longer hijacking libdl.so"
Dimitry Ivanov [Mon, 5 Dec 2016 21:36:19 +0000 (21:36 +0000)]
Merge "Bionic loader is no longer hijacking libdl.so"
am: 3ccb2bfd7d

Change-Id: Iff274f82731b5072b56924ce8b2a58284e86550b

7 years agoMerge "Bionic loader is no longer hijacking libdl.so"
Treehugger Robot [Mon, 5 Dec 2016 21:31:49 +0000 (21:31 +0000)]
Merge "Bionic loader is no longer hijacking libdl.so"

7 years agoMerge "Remove all system properties references"
Erik Kline [Mon, 5 Dec 2016 21:20:08 +0000 (21:20 +0000)]
Merge "Remove all system properties references"
am: dbdc1709c2

Change-Id: I1012e4843373097c5246e347ed48bd430d19afab

7 years agoMerge "Remove all system properties references"
Treehugger Robot [Mon, 5 Dec 2016 21:12:41 +0000 (21:12 +0000)]
Merge "Remove all system properties references"

7 years agoBionic loader is no longer hijacking libdl.so
Dimitry Ivanov [Wed, 23 Nov 2016 00:55:25 +0000 (16:55 -0800)]
Bionic loader is no longer hijacking libdl.so

Do not hijack libdl.so methods but make libdl proxy calls to
loader instead. This will be replaces by calls to libc.so
once loader functionality is migrated.

Also add a lock to dl_unwind_find_exidx function call.

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

7 years agoRemove all system properties references
Erik Kline [Mon, 5 Dec 2016 01:42:12 +0000 (10:42 +0900)]
Remove all system properties references

Test: as follows
    - build
    - flash
    - runtest -x system/netd/tests/netd_integration_test.cpp
Bug: 33308258
Change-Id: I59526cb91e91b35a63ba6b413d444712568463e4

7 years agoMerge "Remove obsolete #include and comment."
Elliott Hughes [Mon, 5 Dec 2016 00:05:55 +0000 (00:05 +0000)]
Merge "Remove obsolete #include and comment."
am: f8b4ff4aa1

Change-Id: Id77faf4883b894c1d693d3007410da219041bb2e

7 years agoMerge "Remove obsolete #include and comment."
Treehugger Robot [Mon, 5 Dec 2016 00:01:34 +0000 (00:01 +0000)]
Merge "Remove obsolete #include and comment."

7 years agoRemove obsolete #include and comment.
Elliott Hughes [Sat, 3 Dec 2016 01:43:34 +0000 (17:43 -0800)]
Remove obsolete #include and comment.

Bug: http://b/33308258
Test: builds
Change-Id: Id6bbdae536a12134899fa57ea799f488d018db00

7 years agoMerge "Don't flush the per-netid cache when adding nameservers."
Erik Kline [Fri, 2 Dec 2016 23:59:00 +0000 (23:59 +0000)]
Merge "Don't flush the per-netid cache when adding nameservers."
am: 14998554dd

Change-Id: I774ce5fb46fccec29b047ac58b587ccb295d373e

7 years agoMerge "Don't flush the per-netid cache when adding nameservers."
Treehugger Robot [Fri, 2 Dec 2016 23:55:54 +0000 (23:55 +0000)]
Merge "Don't flush the per-netid cache when adding nameservers."

7 years agoMerge "Fix wcsto* where strings begin with whitespace."
Dan Albert [Fri, 2 Dec 2016 23:09:24 +0000 (23:09 +0000)]
Merge "Fix wcsto* where strings begin with whitespace."
am: 297ad4cbb8

Change-Id: Id431f98b267059daae5d2c8a7293205176f82be5

7 years agoMerge "Fix wcsto* where strings begin with whitespace."
Treehugger Robot [Fri, 2 Dec 2016 23:04:04 +0000 (23:04 +0000)]
Merge "Fix wcsto* where strings begin with whitespace."

7 years agoFix wcsto* where strings begin with whitespace.
Dan Albert [Fri, 2 Dec 2016 20:02:03 +0000 (12:02 -0800)]
Fix wcsto* where strings begin with whitespace.

The libc++ tests caught this.

Test: adb shell /data/nativetest/bionic-unit-tests/bionic-unit-tests
Bug: None
Change-Id: I14864e006f6cf9de3f96acac6aa3eb235894f2b1

7 years agoMerge "Fix unistd.execvpe_ENOEXEC and unistd.execvpe_failure."
Elliott Hughes [Fri, 2 Dec 2016 03:10:15 +0000 (03:10 +0000)]
Merge "Fix unistd.execvpe_ENOEXEC and unistd.execvpe_failure."
am: b2d36b4ec7

Change-Id: I7d0051a13e5e2097e256afdfbbc580f6733fc523

7 years agoMerge "Fix unistd.execvpe_ENOEXEC and unistd.execvpe_failure."
Treehugger Robot [Fri, 2 Dec 2016 02:59:33 +0000 (02:59 +0000)]
Merge "Fix unistd.execvpe_ENOEXEC and unistd.execvpe_failure."

7 years agoFix unistd.execvpe_ENOEXEC and unistd.execvpe_failure.
Elliott Hughes [Fri, 2 Dec 2016 01:12:49 +0000 (17:12 -0800)]
Fix unistd.execvpe_ENOEXEC and unistd.execvpe_failure.

These passed when run directly (as root) but failed in CTS' more restricted
environment.

Bug: http://b/33270012
Test: ran CTS tests
Change-Id: Iccb407769fe356c30d52a0a99fff11862134a250

7 years agoDon't flush the per-netid cache when adding nameservers.
Erik Kline [Tue, 8 Nov 2016 09:06:57 +0000 (18:06 +0900)]
Don't flush the per-netid cache when adding nameservers.

This wasn't really necessary in the >= Lollipop architecture.

Test: netd_integration_test fails (fixing separately)
Bug: 32517984
Change-Id: I8115bfe913ae6609f64b55161a1c8e28ce2619cf

7 years agoMerge "Disable coverage sanitizer when address sanitizer is disabled on libm."
Stephen Hines [Thu, 1 Dec 2016 16:34:36 +0000 (16:34 +0000)]
Merge "Disable coverage sanitizer when address sanitizer is disabled on libm."
am: 4511a59ab4

Change-Id: Ic79bbc59dab5de2dcbf345de49be18b95de319b0

7 years agoMerge "Disable coverage sanitizer when address sanitizer is disabled on libm."
Treehugger Robot [Thu, 1 Dec 2016 16:18:28 +0000 (16:18 +0000)]
Merge "Disable coverage sanitizer when address sanitizer is disabled on libm."

7 years agoDisable coverage sanitizer when address sanitizer is disabled on libm.
Stephen Hines [Thu, 1 Dec 2016 10:23:13 +0000 (02:23 -0800)]
Disable coverage sanitizer when address sanitizer is disabled on libm.

Test: Built bullhead with SANITIZE_TARGET="address coverage".
Change-Id: I9a8f9f42b3b8fdff6c5ff41ddd42a60c04f85a27

7 years agoMerge "Clean up <sys/limits.h> a bit."
Elliott Hughes [Thu, 1 Dec 2016 03:17:47 +0000 (03:17 +0000)]
Merge "Clean up <sys/limits.h> a bit."
am: cf922ff804

Change-Id: Ib0b097bcb1a5b731b3070e0ceb0a4bddc94cd355

7 years agoMerge "Clean up <sys/limits.h> a bit."
Elliott Hughes [Thu, 1 Dec 2016 03:08:44 +0000 (03:08 +0000)]
Merge "Clean up <sys/limits.h> a bit."

7 years agoMerge "Abort harder."
Elliott Hughes [Wed, 30 Nov 2016 23:22:31 +0000 (23:22 +0000)]
Merge "Abort harder."
am: 68ddf5cad3

Change-Id: I7eee73e41bf2c64efe2a840f4770808782629dee

7 years agoMerge "Abort harder."
Elliott Hughes [Wed, 30 Nov 2016 23:06:26 +0000 (23:06 +0000)]
Merge "Abort harder."

7 years agoMerge changes Iade6a185,Iab3050bd
Evgenii Stepanov [Wed, 30 Nov 2016 21:50:33 +0000 (21:50 +0000)]
Merge changes Iade6a185,Iab3050bd
am: f347046f2d

Change-Id: I804f5f0eca2baa6fd4135f6fdfa8def543751a5a

7 years agoCleanup: replace sanitize:never with address:false.
Evgenii Stepanov [Wed, 30 Nov 2016 21:50:31 +0000 (21:50 +0000)]
Cleanup: replace sanitize:never with address:false.
am: bc232b9f34

Change-Id: I1e1ed64c25672646d7a3a465e7edf3356d3163eb

7 years agoAdd __libc_arc4random_unlimited_entropy.
Josh Gao [Wed, 30 Nov 2016 21:50:26 +0000 (21:50 +0000)]
Add __libc_arc4random_unlimited_entropy.
am: 585fc3e554

Change-Id: Ie14370e99ced180f5031c7a9bb1ac938184fc094

7 years agoMerge changes Iade6a185,Iab3050bd
Evgenii Stepanov [Wed, 30 Nov 2016 21:34:04 +0000 (21:34 +0000)]
Merge changes Iade6a185,Iab3050bd

* changes:
  Cleanup: replace sanitize:never with address:false.
  Add __libc_arc4random_unlimited_entropy.

7 years agomove android_ids into bionic
William Roberts [Fri, 8 Apr 2016 20:44:19 +0000 (13:44 -0700)]
move android_ids into bionic

Generate the android_ids array and include into the
build.

Test: The bionic is built and that core AIDs work as
expected with commands like chown, mkdir and init services
and builtins.
Bug: 27999086
Change-Id: Ib575bf85326c91801c5674db475dcb9cf44c00dc
Signed-off-by: William Roberts <william.c.roberts@intel.com>
7 years agoMerge "Ship all the UAPI bits."
Dan Albert [Wed, 30 Nov 2016 19:55:45 +0000 (19:55 +0000)]
Merge "Ship all the UAPI bits."
am: f563ae89be

Change-Id: I1465164f5a9498c8962dca5bae89cea977c1dea0

7 years agoMerge "Ship all the UAPI bits."
Treehugger Robot [Wed, 30 Nov 2016 19:43:29 +0000 (19:43 +0000)]
Merge "Ship all the UAPI bits."

7 years agoMerge "Correct the return types of readv and writev."
Josh Gao [Wed, 30 Nov 2016 19:34:17 +0000 (19:34 +0000)]
Merge "Correct the return types of readv and writev."
am: 04a3b24d7e

Change-Id: Ifb0bab889ecb0847cf7b5af97bf706bd00eb3f99

7 years agoMerge "Correct the return types of readv and writev."
Treehugger Robot [Wed, 30 Nov 2016 19:26:05 +0000 (19:26 +0000)]
Merge "Correct the return types of readv and writev."

7 years agoClean up <sys/limits.h> a bit.
Elliott Hughes [Wed, 30 Nov 2016 02:06:34 +0000 (18:06 -0800)]
Clean up <sys/limits.h> a bit.

<sys/limits.h> shouldn't even exist, but leave it in for backwards
compatibility.

Everything that seems legit moves to <limits.h>, though it still seems
like a lot of that ought to come from the compiler instead (there's even
an angry rant in the clang header to that effect).

Unfortunately, we've long exposed [a copy and paste of] the contents
of <float.h> from <limits.h> and <sys/limits.h>. This patch preserves
that for backwards compatibility, but at least switches us over to
using the real <float.h> instead.

Bug: http://b/32776472
Test: builds
Change-Id: I2d5b3b5237b3a0442195e99bb967c076ce484f35

7 years agoMerge "Update timezone data to 2016j"
Neil Fuller [Wed, 30 Nov 2016 11:25:22 +0000 (11:25 +0000)]
Merge "Update timezone data to 2016j"
am: fa1a85d003

Change-Id: Icd6dd33712ee1ba21d2c6fcc7cd9b69232f6d140

7 years agoMerge "Update timezone data to 2016j"
Neil Fuller [Wed, 30 Nov 2016 11:16:38 +0000 (11:16 +0000)]
Merge "Update timezone data to 2016j"

7 years agoAbort harder.
Elliott Hughes [Wed, 30 Nov 2016 00:59:26 +0000 (16:59 -0800)]
Abort harder.

Some PoS internal system can't cope with more than 4 stack frames,
so the fact that our abort(3) implementation takes 4 frames by itself
makes it useless.

Re-reading POSIX, it only says "behaves as if", so the previous
implementation chain wasn't mandatory and we can just go straight to
calling tgkill...

Before:

     #00 pc 0000000000069be4  /system/lib64/libc.so (tgkill+8)
     #01 pc 0000000000066d50  /system/lib64/libc.so (pthread_kill+64)
     #02 pc 0000000000028110  /system/lib64/libc.so (raise+24)
     #03 pc 000000000001d4ec  /system/lib64/libc.so (abort+52)

After:

     #00 pc 0000000000069bc8  /system/lib64/libc.so (tgkill+8)
     #01 pc 000000000001d4c8  /system/lib64/libc.so (abort+80)
     #02 pc 0000000000001494  /system/xbin/crasher64 (_ZL9do_actionPKc+872)
     #03 pc 00000000000010e0  /system/xbin/crasher64 (main+88)

This is less useful on 32-bit ARM because there there's an extra trampoline
from an assembler abort(3) implementation, so you'll still only get one
meaningful stack frame. But every other architecture will now get two!

But wait!

It turns out that the assembler hack isn't needed any more. Here we are
unwinding just fine all the way through the 32-bit ARM crasher:

Before (with direct call to tgkill but still using the assembler):

     #00 pc 00049e7c  /system/lib/libc.so (tgkill+12)
     #01 pc 00019c6f  /system/lib/libc.so (__libc_android_abort+50)
     #02 pc 000181f8  /system/lib/libc.so (abort+4)
     #03 pc 00001025  /system/xbin/crasher (_ZL9do_actionPKc+656)
     #04 pc 00017721  /system/lib/libc.so (__libc_init+48)
     #05 pc 00000b38  /system/xbin/crasher (_start+96)

After:

     #00 pc 00049e6c  /system/lib/libc.so (tgkill+12)
     #01 pc 00019c5f  /system/lib/libc.so (abort+50)
     #02 pc 00001025  /system/xbin/crasher (_ZL9do_actionPKc+656)
     #03 pc 00017721  /system/lib/libc.so (__libc_init+48)
     #04 pc 00000b38  /system/xbin/crasher (_start+96)

(As you can see, the fact that we see __libc_init rather than main was true
with the assembler stub too, so that's not a regression even if it does seem
odd...)

Bug: N/A
Test: ran crasher64
Change-Id: I9dd5b214c495604c8b502c7ec0de3631080d8c29

7 years agoMerge "Fix getpriority/setpriority types."
Elliott Hughes [Wed, 30 Nov 2016 05:54:41 +0000 (05:54 +0000)]
Merge "Fix getpriority/setpriority types."
am: 609880c12f

Change-Id: I33de9bd9710164a4b56c30491fd51b20ac5c34f8

7 years agoMerge "Fix return type of sync(2)."
Elliott Hughes [Wed, 30 Nov 2016 05:54:28 +0000 (05:54 +0000)]
Merge "Fix return type of sync(2)."
am: 3b6b2f7c2d

Change-Id: I56f6dc1e6a9a454f6691d71ea6f03b0fd6a034e2

7 years agoMerge "Fix getpriority/setpriority types."
Treehugger Robot [Wed, 30 Nov 2016 05:49:03 +0000 (05:49 +0000)]
Merge "Fix getpriority/setpriority types."

7 years agoMerge "Fix return type of sync(2)."
Treehugger Robot [Wed, 30 Nov 2016 05:42:53 +0000 (05:42 +0000)]
Merge "Fix return type of sync(2)."

7 years agoMerge "Enable libc/libdl/libm/linker for host bionic"
Dan Willemsen [Wed, 30 Nov 2016 05:37:56 +0000 (05:37 +0000)]
Merge "Enable libc/libdl/libm/linker for host bionic"
am: b99b6762b4

Change-Id: I5484525abac921f00ce6e01d0aef4c3a4c9a656a

7 years agoMerge "Enable libc/libdl/libm/linker for host bionic"
Dan Willemsen [Wed, 30 Nov 2016 05:32:06 +0000 (05:32 +0000)]
Merge "Enable libc/libdl/libm/linker for host bionic"

7 years agoCleanup: replace sanitize:never with address:false.
Evgenii Stepanov [Wed, 23 Nov 2016 01:36:25 +0000 (17:36 -0800)]
Cleanup: replace sanitize:never with address:false.

Bug: 33091541
Test: NFC
Change-Id: Iade6a1852e7b1f34e06c26ccadcc17bac5d81c14

7 years agoAdd __libc_arc4random_unlimited_entropy.
Josh Gao [Fri, 11 Nov 2016 00:26:44 +0000 (16:26 -0800)]
Add __libc_arc4random_unlimited_entropy.

Let the caller know when libc has an entropy source and arc4random is safe.
This is useful for the callers that want entropy, but don't absolutely need it.

Bug: http://b/27729263
Test: booted angler-userdebug w/ safestack
Change-Id: Iab3050bd19f23518e1676629573eebc656ba1090

7 years agoFix return type of sync(2).
Elliott Hughes [Tue, 29 Nov 2016 23:16:08 +0000 (15:16 -0800)]
Fix return type of sync(2).

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

7 years agoMerge "Use icu4c to implement <wctype.h>."
Elliott Hughes [Tue, 29 Nov 2016 23:15:02 +0000 (23:15 +0000)]
Merge "Use icu4c to implement <wctype.h>."
am: bd734f0716

Change-Id: Id46c588eb1e3502d02f5b7e8bf6a46ad69047fe5

7 years agoFix getpriority/setpriority types.
Elliott Hughes [Tue, 29 Nov 2016 23:10:29 +0000 (15:10 -0800)]
Fix getpriority/setpriority types.

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

7 years agoMerge "Use icu4c to implement <wctype.h>."
Elliott Hughes [Tue, 29 Nov 2016 23:05:31 +0000 (23:05 +0000)]
Merge "Use icu4c to implement <wctype.h>."

7 years agoCorrect the return types of readv and writev.
Josh Gao [Tue, 29 Nov 2016 22:26:15 +0000 (14:26 -0800)]
Correct the return types of readv and writev.

readv and writev should return ssize_t, not int.

Bug: none
Test: `m checkbuild` on bullhead
Change-Id: I934c2e8cb7bf76384b63cedfeab88e2f6b65971a

7 years agoEnable libc/libdl/libm/linker for host bionic
Dan Willemsen [Tue, 29 Nov 2016 01:02:25 +0000 (17:02 -0800)]
Enable libc/libdl/libm/linker for host bionic

Disables debuggerd integration unless building for android.

Bug: 31559095
Test: Diff out/soong/build.ninja before/after, only change is moving
      linker's libdebuggerd_client static lib to the beginning of the
      list.
Test: lunch aosp_arm64-eng; mmma -j bionic
Change-Id: I62e725f7a9b98b7fe31637d0a835fd5846b0aff0

7 years agoMerge "Implement <langinfo.h>."
Elliott Hughes [Tue, 29 Nov 2016 19:25:48 +0000 (19:25 +0000)]
Merge "Implement <langinfo.h>."
am: 86841573ed

Change-Id: I1897be912644f66f2c73865b4d93bf2d0beabf60

7 years agoUse icu4c to implement <wctype.h>.
Elliott Hughes [Fri, 18 Nov 2016 02:18:08 +0000 (18:18 -0800)]
Use icu4c to implement <wctype.h>.

Pretty useless, because the POSIX APIs are useless for actually
internationalization, but it lets us put this to bed for good.

Bug: http://b/18492914
Test: bionic tests
Change-Id: I4dd0aff66c44b5547039be3ffea806c865b9014a