OSDN Git Service

android-x86/bionic.git
9 years agoam c8ba22c8: Merge "Move PAGE_MASK into <sys/user.h>."
Elliott Hughes [Wed, 29 Jul 2015 00:05:13 +0000 (00:05 +0000)]
am c8ba22c8: Merge "Move PAGE_MASK into <sys/user.h>."

* commit 'c8ba22c847bd5bfc97d29a4c565fd32993200a01':
  Move PAGE_MASK into <sys/user.h>.

9 years agoMerge "Move PAGE_MASK into <sys/user.h>."
Elliott Hughes [Tue, 28 Jul 2015 23:11:18 +0000 (23:11 +0000)]
Merge "Move PAGE_MASK into <sys/user.h>."

9 years agoMove PAGE_MASK into <sys/user.h>.
Elliott Hughes [Tue, 28 Jul 2015 21:58:37 +0000 (14:58 -0700)]
Move PAGE_MASK into <sys/user.h>.

I'm removing the TODO on the assumption that being compatible with glibc
is more useful than BSD. The new internal "bionic_page.h" header factors
out some duplication between libc and the linker.

Bug: http://b/22735893
Change-Id: I4aec4dcba5886fb6f6b9290a8f85660643261321

9 years agoam 1923d4c0: Merge "deprecate TARGET_USES_LOGD"
Mark Salyzyn [Tue, 28 Jul 2015 19:50:24 +0000 (19:50 +0000)]
am 1923d4c0: Merge "deprecate TARGET_USES_LOGD"

* commit '1923d4c03a68c89f304b601545f5e8db026b9be0':
  deprecate TARGET_USES_LOGD

9 years agoMerge "deprecate TARGET_USES_LOGD"
Mark Salyzyn [Tue, 28 Jul 2015 17:48:08 +0000 (17:48 +0000)]
Merge "deprecate TARGET_USES_LOGD"

9 years agodeprecate TARGET_USES_LOGD
Mark Salyzyn [Tue, 28 Jul 2015 15:51:17 +0000 (08:51 -0700)]
deprecate TARGET_USES_LOGD

This is not the kernel logger you are looking for

Bug: 22787659
Change-Id: I340d8bb5cdaa73be9565521681ee238b7033934b

9 years agoam 4955cde2: Merge "Add a regression test for a fixed strnlen bug."
Elliott Hughes [Tue, 28 Jul 2015 15:30:24 +0000 (15:30 +0000)]
am 4955cde2: Merge "Add a regression test for a fixed strnlen bug."

* commit '4955cde2c55d4860f12039a96d14fc756b1308a3':
  Add a regression test for a fixed strnlen bug.

9 years agoMerge "Add a regression test for a fixed strnlen bug."
Elliott Hughes [Tue, 28 Jul 2015 14:55:50 +0000 (14:55 +0000)]
Merge "Add a regression test for a fixed strnlen bug."

9 years agoAdd a regression test for a fixed strnlen bug.
Elliott Hughes [Tue, 28 Jul 2015 03:55:03 +0000 (20:55 -0700)]
Add a regression test for a fixed strnlen bug.

Bug: https://code.google.com/p/android/issues/detail?id=74741
Change-Id: I78b0114bdbe8e680b0e938af608a634e73c86eda

9 years agoam cebef1a7: Merge "Add one simple thread local storage test."
Chih-hung Hsieh [Tue, 28 Jul 2015 02:01:16 +0000 (02:01 +0000)]
am cebef1a7: Merge "Add one simple thread local storage test."

* commit 'cebef1a7812fe3552f12dd7e885a1f879a9946ed':
  Add one simple thread local storage test.

9 years agoMerge "Add one simple thread local storage test."
Chih-hung Hsieh [Tue, 28 Jul 2015 01:33:01 +0000 (01:33 +0000)]
Merge "Add one simple thread local storage test."

9 years agoAdd one simple thread local storage test.
Chih-Hung Hsieh [Mon, 27 Jul 2015 17:46:21 +0000 (10:46 -0700)]
Add one simple thread local storage test.

This test should pass with gcc and fail with clang,
until clang/llvm supports emutls or Android linker supports
ELF TLS models.

BUG: 21082792
Change-Id: Id8c97da52c68ec230c7d26af703f6ed32d53a4fe

9 years agoam e8ceb95c: Merge "Remove pushes from memsets (krait/cortex-a9)."
Christopher Ferris [Tue, 28 Jul 2015 00:17:16 +0000 (00:17 +0000)]
am e8ceb95c: Merge "Remove pushes from memsets (krait/cortex-a9)."

* commit 'e8ceb95c680eacc3b5d16644a48a28b45f421e2f':
  Remove pushes from memsets (krait/cortex-a9).

