OSDN Git Service

android-x86/bionic.git
8 years agoMerge "Deprecate bzero"
Dimitry Ivanov [Wed, 6 Jan 2016 02:37:41 +0000 (02:37 +0000)]
Merge "Deprecate bzero"
am: 52fd4ca0a0

* commit '52fd4ca0a0367109500a31a63c5d392372f8f2ad':
  Deprecate bzero

8 years agoMerge "Deprecate bzero"
Dimitry Ivanov [Wed, 6 Jan 2016 02:33:41 +0000 (02:33 +0000)]
Merge "Deprecate bzero"

8 years agoMerge "Export public __aeabi* symbols as LIBC_PRIVATE"
Dimitry Ivanov [Wed, 6 Jan 2016 02:31:30 +0000 (02:31 +0000)]
Merge "Export public __aeabi* symbols as LIBC_PRIVATE"
am: 609156e266

* commit '609156e266726d89ec9084db77fd3aa68d50c622':
  Export public __aeabi* symbols as LIBC_PRIVATE

8 years agoMerge "Export public __aeabi* symbols as LIBC_PRIVATE"
Dimitry Ivanov [Wed, 6 Jan 2016 02:19:27 +0000 (02:19 +0000)]
Merge "Export public __aeabi* symbols as LIBC_PRIVATE"

8 years agoExport public __aeabi* symbols as LIBC_PRIVATE
Dimitry Ivanov [Wed, 6 Jan 2016 00:38:43 +0000 (16:38 -0800)]
Export public __aeabi* symbols as LIBC_PRIVATE

But keep LIBC as default version for them

Bug: http://b/26391427
Bug: http://b/26410625
Change-Id: I819e354bbba482d1f983d9be15c23fcce10e5dd9

8 years agoMerge "Fix a broken link in a comment."
Elliott Hughes [Wed, 6 Jan 2016 01:31:00 +0000 (01:31 +0000)]
Merge "Fix a broken link in a comment."
am: 031dfe198b

* commit '031dfe198b53753bc852961e915fedb78c5f42df':
  Fix a broken link in a comment.

8 years agoMerge "Tidy up KernelArgumentBlock::getauxval."
Elliott Hughes [Wed, 6 Jan 2016 01:29:17 +0000 (01:29 +0000)]
Merge "Tidy up KernelArgumentBlock::getauxval."
am: 7d27b68ef4

* commit '7d27b68ef4abf279700ff6a4eb9584b6c969a00d':
  Tidy up KernelArgumentBlock::getauxval.

8 years agoMerge "Fix a broken link in a comment."
Elliott Hughes [Wed, 6 Jan 2016 01:27:09 +0000 (01:27 +0000)]
Merge "Fix a broken link in a comment."

8 years agoMerge "Tidy up KernelArgumentBlock::getauxval."
Elliott Hughes [Wed, 6 Jan 2016 01:24:37 +0000 (01:24 +0000)]
Merge "Tidy up KernelArgumentBlock::getauxval."

8 years agoDeprecate bzero
Dimitry Ivanov [Wed, 6 Jan 2016 01:02:56 +0000 (17:02 -0800)]
Deprecate bzero

bzero is hashdefined to memset in strings.h and it
was removed from POSIX 2008.

Bug: http://b/26407170
Change-Id: Ia6d54f0e314dc7f5f3fbad0e9b00344f49f77d43

8 years agoMerge "system_properties.cpp: special case ro.* properties"
Nick Kralevich [Wed, 6 Jan 2016 00:49:14 +0000 (00:49 +0000)]
Merge "system_properties.cpp: special case ro.* properties"
am: ffa54cd7ba

* commit 'ffa54cd7ba3860b00f42aa8410a94a17f5856bea':
  system_properties.cpp: special case ro.* properties

8 years agoMerge "system_properties.cpp: special case ro.* properties"
Nick Kralevich [Wed, 6 Jan 2016 00:43:48 +0000 (00:43 +0000)]
Merge "system_properties.cpp: special case ro.* properties"

8 years agoFix a broken link in a comment.
Elliott Hughes [Wed, 6 Jan 2016 00:33:33 +0000 (16:33 -0800)]
Fix a broken link in a comment.

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

8 years agosystem_properties.cpp: special case ro.* properties
Nick Kralevich [Wed, 6 Jan 2016 00:19:24 +0000 (16:19 -0800)]
system_properties.cpp: special case ro.* properties

Currently, reads of ro.* properties are treated differently than
writes of ro.* properties. When writing an ro.* property, we ignore
the "ro." portion of the property, and base the security decision
on the label of the remaining portion.

See https://android.googlesource.com/platform/system/core/+/e7a9e52740c952c623f7842ffa1d09b58b45e552/init/property_service.cpp
line 120-126

For example, for writing, the label associated with
"ro.build.fingerprint" comes from the /property_contexts file
entry:

  # ro.build.fingerprint is either set in /system/build.prop, or is
  # set at runtime by system_server.
  build.fingerprint       u:object_r:fingerprint_prop:s0

