14337 Commits

Author SHA1 Message Date
Elliott Hughes
694fd2d880 Add a test for getdelim(3) on a directory.
Apparently uClibc has a bug here. We don't, but let's keep it that way.

Bug: http://landley.net/notes.html#21-03-2015
Change-Id: If406df963db9bee47921d7a1c116ebcab08d96bf
2015-04-05 10:51:56 -07:00
Yabin Cui
f297fca177 am 9c4d0941: am 4bd8f963: Merge "Fix bug for recursive/errorcheck mutex on 32-bit devices."
* commit '9c4d0941f985e2ab9ec5fca579dc98d4ad26fec2':
  Fix bug for recursive/errorcheck mutex on 32-bit devices.
2015-04-04 20:07:23 +00:00
Yabin Cui
9c4d0941f9 am 4bd8f963: Merge "Fix bug for recursive/errorcheck mutex on 32-bit devices."
* commit '4bd8f9637daaada333ff35945b00cfe6cb822376':
  Fix bug for recursive/errorcheck mutex on 32-bit devices.
2015-04-04 19:47:57 +00:00
Yabin Cui
4bd8f9637d Merge "Fix bug for recursive/errorcheck mutex on 32-bit devices." 2015-04-04 19:31:55 +00:00
Yabin Cui
f796985923 Fix bug for recursive/errorcheck mutex on 32-bit devices.
Bug: 19216648
Change-Id: I3b43b2d18d25b9bde352da1e35f9568133dec7cf
2015-04-03 19:01:17 -07:00
Dmitriy Ivanov
ccacf7c16a am 5a811bed: am e686df8d: Merge "Add libdl dependency for target libraries"
* commit '5a811bed273651406c91c543eefb19d12a55f9b4':
  Add libdl dependency for target libraries
2015-04-03 23:34:13 +00:00
Dmitriy Ivanov
5a811bed27 am e686df8d: Merge "Add libdl dependency for target libraries"
* commit 'e686df8d839216460f02cf7db6c4e26a13e49afd':
  Add libdl dependency for target libraries
2015-04-03 23:14:29 +00:00
Dmitriy Ivanov
e686df8d83 Merge "Add libdl dependency for target libraries" 2015-04-03 22:54:06 +00:00
Dmitriy Ivanov
45c57131d2 Add libdl dependency for target libraries
Fixed x86_64 target build with gcc 4.9

Change-Id: Id3b1e9286c2bcbb8e3ac117bcef957304db7cfd3
2015-04-03 15:17:52 -07:00
Elliott Hughes
329aefb20f am d7e64284: am cec2ab20: Merge "Try again to fix clang build."
* commit 'd7e64284ca7fa71d298d26e1ba84ce993bb98c92':
  Try again to fix clang build.
2015-04-03 21:19:41 +00:00
Elliott Hughes
d7e64284ca am cec2ab20: Merge "Try again to fix clang build."
* commit 'cec2ab20a0d2b24c15aa289cbac5d4291c856092':
  Try again to fix clang build.
2015-04-03 20:58:48 +00:00
Elliott Hughes
4c8c63a4de am f29f8ae6: am ec8b3a7d: Merge "Fix clang build."
* commit 'f29f8ae6e3fb8af2944cdbb2c0d29894c51cf3e5':
  Fix clang build.
2015-04-03 20:53:13 +00:00
Elliott Hughes
cec2ab20a0 Merge "Try again to fix clang build." 2015-04-03 20:38:15 +00:00
Elliott Hughes
dffd3c5838 Try again to fix clang build.
I got the condition the wrong way round in the previous change.

Bug: http://b/20065774
Change-Id: I218b224b37f5fb2f7c7ec2f9af27472b340c4b15
2015-04-03 13:37:18 -07:00
Elliott Hughes
f29f8ae6e3 am ec8b3a7d: Merge "Fix clang build."
* commit 'ec8b3a7dde3c282c4f9ca5c8bf5a7e1b7469def0':
  Fix clang build.
2015-04-03 20:36:55 +00:00
Dmitriy Ivanov
c461b78e43 am 5057929f: am aea165cb: Merge "Add ANDROID_DLEXT_FORCE_LOAD flag"
* commit '5057929fc8a71feedffaf7a688468d9f8ea1621f':
  Add ANDROID_DLEXT_FORCE_LOAD flag
2015-04-03 20:24:27 +00:00
Elliott Hughes
003b1639bd am 97c78020: am b1f1de4d: Merge "Fix volantis boot."
* commit '97c7802038b3c2472d2377984e749f398eee078c':
  Fix volantis boot.
2015-04-03 20:24:26 +00:00
Elliott Hughes
ec8b3a7dde Merge "Fix clang build." 2015-04-03 20:12:02 +00:00
Elliott Hughes
0975a5d9d2 Fix clang build.
Apparently clang really doesn't want you to take the address of a builtin.
Since this is only a temporary hack, let's just shrug and accept that
clang-built volantis images won't work until we have new NVIDIA blobs.