9 years agoam 8af32633: Merge "add fortified implementations of fread/fwrite"
Yabin Cui [Tue, 28 Jul 2015 00:17:08 +0000 (00:17 +0000)]
am 8af32633: Merge "add fortified implementations of fread/fwrite"

* commit '8af32633498184e58e6f8d5d75b9f9cdbef5b6be':
  add fortified implementations of fread/fwrite

9 years agoMerge "Remove pushes from memsets (krait/cortex-a9)."
Christopher Ferris [Mon, 27 Jul 2015 23:09:32 +0000 (23:09 +0000)]
Merge "Remove pushes from memsets (krait/cortex-a9)."

9 years agoMerge "add fortified implementations of fread/fwrite"
Yabin Cui [Mon, 27 Jul 2015 22:46:29 +0000 (22:46 +0000)]
Merge "add fortified implementations of fread/fwrite"

9 years agoam f16c6e17: Merge "Restore protection flags for ifunc during relocs."
Elliott Hughes [Mon, 27 Jul 2015 22:01:48 +0000 (22:01 +0000)]
am f16c6e17: Merge "Restore protection flags for ifunc during relocs."

* commit 'f16c6e17b22c278320d0e662d1f1e1213f8fbc71':
  Restore protection flags for ifunc during relocs.

9 years agoam de0fb393: Restore protection flags for ifunc during relocs.
Dmitriy Ivanov [Mon, 27 Jul 2015 21:39:11 +0000 (21:39 +0000)]
am de0fb393: Restore protection flags for ifunc during relocs.

* commit 'de0fb393ae8136a5958fe17eee0c6285e2f7f91a':
  Restore protection flags for ifunc during relocs.

9 years agoMerge "Restore protection flags for ifunc during relocs."
Elliott Hughes [Mon, 27 Jul 2015 21:34:53 +0000 (21:34 +0000)]
Merge "Restore protection flags for ifunc during relocs."

9 years agoRemove pushes from memsets (krait/cortex-a9).
Christopher Ferris [Mon, 27 Jul 2015 20:51:31 +0000 (13:51 -0700)]
Remove pushes from memsets (krait/cortex-a9).

On the path that only uses r0 in both the krait and cortex-a9
memset, remove the push and use r3 instead.

In addition, for cortex-a9, remove the artificial function since
it's not needed since dwarf unwinding is now supported on arm.

Change-Id: Ia4ed1cc435b03627a7193215e76c8ea3335f949a

9 years agoam bff19682: Merge "name the atexit handler pages"
Elliott Hughes [Mon, 27 Jul 2015 18:32:37 +0000 (18:32 +0000)]
am bff19682: Merge "name the atexit handler pages"

* commit 'bff196822230b5a8b1f5bafeed88ded821d390a9':
  name the atexit handler pages

9 years agoMerge "name the atexit handler pages"
Elliott Hughes [Mon, 27 Jul 2015 18:06:35 +0000 (18:06 +0000)]
Merge "name the atexit handler pages"

9 years agoname the atexit handler pages
Daniel Micay [Sat, 25 Jul 2015 19:40:14 +0000 (15:40 -0400)]
name the atexit handler pages

Change-Id: I1718ddee7415a673b5818bc1455b8d90f1e8f9c6

9 years agoRestore protection flags for ifunc during relocs.
Dmitriy Ivanov [Sun, 26 Jul 2015 14:37:09 +0000 (07:37 -0700)]
Restore protection flags for ifunc during relocs.

IFUNC relocations require executable flag for the load
segment containing .text. When dso has text relocs linker
removes exec which causes crash during ifunc relocations.

This patch fixes this problem by restoring segments protection
for ifunc relocs.

Bug: http://b/22611399
Change-Id: Icbf3be0fec0e42bf805bcad7533e2032a2e11b9c
(cherry picked from commit de0fb393ae8136a5958fe17eee0c6285e2f7f91a)

9 years agoRestore protection flags for ifunc during relocs.
Dmitriy Ivanov [Sun, 26 Jul 2015 14:37:09 +0000 (07:37 -0700)]
Restore protection flags for ifunc during relocs.

IFUNC relocations require executable flag for the load
segment containing .text. When dso has text relocs linker
removes exec which causes crash during ifunc relocations.

This patch fixes this problem by restoring segments protection
for ifunc relocs.

Bug: http://b/22611399
Change-Id: Icbf3be0fec0e42bf805bcad7533e2032a2e11b9c