However, we fail to follow this same special case when sorting
properties into files. Instead, ro.build.fingerprint is assigned
u:object_r:default_prop:s0 instead of u:object_r:fingerprint_prop:s0

Ignore the "ro." portion when sorting properties into files.
This will make reads and writes of properties use the same label.

Bug: 21852512
Change-Id: Ie88ffc6b78b31fc8ddf370ae27c218546fb25a83

8 years agoTidy up KernelArgumentBlock::getauxval.
Elliott Hughes [Wed, 6 Jan 2016 00:29:33 +0000 (16:29 -0800)]
Tidy up KernelArgumentBlock::getauxval.

Correct the comment, and remove the unused functionality. getauxval(3) does
now set errno to let you know it failed to find anything, but since none of
this function's callers care anyway it seems safer to leave errno untouched
until we actually have a demonstrated need for it.

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

8 years agoMerge "libc: Update Android.bp with recent changes"
Dan Willemsen [Tue, 5 Jan 2016 23:19:12 +0000 (23:19 +0000)]
Merge "libc: Update Android.bp with recent changes"
am: 507d6f2a51

* commit '507d6f2a51f907f46b5d4bfe32b5a826ad7dd25f':
  libc: Update Android.bp with recent changes

8 years agoMerge "libc: Update Android.bp with recent changes"
Dan Willemsen [Tue, 5 Jan 2016 23:14:43 +0000 (23:14 +0000)]
Merge "libc: Update Android.bp with recent changes"

8 years agolibc: Update Android.bp with recent changes
Dan Willemsen [Tue, 5 Jan 2016 22:32:06 +0000 (14:32 -0800)]
libc: Update Android.bp with recent changes

Change-Id: I54047df9db95169452bbac6d52c75161d2f3bb64

8 years agoMerge "Move __aeabi_ which are not in libgcc.a to LIBC"
Dimitry Ivanov [Tue, 5 Jan 2016 22:10:22 +0000 (22:10 +0000)]
Merge "Move __aeabi_ which are not in libgcc.a to LIBC"
am: e647db7485

* commit 'e647db7485d79135adae87be02ca1e78e5f46206':
  Move __aeabi_ which are not in libgcc.a to LIBC

8 years agoMerge "Move __aeabi_ which are not in libgcc.a to LIBC"
Dimitry Ivanov [Tue, 5 Jan 2016 22:07:02 +0000 (22:07 +0000)]
Merge "Move __aeabi_ which are not in libgcc.a to LIBC"

8 years agoMove __aeabi_ which are not in libgcc.a to LIBC
Dimitry Ivanov [Tue, 5 Jan 2016 21:48:51 +0000 (13:48 -0800)]
Move __aeabi_ which are not in libgcc.a to LIBC

The following arm symbols should be exported by libc.so:
    __aeabi_atexit; # arm
    __aeabi_memclr; # arm
    __aeabi_memclr4; # arm
    __aeabi_memclr8; # arm
    __aeabi_memcpy; # arm
    __aeabi_memcpy4; # arm
    __aeabi_memcpy8; # arm
    __aeabi_memmove; # arm
    __aeabi_memmove4; # arm
    __aeabi_memmove8; # arm
    __aeabi_memset; # arm
    __aeabi_memset4; # arm
    __aeabi_memset8; # arm

Bug: https://github.com/android-ndk/ndk/issues/1
Change-Id: I542d1ad023b8aece5dc05a28a9ca549cb51455b4

8 years agoMerge "Clarify which linker we are."
Elliott Hughes [Tue, 5 Jan 2016 19:43:15 +0000 (19:43 +0000)]
Merge "Clarify which linker we are."
am: c6c3b47be2

* commit 'c6c3b47be20be9e81725f9bd07d81a9ed752acfc':
  Clarify which linker we are.

8 years agoMerge "Clarify which linker we are."
Elliott Hughes [Tue, 5 Jan 2016 19:38:47 +0000 (19:38 +0000)]
Merge "Clarify which linker we are."

8 years agoClarify which linker we are.
Elliott Hughes [Tue, 5 Jan 2016 01:45:36 +0000 (17:45 -0800)]
Clarify which linker we are.

Also, we're not a debugger.

Also include LD_LIBRARY_PATH and LD_PRELOAD because they would have helped
diagnose a recent issue.

Change-Id: I7237a7236b7140ab49483c02efa705317d07bd3f

8 years agoMerge "Temporary apply LIBC version to __pthread_gettid"
Dimitry Ivanov [Tue, 5 Jan 2016 08:25:59 +0000 (08:25 +0000)]
Merge "Temporary apply LIBC version to __pthread_gettid"
am: ff164ef661

* commit 'ff164ef6615ff8bb3395fa05b5651d6dd1f157ef':
  Temporary apply LIBC version to __pthread_gettid

8 years agoMerge "Temporary apply LIBC version to __pthread_gettid"
Dimitry Ivanov [Tue, 5 Jan 2016 08:22:24 +0000 (08:22 +0000)]
Merge "Temporary apply LIBC version to __pthread_gettid"