Bug: http://b/20065774
Change-Id: I4c8e893b15a1af8f9c54d3f89bfef112b63d09b4
2015-04-03 13:10:04 -07:00
Dmitriy Ivanov
5057929fc8 am aea165cb: Merge "Add ANDROID_DLEXT_FORCE_LOAD flag"
* commit 'aea165cb03abceb85062e94f22f72e1c9d9800a4':
  Add ANDROID_DLEXT_FORCE_LOAD flag
2015-04-03 19:59:03 +00:00
Elliott Hughes
97c7802038 am b1f1de4d: Merge "Fix volantis boot."
* commit 'b1f1de4dd4b1a3802abd5284de9ebfe6a98057f1':
  Fix volantis boot.
2015-04-03 19:59:01 +00:00
Dmitriy Ivanov
aea165cb03 Merge "Add ANDROID_DLEXT_FORCE_LOAD flag" 2015-04-03 19:45:24 +00:00
Elliott Hughes
b1f1de4dd4 Merge "Fix volantis boot." 2015-04-03 19:38:31 +00:00
Elliott Hughes
76e1cbca75 Fix volantis boot.
NVIDIA binary blobs are assuming that __cache_clear, _Unwind_Backtrace,
and _Unwind_GetIP are all in some library that they link, but now we've
cleaned up this leakage, they're no longer getting it. Deliberately leak
the symbols from libc.so until we get new blobs.

Bug: http://b/20065774
Change-Id: I92ef07b2bce8d1ad719bf40dab41d745cd6904d4
2015-04-03 12:37:03 -07:00
Dmitriy Ivanov
9b82136b98 Add ANDROID_DLEXT_FORCE_LOAD flag
This flag allows to force loading of the library
  in the case when for some reason multiple ELF files
  share the same filename (because the already-loaded
  library has been removed and overwritten, for example).

Change-Id: I798d44409ee13d63eaa75d685e99c4d028d2b0c1
2015-04-03 10:50:48 -07:00
Dmitriy Ivanov
3eef109c40 am 76832b63: am 06b6e3c5: Merge "Look into local group on dlsym with RTLD_DEFAULT"
* commit '76832b63967c81549a6628f7bd02eada1b11e238':
  Look into local group on dlsym with RTLD_DEFAULT
2015-04-02 22:35:49 +00:00
Dmitriy Ivanov
76832b6396 am 06b6e3c5: Merge "Look into local group on dlsym with RTLD_DEFAULT"
* commit '06b6e3c51d38d70c5ca99f3a3f795697031ac27f':
  Look into local group on dlsym with RTLD_DEFAULT
2015-04-02 22:14:58 +00:00
Dmitriy Ivanov
06b6e3c51d Merge "Look into local group on dlsym with RTLD_DEFAULT" 2015-04-02 21:55:01 +00:00
Dmitriy Ivanov
76ac1acdac Look into local group on dlsym with RTLD_DEFAULT
Fix dlsym to look into local group when called with
  RTLD_DEFAULT and RTLD_NEXT.

Bug: 17512583
Change-Id: I541354e89539c712af2ea4ec751e546913027084
2015-04-02 14:12:45 -07:00
Elliott Hughes
84afcc3e1e am 918415f3: am d619d6ff: Merge "Remove _memset16 and _memset32 from mips/mips64 bionic."
* commit '918415f3dc8590f422fa3540c0c6877360745466':
  Remove _memset16 and _memset32 from mips/mips64 bionic.
2015-04-02 21:08:58 +00:00
Yabin Cui
9e2f2b4d88 am 801bf53a: am 00d1101c: Merge "Refactor pthread_mutex to support 32-bit owner_tid on 64-bit devices."
* commit '801bf53a2740fadd23752ce8fdb8484fb478897b':
  Refactor pthread_mutex to support 32-bit owner_tid on 64-bit devices.
2015-04-02 21:08:57 +00:00
Elliott Hughes
918415f3dc am d619d6ff: Merge "Remove _memset16 and _memset32 from mips/mips64 bionic."
* commit 'd619d6ffb876de6a8f051c850762a6f7a7e55c76':
  Remove _memset16 and _memset32 from mips/mips64 bionic.
2015-04-02 20:47:54 +00:00
Yabin Cui
801bf53a27 am 00d1101c: Merge "Refactor pthread_mutex to support 32-bit owner_tid on 64-bit devices."
* commit '00d1101cc170ce786f26143a897b4a3e3363b55f':
  Refactor pthread_mutex to support 32-bit owner_tid on 64-bit devices.
2015-04-02 20:47:53 +00:00
Elliott Hughes
d619d6ffb8 Merge "Remove _memset16 and _memset32 from mips/mips64 bionic." 2015-04-02 20:35:22 +00:00
Yabin Cui
00d1101cc1 Merge "Refactor pthread_mutex to support 32-bit owner_tid on 64-bit devices." 2015-04-02 20:27:40 +00:00
Christopher Ferris
9d4c2337b0 am 5c0dc67b: am 618935d2: Merge "gtest_repeat should allow negative values."
* commit '5c0dc67be53100f64e678e4b19ae46ea287c75ea':
  gtest_repeat should allow negative values.