9 years agoam adc5795f: Merge "Use AT_PAGESZ for sysconf(_SC_PAGE_SIZE)."
Elliott Hughes [Sat, 25 Jul 2015 18:58:57 +0000 (18:58 +0000)]
am adc5795f: Merge "Use AT_PAGESZ for sysconf(_SC_PAGE_SIZE)."

* commit 'adc5795fb7b674e6d40d1f190c675607c1379343':
  Use AT_PAGESZ for sysconf(_SC_PAGE_SIZE).

9 years agoMerge "Use AT_PAGESZ for sysconf(_SC_PAGE_SIZE)."
Elliott Hughes [Sat, 25 Jul 2015 18:32:46 +0000 (18:32 +0000)]
Merge "Use AT_PAGESZ for sysconf(_SC_PAGE_SIZE)."

9 years agoUse AT_PAGESZ for sysconf(_SC_PAGE_SIZE).
Elliott Hughes [Sat, 25 Jul 2015 06:22:07 +0000 (23:22 -0700)]
Use AT_PAGESZ for sysconf(_SC_PAGE_SIZE).

Bug: http://b/18342333
Change-Id: Id12ed4e85a0f35d7d27202f7792df42a65a74b4e

9 years agoam a3a61983: Merge "Make all labels local."
Christopher Ferris [Fri, 24 Jul 2015 01:17:28 +0000 (01:17 +0000)]
am a3a61983: Merge "Make all labels local."

* commit 'a3a619835d302f5414883e2307ca48406b15a4a5':
  Make all labels local.

9 years agoMerge "Make all labels local."
Christopher Ferris [Fri, 24 Jul 2015 00:47:06 +0000 (00:47 +0000)]
Merge "Make all labels local."

9 years agoadd fortified implementations of fread/fwrite
Daniel Micay [Sat, 18 Jul 2015 17:55:51 +0000 (13:55 -0400)]
add fortified implementations of fread/fwrite

A __size_mul_overflow utility is used to take advantage of the checked
overflow intrinsics in Clang and GCC (>= 5). The fallback for older
compilers is the optimized but less than ideal overflow checking pattern
used in OpenBSD.

Change-Id: Ibb0d4fd9b5acb67983e6a9f46844c2fd444f7e69

9 years agoam b8320b80: Don\'t abort when failed to write tracing message.
Yabin Cui [Thu, 23 Jul 2015 22:42:23 +0000 (22:42 +0000)]
am b8320b80: Don\'t abort when failed to write tracing message.

* commit 'b8320b8021856ae61b3012b82c2ae96df97e3ec4':
  Don't abort when failed to write tracing message.

9 years agoDon't abort when failed to write tracing message.
Yabin Cui [Wed, 22 Jul 2015 00:27:54 +0000 (17:27 -0700)]
Don't abort when failed to write tracing message.

Also make the code thread-safe with lock.

Bug: 20666100
Change-Id: I0f331a617b75280f36179c187418450230d713ef
(cherry picked from commit 166112531558a1d4ea179c29147f27db7045db22)

9 years agoMake all labels local.
Christopher Ferris [Thu, 23 Jul 2015 19:12:55 +0000 (12:12 -0700)]
Make all labels local.

Change the non-local labels to .L labels.

Change-Id: I720e894f2e311af8f4a0970303d8b86575fb69a5

9 years agoam 9e1c862c: Merge "Don\'t abort when failed to write tracing message."
Yabin Cui [Thu, 23 Jul 2015 18:53:37 +0000 (18:53 +0000)]
am 9e1c862c: Merge "Don\'t abort when failed to write tracing message."

* commit '9e1c862cb649f054aaa1c2141409387bf3d5f3eb':
  Don't abort when failed to write tracing message.

9 years agoMerge "Don't abort when failed to write tracing message."
Yabin Cui [Thu, 23 Jul 2015 17:20:30 +0000 (17:20 +0000)]
Merge "Don't abort when failed to write tracing message."

9 years agoam 2565492d: Merge "Add getgrgid_r/getgrnam_r."
Yabin Cui [Thu, 23 Jul 2015 02:06:56 +0000 (02:06 +0000)]
am 2565492d: Merge "Add getgrgid_r/getgrnam_r."

* commit '2565492db0d67b95348cd1c3026ed338ca59aa37':
  Add getgrgid_r/getgrnam_r.

9 years agoam 3b49d61a: Merge "libc: arch-x86: implement kernel vdso time functions"
Elliott Hughes [Thu, 23 Jul 2015 02:06:55 +0000 (02:06 +0000)]
am 3b49d61a: Merge "libc: arch-x86: implement kernel vdso time functions"

* commit '3b49d61ac2f7a02d5e7f25a24836b060f922f079':
  libc: arch-x86: implement kernel vdso time functions