8 years agoTemporary apply LIBC version to __pthread_gettid
Dimitry Ivanov [Tue, 5 Jan 2016 06:36:18 +0000 (22:36 -0800)]
Temporary apply LIBC version to __pthread_gettid

This is workaround for http://b/26391427

Bug: http://b/26391427
Change-Id: Ibf5c611cf4c04dfa595644225e6d9503089a18da

8 years agoMerge "Revert "Temporary apply LIBC version to __pthread_gettid""
Dimitry Ivanov [Tue, 5 Jan 2016 08:08:15 +0000 (08:08 +0000)]
Merge "Revert "Temporary apply LIBC version to __pthread_gettid""
am: c1113a3fc7

* commit 'c1113a3fc7f32fb86937f7ab73afe0a481688788':
  Revert "Temporary apply LIBC version to __pthread_gettid"

8 years agoMerge "Revert "Temporary apply LIBC version to __pthread_gettid""
Dimitry Ivanov [Tue, 5 Jan 2016 08:04:17 +0000 (08:04 +0000)]
Merge "Revert "Temporary apply LIBC version to __pthread_gettid""

8 years agoRevert "Temporary apply LIBC version to __pthread_gettid"
Dimitry Ivanov [Tue, 5 Jan 2016 08:03:56 +0000 (08:03 +0000)]
Revert "Temporary apply LIBC version to __pthread_gettid"

This reverts commit eb90e91cb5872f6aac7008b0c83e103d396be196.

Change-Id: I63450087b6d3c23218b77d5eee37965f254a82d6

8 years agoMerge "Temporary apply LIBC version to __pthread_gettid"
Dimitry Ivanov [Tue, 5 Jan 2016 07:05:39 +0000 (07:05 +0000)]
Merge "Temporary apply LIBC version to __pthread_gettid"
am: 56ecf28014

* commit '56ecf28014ab42934877c111e29b4ca3f48d25bd':
  Temporary apply LIBC version to __pthread_gettid

8 years agoMerge "Temporary apply LIBC version to __pthread_gettid"
Dimitry Ivanov [Tue, 5 Jan 2016 07:02:15 +0000 (07:02 +0000)]
Merge "Temporary apply LIBC version to __pthread_gettid"

8 years agoTemporary apply LIBC version to __pthread_gettid
Dimitry Ivanov [Tue, 5 Jan 2016 06:36:18 +0000 (22:36 -0800)]
Temporary apply LIBC version to __pthread_gettid

This is workaround for http://b/26391427

Bug: http://b/26391427
Change-Id: I4ccc56e8b1bd2597f267df9706a33bb635abcfcb

8 years agoMerge changes I4fc241e6,Idca71396
Dimitry Ivanov [Mon, 4 Jan 2016 22:56:28 +0000 (22:56 +0000)]
Merge changes I4fc241e6,Idca71396
am: 04673ee997

* commit '04673ee997996e970d58c2ab83041ca7f01ebe5c':
  Move __system_property* to LIBC_PRIVATE for lp64 libc
  Move ndk-cruft symbols to LIBC_PRIVATE

8 years agoMerge changes I4fc241e6,Idca71396
Dimitry Ivanov [Mon, 4 Jan 2016 22:52:21 +0000 (22:52 +0000)]
Merge changes I4fc241e6,Idca71396

* changes:
  Move __system_property* to LIBC_PRIVATE for lp64 libc
  Move ndk-cruft symbols to LIBC_PRIVATE

8 years agoMove __system_property* to LIBC_PRIVATE for lp64 libc
Dimitry Ivanov [Mon, 4 Jan 2016 22:39:42 +0000 (14:39 -0800)]
Move __system_property* to LIBC_PRIVATE for lp64 libc

Bug: http://b/26367254
Change-Id: I4fc241e69444a4b5641dfdf09576fe3ce5c1169e

8 years agoMove ndk-cruft symbols to LIBC_PRIVATE
Dimitry Ivanov [Mon, 4 Jan 2016 21:46:42 +0000 (13:46 -0800)]
Move ndk-cruft symbols to LIBC_PRIVATE

Bug: http://b/26385283
Change-Id: Idca71396f9de4141eefc4e1851ba92ebff1ac792

8 years agoMerge "Revert "Revert "Implement getifaddrs(3)/freeifaddrs(3)."""
Elliott Hughes [Mon, 4 Jan 2016 21:08:20 +0000 (21:08 +0000)]
Merge "Revert "Revert "Implement getifaddrs(3)/freeifaddrs(3)."""
am: e13434f9da

* commit 'e13434f9da8fae2e0714960a9f28b7790097560c':
  Revert "Revert "Implement getifaddrs(3)/freeifaddrs(3).""

8 years agoMerge "Revert "Revert "Implement getifaddrs(3)/freeifaddrs(3)."""
Elliott Hughes [Mon, 4 Jan 2016 21:03:48 +0000 (21:03 +0000)]
Merge "Revert "Revert "Implement getifaddrs(3)/freeifaddrs(3)."""