2015-04-02 20:02:35 +00:00
Christopher Ferris
5c0dc67be5 am 618935d2: Merge "gtest_repeat should allow negative values."
* commit '618935d2679e84cc839316c042ee3dde5f7d7097':
  gtest_repeat should allow negative values.
2015-04-02 19:42:49 +00:00
Christopher Ferris
618935d267 Merge "gtest_repeat should allow negative values." 2015-04-02 19:19:38 +00:00
Christopher Ferris
119cb55d43 gtest_repeat should allow negative values.
If you pass in a negative value to gtest_repeat, it should run forever.
The new runner didn't allow this, now it does.

Change-Id: Ie0002c12e2fdad22b264adca37c165cfcfe05c7a
2015-04-02 12:16:00 -07:00
Elliott Hughes
b0cf9288cd Remove _memset16 and _memset32 from mips/mips64 bionic.
These should be in libcutils instead.

Change-Id: Ibbc94755e6da61bf9ce2c8f9a047a082bb9bce24
2015-04-02 10:34:58 -07:00
Nick Kralevich
c68d6bcd8e am 3b84e4bc: am 3cc3f17a: Merge "linker: never mark pages simultaneously writable / executable"
* commit '3b84e4bcd020cb917067fa87e4a60a62c5c42928':
  linker: never mark pages simultaneously writable / executable
2015-04-02 14:21:58 +00:00
Nick Kralevich
3b84e4bcd0 am 3cc3f17a: Merge "linker: never mark pages simultaneously writable / executable"
* commit '3cc3f17aa4b241da7303299032e4269fcf92a4e6':
  linker: never mark pages simultaneously writable / executable
2015-04-02 13:59:26 +00:00
Nick Kralevich
3cc3f17aa4 Merge "linker: never mark pages simultaneously writable / executable" 2015-04-02 13:29:50 +00:00
Yabin Cui
e69c24543d Refactor pthread_mutex to support 32-bit owner_tid on 64-bit devices.
Bug: 19216648
Change-Id: I765ecacc9036659c766f5d1f6600e1a65364199b
2015-04-01 21:12:22 -07:00
Dan Albert
5856150605 am 004d0048: am ab7c79e2: Merge "Don\'t export new/delete from libc shared libraries."
* commit '004d004868613b9ad00453661838e0f372958dba':
  Don't export new/delete from libc shared libraries.
2015-04-02 02:59:52 +00:00
Dimitry Ivanov
84f634469b am b3c17a19: am 202af3a2: Merge "Revert "Remove text-relocation support for lp32""
* commit 'b3c17a196222cc09af98f095a0863fc048309fa7':
  Revert "Remove text-relocation support for lp32"
2015-04-02 01:38:57 +00:00
Dan Albert
004d004868 am ab7c79e2: Merge "Don\'t export new/delete from libc shared libraries."
* commit 'ab7c79e22e5495a2aa171047a044ce1037e461a9':
  Don't export new/delete from libc shared libraries.
2015-04-02 01:13:18 +00:00
Nick Kralevich
8fdb3419a5 linker: never mark pages simultaneously writable / executable
When the Android dynamic linker handles a text relocation,
it first relaxes the permissions on the segment being modified,
performs the modifications, and then restores the page permissions.
The relaxation worked by adding PROT_WRITE to whatever protection
bits were set in the section. In effect, the pages were getting set
to PROT_READ|PROT_WRITE|PROT_EXEC, modified, then restored to
PROT_READ|PROT_EXEC

The SELinux kernel code differentiates between 4 different kinds
of executable memory:
* Executable stack (execstack)
* Executable heap (execheap)
* File-based executable code which has been modified (execmod)
* All other executable memory (execmem)

The execmod capability is only triggered by the kernel when a
dirty but non-executable mmap()ed page becomes executable. When that
occurs, an SELinux policy check is done to see if the execmod capability
is provided by policy.

However, if the page is already executable, and PROT_WRITE is added
to the page, it's considered an execmem permission check, not an execmod
permission check.

There are certain circumstances where we may want to distinguish between
execmod and execmem. This change adjusts the dynamic linker to avoid
using RWX pages, so that an RX -> RW -> RX transition will properly
be detected as an execmod permission check instead of an execmem permission
check.

Bug: 20013628
Change-Id: I14d7be29170b156942f9809023f3b2fc1f37846c
2015-04-01 18:05:19 -07:00
Dan Albert
ab7c79e22e Merge "Don't export new/delete from libc shared libraries." 2015-04-01 23:33:53 +00:00
Dan Albert
d6bf3d5e19 Don't export new/delete from libc shared libraries.
This used to be handled by -fvisibility=hidden on libc_cxa, but that
was broken by the resolution of https://llvm.org/PR22419 (introduced
to Android in today's clang update).

Now we just use a version script that prevents these from being
re-exported from our shared libraries.

Change-Id: Ib290e1d0d7426e09ad17a91178162fff6dbdcfa9
2015-04-01 16:31:57 -07:00