9 years agoam 86ac443c: Merge "We don\'t have CXX_BARE any more"
Ying Wang [Thu, 23 Jul 2015 02:06:19 +0000 (02:06 +0000)]
am 86ac443c: Merge "We don\'t have CXX_BARE any more"

* commit '86ac443cd1df83bbef4a18046714e067a9d13247':
  We don't have CXX_BARE any more

9 years agoam bc0b8ff2: Merge "Use a less misleading name for the code that sets up the main...
Elliott Hughes [Thu, 23 Jul 2015 02:06:17 +0000 (02:06 +0000)]
am bc0b8ff2: Merge "Use a less misleading name for the code that sets up the main thread."

* commit 'bc0b8ff2fbfb38f73114aef7df8e302025245441':
  Use a less misleading name for the code that sets up the main thread.

9 years agoDon't abort when failed to write tracing message.
Yabin Cui [Wed, 22 Jul 2015 00:27:54 +0000 (17:27 -0700)]
Don't abort when failed to write tracing message.

Also make the code thread-safe with lock.

Bug: 20666100
Change-Id: I0f331a617b75280f36179c187418450230d713ef

9 years agoam 7e52dbe4: Merge "Revert "Stop libc from cross-referencing unwind symbols"" into...
Dan Albert [Wed, 22 Jul 2015 20:17:30 +0000 (20:17 +0000)]
am 7e52dbe4: Merge "Revert "Stop libc from cross-referencing unwind symbols"" into mnc-dev

* commit '7e52dbe4d24daf61a8bd4bbbd0761c55468c3c7e':
  Revert "Stop libc from cross-referencing unwind symbols"

9 years agoMerge "Add getgrgid_r/getgrnam_r."
Yabin Cui [Wed, 22 Jul 2015 03:22:26 +0000 (03:22 +0000)]
Merge "Add getgrgid_r/getgrnam_r."

9 years agoAdd getgrgid_r/getgrnam_r.
Yabin Cui [Tue, 21 Jul 2015 02:46:26 +0000 (19:46 -0700)]
Add getgrgid_r/getgrnam_r.

Bug: 22568551
Change-Id: I3c0772d119d6041063c6be53f5bcc5ea1768f0d5

9 years agoMerge "libc: arch-x86: implement kernel vdso time functions"
Elliott Hughes [Wed, 22 Jul 2015 01:51:00 +0000 (01:51 +0000)]
Merge "libc: arch-x86: implement kernel vdso time functions"

9 years agolibc: arch-x86: implement kernel vdso time functions
Robert Jarzmik [Wed, 15 Jul 2015 13:26:43 +0000 (15:26 +0200)]
libc: arch-x86: implement kernel vdso time functions

This patch give the possibility of time vdso support on 32bit kernel.
If the 32bit x86 kernel provides gettimeofday() and clock_gettime()
primitives in vdso. In this case make bionic use them. If the kernel
doesn't provide them, fallback to the legacy system call versions.

Change-Id: I87b772a9486fa356903e1f98f486ab9eb0b6f6f7
Signed-off-by: Robert Jarzmik <robert.jarzmik@intel.com>
Signed-off-by: Mingwei Shi <mingwei.shi@intel.com>
9 years agoMerge "Revert "Stop libc from cross-referencing unwind symbols"" into mnc-dev
Dan Albert [Tue, 21 Jul 2015 23:09:35 +0000 (23:09 +0000)]
Merge "Revert "Stop libc from cross-referencing unwind symbols"" into mnc-dev

9 years agoMerge "We don't have CXX_BARE any more"
Ying Wang [Tue, 21 Jul 2015 21:10:22 +0000 (21:10 +0000)]
Merge "We don't have CXX_BARE any more"

9 years agoWe don't have CXX_BARE any more
Ying Wang [Tue, 21 Jul 2015 01:51:30 +0000 (18:51 -0700)]
We don't have CXX_BARE any more

Now we have split CXX_WRAPPER from TARGET_CXX and CXX_BARE isn't needed
any more.

Bug: 22612634
Change-Id: I52c78b0d1b325910e875a786d17f780731778b4b
(cherry-pick from commit 9d11a7087c860195bf23f2825a7fe70d43ff7b78)

9 years agoam e39b279b: Merge "We don\'t have CXX_BARE any more" into mnc-dev
Ying Wang [Tue, 21 Jul 2015 21:01:46 +0000 (21:01 +0000)]
am e39b279b: Merge "We don\'t have CXX_BARE any more" into mnc-dev

* commit 'e39b279bb4971d0c3322214ea977275f1bc58c0b':
  We don't have CXX_BARE any more