8 years agoRevert "Revert "Implement getifaddrs(3)/freeifaddrs(3).""
Elliott Hughes [Mon, 4 Jan 2016 20:38:05 +0000 (20:38 +0000)]
Revert "Revert "Implement getifaddrs(3)/freeifaddrs(3).""

This reverts commit 76814a8250fd5e1502909ef5e10e4d166cc96c0e.

This differs from the original in fixing the GCC -Werror build:

  bionic/libc/bionic/ifaddrs.cpp: In function 'void __handle_netlink_response(ifaddrs**, nlmsghdr*)':
  bionic/libc/bionic/ifaddrs.cpp:113:62: error: use of old-style cast [-Werror=old-style-cast]
       ifinfomsg* ifi = reinterpret_cast<ifinfomsg*>(NLMSG_DATA(hdr));

This appears to be a GCC bug; the GCC command-line correctly uses -isystem,
and manually adding #pragma GCC system_header doesn't help. So just turn the
warning off for GCC for now. We won't need to worry about building with GCC
soon anyway.

Bug: http://b/26238832
Change-Id: I01615bd335edf11baf487b1c83a9157cd780f4a1

8 years agoMerge changes Ic66f6519,Ic16acea5
Dimitry Ivanov [Mon, 4 Jan 2016 19:00:31 +0000 (19:00 +0000)]
Merge changes Ic66f6519,Ic16acea5
am: 2fed6aa9f0

* commit '2fed6aa9f0d2a90d59ad3c4d73313958f3470152':
  Make some of unwanted symbols LIBC_PRIVATE
  Make symbols exported via libgcc.a LIBC_PRIVATE

8 years agoMerge changes Ic66f6519,Ic16acea5
Dimitry Ivanov [Mon, 4 Jan 2016 18:55:42 +0000 (18:55 +0000)]
Merge changes Ic66f6519,Ic16acea5

* changes:
  Make some of unwanted symbols LIBC_PRIVATE
  Make symbols exported via libgcc.a LIBC_PRIVATE

8 years agoMerge "Add tests for /proc/self/fd and /proc/self/task/TID/fd access"
Nick Kralevich [Thu, 24 Dec 2015 04:07:16 +0000 (04:07 +0000)]
Merge "Add tests for /proc/self/fd and /proc/self/task/TID/fd access"
am: fa8b9312d9

* commit 'fa8b9312d93bcbbb6d1f6e287e0a92a2d16fd5bd':
  Add tests for /proc/self/fd and /proc/self/task/TID/fd access

8 years agoMerge "Add tests for /proc/self/fd and /proc/self/task/TID/fd access"
Nick Kralevich [Thu, 24 Dec 2015 04:02:47 +0000 (04:02 +0000)]
Merge "Add tests for /proc/self/fd and /proc/self/task/TID/fd access"

8 years agoAdd tests for /proc/self/fd and /proc/self/task/TID/fd access
Nick Kralevich [Thu, 24 Dec 2015 01:42:29 +0000 (17:42 -0800)]
Add tests for /proc/self/fd and /proc/self/task/TID/fd access

Add tests to ensure that the following kernel patches are present:

  __ptrace_may_access() should not deny sub-threads
  * https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=73af963f9f3036dffed55c3a2898598186db1045

  proc: make proc_fd_permission() thread-friendly
  * https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=96d0df79f2644fc823f26c06491e182d87a90c2a

  proc: actually make proc_fd_permission() thread-friendly
  * https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=54708d2858e79a2bdda10bf8a20c80eb96c20613

Bug: 26110743
Bug: 24912743
Bug: 26016905
Change-Id: I7eab002ddfade9e4bfe51908e190231c8dde2cc7

8 years agoMerge "Revert "Implement getifaddrs(3)/freeifaddrs(3).""
Yi Kong [Tue, 22 Dec 2015 17:50:58 +0000 (09:50 -0800)]
Merge "Revert "Implement getifaddrs(3)/freeifaddrs(3).""
am: b62e633ff6

* commit 'b62e633ff679a65df97be55bd0ae6a02633ce472':
  Revert "Implement getifaddrs(3)/freeifaddrs(3)."

8 years agoMerge "Revert "Implement getifaddrs(3)/freeifaddrs(3).""
Yi Kong [Tue, 22 Dec 2015 17:48:21 +0000 (17:48 +0000)]
Merge "Revert "Implement getifaddrs(3)/freeifaddrs(3).""

8 years agoRevert "Implement getifaddrs(3)/freeifaddrs(3)."
Yi Kong [Tue, 22 Dec 2015 17:47:54 +0000 (17:47 +0000)]
Revert "Implement getifaddrs(3)/freeifaddrs(3)."

Werror build broken. Revert while working on a fix.

This reverts commit 0945ed5cc5921243724fed4465d20881f4891a8d.

Change-Id: I67edab7a7a3b9aa673ce9d14aa95380f947838a1