9 years agoMerge "We don't have CXX_BARE any more" into mnc-dev
Ying Wang [Tue, 21 Jul 2015 20:51:26 +0000 (20:51 +0000)]
Merge "We don't have CXX_BARE any more" into mnc-dev

9 years agoMerge "Use a less misleading name for the code that sets up the main thread."
Elliott Hughes [Tue, 21 Jul 2015 20:28:15 +0000 (20:28 +0000)]
Merge "Use a less misleading name for the code that sets up the main thread."

9 years agoam aa55e7ad: Add support for non-zero vaddr in maps.
Christopher Ferris [Tue, 21 Jul 2015 19:05:24 +0000 (19:05 +0000)]
am aa55e7ad: Add support for non-zero vaddr in maps.

* commit 'aa55e7ad249e49025d0507f513a6c45f8491a4e5':
  Add support for non-zero vaddr in maps.

9 years agoUse a less misleading name for the code that sets up the main thread.
Elliott Hughes [Tue, 21 Jul 2015 18:57:09 +0000 (11:57 -0700)]
Use a less misleading name for the code that sets up the main thread.

Change-Id: I50c1b0a3b633cf8bc40a6bd86f12adb6b91e2888

9 years agoam c99fabb7: Merge "Add support for non-zero vaddr in maps."
Christopher Ferris [Tue, 21 Jul 2015 18:26:13 +0000 (18:26 +0000)]
am c99fabb7: Merge "Add support for non-zero vaddr in maps."

* commit 'c99fabb7a097e9aeed49ce03584cce113d086905':
  Add support for non-zero vaddr in maps.

9 years agoam 3bcfd47c: Merge "Revert "Revert "make vdso function pointers read-only at runtime"""
Elliott Hughes [Tue, 21 Jul 2015 18:25:35 +0000 (18:25 +0000)]
am 3bcfd47c: Merge "Revert "Revert "make vdso function pointers read-only at runtime"""

* commit '3bcfd47c6836a952b2093c64feb9f1e382891256':
  Revert "Revert "make vdso function pointers read-only at runtime""

9 years agoAdd support for non-zero vaddr in maps.
Christopher Ferris [Thu, 16 Jul 2015 21:49:17 +0000 (14:49 -0700)]
Add support for non-zero vaddr in maps.

If a map has a non-zero vaddr then it needs to be added to the
computed relative offset.

Bug: 22532054

(cherry picked from commit 70b6e1daffd58ebce006d4b504cd0fb9672b6d07)

Change-Id: I1e98741d6ff3b5bbb7fc5f88cc85b27ace75ee2e

9 years agoMerge "Add support for non-zero vaddr in maps."
Christopher Ferris [Tue, 21 Jul 2015 17:29:09 +0000 (17:29 +0000)]
Merge "Add support for non-zero vaddr in maps."

9 years agoam f37c237b: Merge "Revert "Stop libc from cross-referencing unwind symbols""
Dan Albert [Tue, 21 Jul 2015 02:34:52 +0000 (02:34 +0000)]
am f37c237b: Merge "Revert "Stop libc from cross-referencing unwind symbols""

* commit 'f37c237b8b15c00ac748fe2657a50df54fa55d5a':
  Revert "Stop libc from cross-referencing unwind symbols"

9 years agoMerge "Revert "Revert "make vdso function pointers read-only at runtime"""
Elliott Hughes [Tue, 21 Jul 2015 02:15:19 +0000 (02:15 +0000)]
Merge "Revert "Revert "make vdso function pointers read-only at runtime"""

9 years agoWe don't have CXX_BARE any more
Ying Wang [Tue, 21 Jul 2015 01:51:30 +0000 (18:51 -0700)]
We don't have CXX_BARE any more

Now we have split CXX_WRAPPER from TARGET_CXX and CXX_BARE isn't needed
any more.

Bug: 22612634
Change-Id: I52c78b0d1b325910e875a786d17f780731778b4b

9 years agoRevert "Stop libc from cross-referencing unwind symbols"
Dan Albert [Mon, 20 Jul 2015 23:56:51 +0000 (16:56 -0700)]
Revert "Stop libc from cross-referencing unwind symbols"

This reverts commit cd13b14e98d4921af126667fae0cf6613a5615c5.

Bug: http://b/19958712
Change-Id: I7cc7f69728c42c37e129aee30d761c4cd7e30e94
(cherry picked from commit 95fd031c4d22b90c542621170bb6d4d05bb94457)

9 years agoMerge "Revert "Stop libc from cross-referencing unwind symbols""
Dan Albert [Tue, 21 Jul 2015 00:22:20 +0000 (00:22 +0000)]
Merge "Revert "Stop libc from cross-referencing unwind symbols""

9 years agoRevert "Stop libc from cross-referencing unwind symbols"
Dan Albert [Mon, 20 Jul 2015 23:56:51 +0000 (16:56 -0700)]
Revert "Stop libc from cross-referencing unwind symbols"

This reverts commit cd13b14e98d4921af126667fae0cf6613a5615c5.

Bug: http://b/19958712
Change-Id: I7cc7f69728c42c37e129aee30d761c4cd7e30e94

9 years agoRevert "Revert "make vdso function pointers read-only at runtime""
Elliott Hughes [Mon, 20 Jul 2015 22:34:27 +0000 (22:34 +0000)]
Revert "Revert "make vdso function pointers read-only at runtime""

This reverts commit 1946856b1f18a27c51ba30bb9e304f25b722ee05.

This goes back to the original scheme of PROT_NONEing a page within
libc. Allocating a new page didn't fail safe for cases where these
functions are called from the dynamic linker.

Bug: http://b/22568628
Change-Id: I3e7241c8b54c27ea4a898bc952375c1e9ae38c80

9 years agoam e70d7a78: Merge "Fix dt_runpath test."
Dmitriy Ivanov [Mon, 20 Jul 2015 19:17:02 +0000 (19:17 +0000)]
am e70d7a78: Merge "Fix dt_runpath test."

* commit 'e70d7a78f0bfba8b09d37c145769cb8d1d7c5fb6':
  Fix dt_runpath test.

9 years agoam e5544ae1: Merge "<sys/time.h> should include [most of] <sys/select.h>."
Elliott Hughes [Mon, 20 Jul 2015 18:44:00 +0000 (18:44 +0000)]
am e5544ae1: Merge "<sys/time.h> should include [most of] <sys/select.h>."

* commit 'e5544ae1f8a23ae77908e822e83a73ebd4b656ec':
  <sys/time.h> should include [most of] <sys/select.h>.

9 years agoam 6c9ad82b: Merge "Revert "make vdso function pointers read-only at runtime""
Elliott Hughes [Mon, 20 Jul 2015 18:43:59 +0000 (18:43 +0000)]
am 6c9ad82b: Merge "Revert "make vdso function pointers read-only at runtime""

* commit '6c9ad82b1c0f26f5edb5d5ca246b88451c5ea238':
  Revert "make vdso function pointers read-only at runtime"

9 years agoMerge "Fix dt_runpath test."
Dmitriy Ivanov [Mon, 20 Jul 2015 18:31:07 +0000 (18:31 +0000)]
Merge "Fix dt_runpath test."

9 years agoFix dt_runpath test.
Dmitriy Ivanov [Mon, 20 Jul 2015 17:47:49 +0000 (10:47 -0700)]
Fix dt_runpath test.

Bfd linker produces DT_RPATH instead of DT_RUNPATH
unless --enable-new-dtags option is specified.

Bug: http://b/22560945
Change-Id: I71bdc5137b899ab736e55c5a9574cfbba8e1983b

9 years agoMerge "<sys/time.h> should include [most of] <sys/select.h>."
Elliott Hughes [Mon, 20 Jul 2015 17:36:52 +0000 (17:36 +0000)]
Merge "<sys/time.h> should include [most of] <sys/select.h>."

9 years agoMerge "Revert "make vdso function pointers read-only at runtime""
Elliott Hughes [Mon, 20 Jul 2015 17:30:49 +0000 (17:30 +0000)]
Merge "Revert "make vdso function pointers read-only at runtime""

9 years agoRevert "make vdso function pointers read-only at runtime"
Elliott Hughes [Mon, 20 Jul 2015 17:30:33 +0000 (17:30 +0000)]
Revert "make vdso function pointers read-only at runtime"

This reverts commit df1a3c6d21702e3e96cfcddadee4a50bfac82110.