8 years agoMerge "Implement getifaddrs(3)/freeifaddrs(3)."
Yi Kong [Tue, 22 Dec 2015 17:14:50 +0000 (09:14 -0800)]
Merge "Implement getifaddrs(3)/freeifaddrs(3)."
am: 71417caa92

* commit '71417caa927bb6720ae6cd759f335d8081f57895':
  Implement getifaddrs(3)/freeifaddrs(3).

8 years agoMerge "Implement getifaddrs(3)/freeifaddrs(3)."
Yi Kong [Tue, 22 Dec 2015 17:11:59 +0000 (17:11 +0000)]
Merge "Implement getifaddrs(3)/freeifaddrs(3)."

8 years agoMake some of unwanted symbols LIBC_PRIVATE
Dimitry Ivanov [Tue, 22 Dec 2015 07:26:53 +0000 (23:26 -0800)]
Make some of unwanted symbols LIBC_PRIVATE

Bug: http://b/26274444
Change-Id: Ic66f6519a974b72779071235c1d0dd36655fd1b9

8 years agoMake symbols exported via libgcc.a LIBC_PRIVATE
Dimitry Ivanov [Tue, 22 Dec 2015 05:29:45 +0000 (21:29 -0800)]
Make symbols exported via libgcc.a LIBC_PRIVATE

Bug: http://b/26298172
Change-Id: Ic16acea56624680d48c0b190fbe5a6142a3fca2b

8 years agoMerge "linker: implement shared namespaces"
Dimitry Ivanov [Mon, 21 Dec 2015 23:16:08 +0000 (23:16 +0000)]
Merge "linker: implement shared namespaces"
am: be7c7fe218

* commit 'be7c7fe218ca13b5763fbbcb650780aff4ed1dbd':
  linker: implement shared namespaces

8 years agoMerge "linker: implement shared namespaces"
Dimitry Ivanov [Mon, 21 Dec 2015 23:10:49 +0000 (23:10 +0000)]
Merge "linker: implement shared namespaces"

8 years agolinker: implement shared namespaces
Dimitry Ivanov [Mon, 14 Dec 2015 22:11:17 +0000 (14:11 -0800)]
linker: implement shared namespaces

Shared namespaces clone the list of loaded native
libraries from the caller namespace. This allows
classloaders for bundled apps to share already loaded
libraries with default namespace.

Bug: http://b/22548808
Bug: http://b/26165097
Change-Id: I8949d45937fdb38e1f586ff0679003adac0d9dad
(cherry picked from commit e78deef364d952dd1141a2f3067a12060aaf11e6)

8 years agoImplement getifaddrs(3)/freeifaddrs(3).
Elliott Hughes [Sat, 19 Dec 2015 22:39:10 +0000 (14:39 -0800)]
Implement getifaddrs(3)/freeifaddrs(3).

Time to dust off the old libcore implementation from gingerbread and add it
to bionic. Unlike the original, this actually looks at both RTM_NEWLINK and
RTM_NEWADDR.

Bug: http://b/26238832
Change-Id: I7bb4b432deb766065b66b9c9ff36ed68249aba82

8 years agoMerge "Improve the 32-bit ABI documentation."
Elliott Hughes [Sat, 19 Dec 2015 21:50:30 +0000 (21:50 +0000)]
Merge "Improve the 32-bit ABI documentation."
am: 4afd635be1

* commit '4afd635be1b956c40f36758a482e6d83502fbb42':
  Improve the 32-bit ABI documentation.

8 years agoMerge "Improve the 32-bit ABI documentation."
Elliott Hughes [Sat, 19 Dec 2015 21:47:07 +0000 (21:47 +0000)]
Merge "Improve the 32-bit ABI documentation."

8 years agoImprove the 32-bit ABI documentation.
Elliott Hughes [Sat, 19 Dec 2015 17:36:16 +0000 (09:36 -0800)]
Improve the 32-bit ABI documentation.

Change-Id: Ie5bfc8d6f7f3946100f653de0e006072e56e18d6

8 years agoMerge "Reset access to system properties on reinitialization"
Tom Cherry [Thu, 17 Dec 2015 18:06:08 +0000 (10:06 -0800)]
Merge "Reset access to system properties on reinitialization"
am: dd57119ced

* commit 'dd57119ced4670de2ea18fc84a59f20ccec353a7':
  Reset access to system properties on reinitialization

8 years agoMerge "Reset access to system properties on reinitialization"
Tom Cherry [Thu, 17 Dec 2015 17:54:05 +0000 (17:54 +0000)]
Merge "Reset access to system properties on reinitialization"

8 years agoMerge "sem_timedwait with a null timeout doesn\'t mean "forever"."
Elliott Hughes [Thu, 17 Dec 2015 01:20:26 +0000 (01:20 +0000)]
Merge "sem_timedwait with a null timeout doesn\'t mean "forever"."
am: 7cb3c4af13

* commit '7cb3c4af134cfa4308742c86086bccdd06463c0c':
  sem_timedwait with a null timeout doesn't mean "forever".

8 years agoMerge "sem_timedwait with a null timeout doesn't mean "forever"."
Elliott Hughes [Thu, 17 Dec 2015 01:15:15 +0000 (01:15 +0000)]
Merge "sem_timedwait with a null timeout doesn't mean "forever"."

8 years agoMerge "linker: add dlvsym(3)"
Dimitry Ivanov [Thu, 17 Dec 2015 00:55:04 +0000 (00:55 +0000)]
Merge "linker: add dlvsym(3)"
am: d4f86aed42

* commit 'd4f86aed42a97e1d7c502595b0fe1270f7989c7a':
  linker: add dlvsym(3)

8 years agoMerge "Fix missing parentheses."
Christopher Ferris [Thu, 17 Dec 2015 00:42:28 +0000 (00:42 +0000)]
Merge "Fix missing parentheses."
am: 27032a39dd

* commit '27032a39dd76de8e5cd637e4f9425300c4b46a37':
  Fix missing parentheses.

8 years agoMerge "linker: add dlvsym(3)"
Dimitry Ivanov [Thu, 17 Dec 2015 00:40:13 +0000 (00:40 +0000)]
Merge "linker: add dlvsym(3)"

8 years agoMerge "Fix missing parentheses."
Christopher Ferris [Thu, 17 Dec 2015 00:30:59 +0000 (00:30 +0000)]
Merge "Fix missing parentheses."

8 years agoMerge "Fix bug in dlmalloc\'s version of calloc."
Christopher Ferris [Thu, 17 Dec 2015 00:19:52 +0000 (00:19 +0000)]
Merge "Fix bug in dlmalloc\'s version of calloc."
am: 9f20db1c94

* commit '9f20db1c94446624238f452d5fc0200444d2ea05':
  Fix bug in dlmalloc's version of calloc.

8 years agoFix missing parentheses.
Christopher Ferris [Thu, 17 Dec 2015 00:11:04 +0000 (16:11 -0800)]
Fix missing parentheses.

The BIONIC_ROUND_UP_POWER_OF_2 macro did not have parentheses around
the whole expression. This lead to the wrong value being computed when
used as part of a mathematical expression such as this:

  value = BIONIC_ROUND_UP_POWER_OF_2(value) - 1;

This only happens on 64 bit abis.

Change-Id: I6f8afbdaf16fe64a88fa0246d074b3534c9159c1

8 years agoMerge "Fix bug in dlmalloc's version of calloc."
Christopher Ferris [Thu, 17 Dec 2015 00:06:03 +0000 (00:06 +0000)]
Merge "Fix bug in dlmalloc's version of calloc."

8 years agolinker: add dlvsym(3)
Dimitry Ivanov [Fri, 11 Dec 2015 22:22:24 +0000 (14:22 -0800)]
linker: add dlvsym(3)

This changes implements dlvsym - dlsym for versioned symbols.

Bug: http://b/22865643
Change-Id: Ic90a60d512104261a1416c43f9100f0d88e3b46f

8 years agosem_timedwait with a null timeout doesn't mean "forever".
Elliott Hughes [Wed, 16 Dec 2015 23:15:58 +0000 (15:15 -0800)]
sem_timedwait with a null timeout doesn't mean "forever".

It actually means "crash immediately". Well, it's an error. And callers are
much more likely to realize their mistake if we crash immediately rather
than return EINVAL. Historically, glibc has crashed and bionic -- before
the recent changes -- returned EINVAL, so this is a behavior change.

Change-Id: I0c2373a6703b20b8a97aacc1e66368a5885e8c51

8 years agoFix bug in dlmalloc's version of calloc.
Christopher Ferris [Wed, 16 Dec 2015 20:07:25 +0000 (12:07 -0800)]
Fix bug in dlmalloc's version of calloc.

Under some circumstances, doing a calloc will make sure that the memory
returned will be zero up to the size of the requested size. However, if
there is more usable size than the requested size, that extra part
of the allocation will not be zeroed. This change fixes it so that the
entire usable memory is always zeroed.

Change-Id: I8a66d6767c074023c4ba3568bf2705e1886740fc

8 years agoMerge "Revert "Revert "Remove remaining ndk_cruft from LP64 platforms"""
Dimitry Ivanov [Wed, 16 Dec 2015 19:14:02 +0000 (19:14 +0000)]
Merge "Revert "Revert "Remove remaining ndk_cruft from LP64 platforms"""
am: d3e5301a75

* commit 'd3e5301a75256171199b23f6ba2c6651d05ce5f1':
  Revert "Revert "Remove remaining ndk_cruft from LP64 platforms""

8 years agoMerge "Revert "Revert "Remove remaining ndk_cruft from LP64 platforms"""
Dimitry Ivanov [Wed, 16 Dec 2015 19:06:09 +0000 (19:06 +0000)]
Merge "Revert "Revert "Remove remaining ndk_cruft from LP64 platforms"""