This change prevented N9 from booting (http://b/22568628).

Change-Id: I071d6d6a0ae7881d65641839e665acdcf58462b4

9 years ago<sys/time.h> should include [most of] <sys/select.h>.
Elliott Hughes [Sat, 18 Jul 2015 02:10:24 +0000 (19:10 -0700)]
<sys/time.h> should include [most of] <sys/select.h>.

Found by trying to build c-ares with bionic.

Change-Id: I38684abcb806ef1e8806c68b4a6dd9200f48849e

9 years agoam 4f2e1d3b: Merge "Add all the glibc one-line "synonym" header files."
Elliott Hughes [Fri, 17 Jul 2015 22:04:41 +0000 (22:04 +0000)]
am 4f2e1d3b: Merge "Add all the glibc one-line "synonym" header files."

* commit '4f2e1d3b1e3b3729b551c22c5a0be8d07795adfd':
  Add all the glibc one-line "synonym" header files.

9 years agoMerge "Add all the glibc one-line "synonym" header files."
Elliott Hughes [Fri, 17 Jul 2015 21:42:03 +0000 (21:42 +0000)]
Merge "Add all the glibc one-line "synonym" header files."

9 years agoAdd all the glibc one-line "synonym" header files.
Elliott Hughes [Fri, 17 Jul 2015 20:59:36 +0000 (13:59 -0700)]
Add all the glibc one-line "synonym" header files.

Ported code keeps needing these one by one, so let's just add the whole
set...

Change-Id: I9662b256aeaa1b0ffb22354130e503f0c4aa472b

9 years agoam ca7bc509: Merge "make vdso function pointers read-only at runtime"
Elliott Hughes [Fri, 17 Jul 2015 18:39:05 +0000 (18:39 +0000)]
am ca7bc509: Merge "make vdso function pointers read-only at runtime"

* commit 'ca7bc509cf3b321b4721137df1e5407415fc7dd7':
  make vdso function pointers read-only at runtime

9 years agoam a58d2498: Merge "Fix potential race condition on dlopen"
Dmitriy Ivanov [Fri, 17 Jul 2015 18:18:14 +0000 (18:18 +0000)]
am a58d2498: Merge "Fix potential race condition on dlopen"

* commit 'a58d24984045b474883ad14500a465ab331db47d':
  Fix potential race condition on dlopen

9 years agoMerge "make vdso function pointers read-only at runtime"
Elliott Hughes [Fri, 17 Jul 2015 18:13:31 +0000 (18:13 +0000)]
Merge "make vdso function pointers read-only at runtime"

9 years agomake vdso function pointers read-only at runtime
Daniel Micay [Fri, 17 Jul 2015 16:13:27 +0000 (12:13 -0400)]
make vdso function pointers read-only at runtime

Global, writable function pointers are low-hanging fruit for hijacking
control flow with an overflow from a global buffer or an arbitrary write
vulnerability. This moves the function pointer table into a dedicated
page and makes it read-only at runtime, similar to RELRO.

This increases the memory usage of the library by just under one page.
This could be avoided by having the linker load the vdso by replacing
weak symbols. It's not significant within the Zygote spawning model
though because it's read-only after early init.

Change-Id: Id7a49c96c1b15c2e1926528304b3c54a81e78caf

9 years agoMerge "Fix potential race condition on dlopen"
Dmitriy Ivanov [Fri, 17 Jul 2015 17:49:20 +0000 (17:49 +0000)]
Merge "Fix potential race condition on dlopen"

9 years agoFix potential race condition on dlopen
Dmitriy Ivanov [Fri, 17 Jul 2015 17:36:10 +0000 (10:36 -0700)]
Fix potential race condition on dlopen

  Call to find_containing_library should be guarded.

Change-Id: I985a903da48b83bcd35e957a979158eb9b80e70b

9 years agoAdd support for non-zero vaddr in maps.
Christopher Ferris [Thu, 16 Jul 2015 21:49:17 +0000 (14:49 -0700)]
Add support for non-zero vaddr in maps.

If a map has a non-zero vaddr then it needs to be added to the
computed relative offset.

Bug: 22532054
Change-Id: If55015165d25ecc4b530f674b481c8c7ef760a23

9 years agoam 60bc9090: Merge "Add timespec/timeval conversion helpers."
Bertrand SIMONNET [Thu, 16 Jul 2015 22:25:25 +0000 (22:25 +0000)]
am 60bc9090: Merge "Add timespec/timeval conversion helpers."

* commit '60bc90909a49121789bf86f5d14f63967e8000e0':
  Add timespec/timeval conversion helpers.

9 years agoMerge "Add timespec/timeval conversion helpers."
Bertrand SIMONNET [Thu, 16 Jul 2015 21:53:25 +0000 (21:53 +0000)]
Merge "Add timespec/timeval conversion helpers."

9 years agoAdd timespec/timeval conversion helpers.
Bertrand SIMONNET [Thu, 16 Jul 2015 18:50:39 +0000 (11:50 -0700)]
Add timespec/timeval conversion helpers.

TIMESPEC_TO_TIMEVAL and TIMEVAL_TO_TIMESPEC are usually provided by
sys/time.h.

BUG: 22532790

Change-Id: I8b9d7298e3250323faa20b1adf9a7514954c6096

9 years agoam cd588f84: Merge "Add constant for zip separator"
Dmitriy Ivanov [Thu, 16 Jul 2015 16:26:06 +0000 (16:26 +0000)]
am cd588f84: Merge "Add constant for zip separator"

* commit 'cd588f847f3f23a9c60e32ab1e37c170e9f5be57':
  Add constant for zip separator

9 years agoMerge "Add constant for zip separator"
Dmitriy Ivanov [Thu, 16 Jul 2015 15:59:15 +0000 (15:59 +0000)]
Merge "Add constant for zip separator"

9 years agoAdd constant for zip separator
Dmitriy Ivanov [Thu, 16 Jul 2015 11:52:06 +0000 (04:52 -0700)]
Add constant for zip separator

Change-Id: I1dcbb15ac612fc28e922eb3de8148fcaebbc0820

9 years agoam b3140904: Merge "Replace spaces with tabs in a Makefile."
Evgenii Stepanov [Wed, 15 Jul 2015 23:58:44 +0000 (23:58 +0000)]
am b3140904: Merge "Replace spaces with tabs in a Makefile."

* commit 'b31409040f1766d92e76e72bbdc1b346f4bb9d8e':
  Replace spaces with tabs in a Makefile.

9 years agoMerge "Replace spaces with tabs in a Makefile."
Evgenii Stepanov [Wed, 15 Jul 2015 23:22:38 +0000 (23:22 +0000)]
Merge "Replace spaces with tabs in a Makefile."

9 years agoReplace spaces with tabs in a Makefile.
Evgenii Stepanov [Wed, 15 Jul 2015 23:19:59 +0000 (16:19 -0700)]
Replace spaces with tabs in a Makefile.

Sorry, I undertested my previous change and these guys somehow sneaked in.
This only affects SANITIZE_TARGET builds.

Change-Id: Id6986d89fa3d4965339f7b6fe973e9db73b380da

9 years agoam e9774a52: Merge "A special linker for ASan executables."
Evgenii Stepanov [Wed, 15 Jul 2015 17:51:04 +0000 (17:51 +0000)]
am e9774a52: Merge "A special linker for ASan executables."

* commit 'e9774a5227749035dc55357ae3a34edaf545c3b3':
  A special linker for ASan executables.

9 years agoMerge "A special linker for ASan executables."
Evgenii Stepanov [Wed, 15 Jul 2015 17:24:19 +0000 (17:24 +0000)]
Merge "A special linker for ASan executables."

9 years agoA special linker for ASan executables.
Evgenii Stepanov [Sat, 11 Jul 2015 00:54:01 +0000 (17:54 -0700)]
A special linker for ASan executables.

Setup a /system/bin/linker_asan as a symlink to "linker".
Read the linker name from PT_INTERP, and if it is linker_asan,
switch default library lookup paths to the ASan set, which
starts with the path to the instrumented libraries
(/data/lib), followed by /system/lib as a fallback.

This ensures that ASan binaries prefer ASan libraries, when
available. This approach is way better then RPATH/RUNPATH and even
better than LD_LIBRARY_PATH:
- RUNPATH is per-DSO, while default paths are global.
- LD_LIBRARY_PATH is overwritten by android_update_LD_LIBRARY_PATH.
- neither RUNPATH nor LD_LIBRARY_PATH appear in
  android_get_LD_LIBRARY_PATH which is used to build java.lang.path.
  Having ASan libraries in java.lang.path is a good thing.

Bug: 22355945
Change-Id: I1d2791fbf5740618f18f71a3ae3d873714669d3f

9 years agoam 60a11dcb: Merge "Add test for an Android kernel bug about prctl."
Yabin Cui [Tue, 14 Jul 2015 22:52:49 +0000 (22:52 +0000)]
am 60a11dcb: Merge "Add test for an Android kernel bug about prctl."

* commit '60a11dcb44992f610e696fc246c70731012080dd':
  Add test for an Android kernel bug about prctl.

9 years agoam a8d82f12: Merge "Update to v3.18.18 kernel headers."
Christopher Ferris [Tue, 14 Jul 2015 22:52:40 +0000 (22:52 +0000)]
am a8d82f12: Merge "Update to v3.18.18 kernel headers."

* commit 'a8d82f126d1830ebee99e2622d08489a844e3e62':
  Update to v3.18.18 kernel headers.

9 years agoam 5e3dc45a: Merge "Do not hold hash table lock while backtracing."
Christopher Ferris [Tue, 14 Jul 2015 21:30:11 +0000 (21:30 +0000)]
am 5e3dc45a: Merge "Do not hold hash table lock while backtracing."

* commit '5e3dc45a16c63b716bc4b7bed2f5752b41a5d5d5':
  Do not hold hash table lock while backtracing.

9 years agoMerge "Add test for an Android kernel bug about prctl."
Yabin Cui [Tue, 14 Jul 2015 02:48:44 +0000 (02:48 +0000)]
Merge "Add test for an Android kernel bug about prctl."