8 years agoRevert "Revert "Remove remaining ndk_cruft from LP64 platforms""
Dimitry Ivanov [Wed, 16 Dec 2015 19:02:04 +0000 (19:02 +0000)]
Revert "Revert "Remove remaining ndk_cruft from LP64 platforms""

This reverts commit 23af25b747b5e7b0ca513a87b32f1f6a3cb99698.

Bug: http://b/26164862
Change-Id: I201bf49530f33f8ba6a1a35b79723afb9e84c7a5

8 years agoMerge "Add a few missing pthread tests."
Elliott Hughes [Tue, 15 Dec 2015 15:46:24 +0000 (15:46 +0000)]
Merge "Add a few missing pthread tests."
am: 4d57e669dc

* commit '4d57e669dc994a99ad8f1a81e3d94102390edc60':
  Add a few missing pthread tests.

8 years agoMerge "Revert "Remove remaining ndk_cruft from LP64 platforms""
Dimitry Ivanov [Tue, 15 Dec 2015 02:09:12 +0000 (18:09 -0800)]
Merge "Revert "Remove remaining ndk_cruft from LP64 platforms""
am: 52a05f3ce7

* commit '52a05f3ce74112560c3a203965774c5c9b7faf2b':
  Revert "Remove remaining ndk_cruft from LP64 platforms"

8 years agoMerge "Add a few missing pthread tests."
Elliott Hughes [Tue, 15 Dec 2015 01:38:24 +0000 (01:38 +0000)]
Merge "Add a few missing pthread tests."

8 years agoMerge "Revert "Remove remaining ndk_cruft from LP64 platforms""
Dimitry Ivanov [Tue, 15 Dec 2015 01:36:19 +0000 (01:36 +0000)]
Merge "Revert "Remove remaining ndk_cruft from LP64 platforms""

8 years agoAdd a few missing pthread tests.
Elliott Hughes [Tue, 15 Dec 2015 01:35:10 +0000 (17:35 -0800)]
Add a few missing pthread tests.

This seems to be all that's tested by system/extras/tests/bionic that isn't
already better tested here.

Change-Id: Id0aa985cefd4047a6007ba9804f541069d9e92ed

8 years agoRevert "Remove remaining ndk_cruft from LP64 platforms"
Dimitry Ivanov [Tue, 15 Dec 2015 01:34:14 +0000 (01:34 +0000)]
Revert "Remove remaining ndk_cruft from LP64 platforms"

This reverts commit b1d0a2ae7790f882d8f1ab24d7ef15e2b90c8ca2.

Change-Id: I1da06be0b78a4f2a4cad7e4a19a3ee755f55a813

8 years agoMerge "Remove remaining ndk_cruft from LP64 platforms"
Dimitry Ivanov [Tue, 15 Dec 2015 00:25:42 +0000 (16:25 -0800)]
Merge "Remove remaining ndk_cruft from LP64 platforms"
am: b34ae08cc6

* commit 'b34ae08cc62506142c0f2407101f4914384a0d86':
  Remove remaining ndk_cruft from LP64 platforms

8 years agoMerge "Remove remaining ndk_cruft from LP64 platforms"
Dimitry Ivanov [Mon, 14 Dec 2015 23:55:55 +0000 (23:55 +0000)]
Merge "Remove remaining ndk_cruft from LP64 platforms"

8 years agoRemove remaining ndk_cruft from LP64 platforms
Dimitry Ivanov [Mon, 14 Dec 2015 23:49:28 +0000 (15:49 -0800)]
Remove remaining ndk_cruft from LP64 platforms

This change removes endpwent, dlmalloc_inspect_all, dlmalloc_trim
from lp64 libc.so. It also removed necessety of having brillo
version scripts for lp64 platforms.

Bug: http://b/26164862
Change-Id: I4e9b38907bb1dc410f0eb6d2f5d5944fe713da51

8 years agoMerge changes Iaee1b711,Ia3dd0761
Dimitry Ivanov [Mon, 14 Dec 2015 23:29:44 +0000 (23:29 +0000)]
Merge changes Iaee1b711,Ia3dd0761
am: 881673cb45

* commit '881673cb45449f9fbc9fa496cf1d777868ee9da8':
  Generate libc version-script for brillo
  Revert "Don't verify version scripts on 32-bit Brillo"

8 years agoMerge changes Iaee1b711,Ia3dd0761
Dimitry Ivanov [Mon, 14 Dec 2015 22:53:06 +0000 (22:53 +0000)]
Merge changes Iaee1b711,Ia3dd0761

* changes:
  Generate libc version-script for brillo
  Revert "Don't verify version scripts on 32-bit Brillo"

8 years agoGenerate libc version-script for brillo
Dimitry Ivanov [Mon, 14 Dec 2015 22:07:52 +0000 (14:07 -0800)]
Generate libc version-script for brillo

Brillo doesn't use the ndk cruft, so we need
separate set of version scripts. Added new "nobrillo"
tag to mark such symbols in *.map.txt files.

Bug: http://b/26164862
Change-Id: Iaee1b7119f75b68c2971679fc32817e6df29fd94

8 years agoRevert "Don't verify version scripts on 32-bit Brillo"
Dimitry Ivanov [Mon, 14 Dec 2015 22:18:55 +0000 (14:18 -0800)]
Revert "Don't verify version scripts on 32-bit Brillo"

This reverts commit 31951b7f0dc7ce577a21682e54362b0cf2913e11.

Bug: http://b/26164862

8 years agoMerge "Fix personality test for mips32r6"
Elliott Hughes [Mon, 14 Dec 2015 16:07:14 +0000 (08:07 -0800)]
Merge "Fix personality test for mips32r6"
am: 162a8524ea

* commit '162a8524ea79564b5c92e5effc86588cac07e23c':
  Fix personality test for mips32r6

8 years agoMerge "Fix personality test for mips32r6"
Elliott Hughes [Mon, 14 Dec 2015 15:59:29 +0000 (15:59 +0000)]
Merge "Fix personality test for mips32r6"

8 years agoFix personality test for mips32r6
Lazar Trsic [Fri, 11 Dec 2015 16:02:49 +0000 (17:02 +0100)]
Fix personality test for mips32r6

When personality syscall is executed on mips64, for a 32bit process,
sys_32_personality() is called, which converts PER_LINUX32 -> PER_LINUX.
Change expected value when mips32 is a second architecture.

For more information see:
https://www.linux-mips.org/archives/linux-mips/2015-08/msg00421.html
https://www.linux-mips.org/archives/linux-mips/2015-11/msg00093.html

Change-Id: I8c9062f536ad6e513f0ac585da3568d80e5fa1b4

8 years agoMerge "Don\'t verify version scripts on 32-bit Brillo"
Dan Willemsen [Sat, 12 Dec 2015 02:35:02 +0000 (18:35 -0800)]
Merge "Don\'t verify version scripts on 32-bit Brillo"
am: a7ff3964ab

* commit 'a7ff3964abc860f70f242a1d2ee3f6e3e690d4df':
  Don't verify version scripts on 32-bit Brillo

8 years agoMerge "Don't verify version scripts on 32-bit Brillo"
Dan Willemsen [Sat, 12 Dec 2015 02:29:29 +0000 (02:29 +0000)]
Merge "Don't verify version scripts on 32-bit Brillo"

8 years agoDon't verify version scripts on 32-bit Brillo
Dan Willemsen [Sat, 12 Dec 2015 00:38:06 +0000 (16:38 -0800)]
Don't verify version scripts on 32-bit Brillo

Brillo doesn't use the ndk cruft, so the same version scripts do not
apply. Until we have brillo-specific version scripts, just disable the
version script check.

Bug: 26164862
Change-Id: I682860ec1c5b36014c7a6cf24da43df553e9dc9f

8 years agoMerge "Remove __bionic_libgcc_unwind_symbols from version script"
Dimitry Ivanov [Fri, 11 Dec 2015 20:02:35 +0000 (12:02 -0800)]
Merge "Remove __bionic_libgcc_unwind_symbols from version script"
am: 52e2db647c

* commit '52e2db647cf2660512d1de3469906e909fa0cd92':
  Remove __bionic_libgcc_unwind_symbols from version script

8 years agoMerge "Remove __bionic_libgcc_unwind_symbols from version script"
Dimitry Ivanov [Fri, 11 Dec 2015 19:41:33 +0000 (19:41 +0000)]
Merge "Remove __bionic_libgcc_unwind_symbols from version script"

8 years agoRemove __bionic_libgcc_unwind_symbols from version script
Dimitry Ivanov [Fri, 11 Dec 2015 19:30:48 +0000 (11:30 -0800)]
Remove __bionic_libgcc_unwind_symbols from version script

Bug: http://b/26004476
Change-Id: Iaa468de4cbcc94e88badc5cde0f4421c710c1f38

8 years agoReset access to system properties on reinitialization
Tom Cherry [Wed, 9 Dec 2015 23:48:15 +0000 (15:48 -0800)]
Reset access to system properties on reinitialization

Treat subsequent calls to __system_properties_init() as a
reinitialization of system properties and revoke access to prop files
that have been previously mapped but that the process's current context
does not have access to.  Additionally reset the no_access_ flag in
case permissions have loosened and previously unaccessible files can now
be accessed.

This is meant to work around an issue that setcon() does not revoke
mmap() mappings, so we must manually revoke them after a successful
setcon() call.

Bug 26114086

Change-Id: I4d690abb6817283ca64ac26ea4c1dad398a98fbc

8 years agoMerge "Move dlsym and dladdr implementation to linker.cpp"
Dimitry Ivanov [Fri, 11 Dec 2015 01:33:36 +0000 (17:33 -0800)]
Merge "Move dlsym and dladdr implementation to linker.cpp"
am: 0bc3977537

* commit '0bc397753775e4ccc5aaaa53fae11aa5165fea69':
  Move dlsym and dladdr implementation to linker.cpp