Commit Graph

11990 Commits

Author SHA1 Message Date
Elliott Hughes
1ec1bbda7f am 9a9b6357: Merge "Apparently, logd does need the NULs."
* commit '9a9b635745dc776dcfeec51d68b85ca7e8cdbe7d':
  Apparently, logd does need the NULs.
2015-02-05 20:22:39 +00:00
Elliott Hughes
9a9b635745 Merge "Apparently, logd does need the NULs." 2015-02-05 20:05:46 +00:00
Elliott Hughes
aba6f712d4 Apparently, logd does need the NULs.
Change-Id: I04b834e65c26c5821b952f78a0de7f92527cbdba
2015-02-05 12:02:04 -08:00
Yabin Cui
ffcabed4bf am 63826658: Merge "Add signal handling in bionic gtest main."
* commit '63826658f4bcfff4f3a87fe651f22cc9b35fe8b9':
  Add signal handling in bionic gtest main.
2015-02-05 04:24:43 +00:00
Yabin Cui
63826658f4 Merge "Add signal handling in bionic gtest main." 2015-02-05 04:21:03 +00:00
Yabin Cui
1d4c780a2e Add signal handling in bionic gtest main.
The two bugs are very closely related and code amount is very small,
So I think they may be fixed in one change.

Bug: 19128558
Bug: 19129994
Change-Id: I44a35398e64dfca7e9676428cb8f4026e8f6e488
2015-02-04 19:06:07 -08:00
Dimitry Ivanov
a1d3aa1f95 am 8e5f9bc8: Merge "linker: Use load_bias to adjust search address in elf_addr_lookup"
* commit '8e5f9bc8a46872e3f0ac4799558fdfd5999f9c20':
  linker: Use load_bias to adjust search address in elf_addr_lookup
2015-02-05 02:30:48 +00:00
Colin Cross
427d438dd4 am da2c0a70: Merge changes Ib87855e8,I4b46ae20,I66364a5c,Id3fcf680
* commit 'da2c0a708ed6c0091f3f89fd8838292579dad800':
  Use LOCAL_LDFLAGS_64 instead of enumerating 64-bit architectures
  Fix typo in cpu variant makefile depenendency for arm64
  Remove libc_static_common_src_files
  Share LP32 makefile settings between arches
2015-02-05 02:30:47 +00:00
Yabin Cui
e760a1eb30 am 17976019: Merge "Fix poll/ppoll fortify test to avoid hanging in failed fortify clang test."
* commit '17976019a13a94ae428849bfe297f8e531f95013':
  Fix poll/ppoll fortify test to avoid hanging in failed fortify clang test.
2015-02-05 02:30:46 +00:00
Dimitry Ivanov
8e5f9bc8a4 Merge "linker: Use load_bias to adjust search address in elf_addr_lookup" 2015-02-05 02:23:34 +00:00
Colin Cross
da2c0a708e Merge changes Ib87855e8,I4b46ae20,I66364a5c,Id3fcf680
* changes:
  Use LOCAL_LDFLAGS_64 instead of enumerating 64-bit architectures
  Fix typo in cpu variant makefile depenendency for arm64
  Remove libc_static_common_src_files
  Share LP32 makefile settings between arches
2015-02-05 01:57:28 +00:00
Colin Cross
5b869c0bbf Use LOCAL_LDFLAGS_64 instead of enumerating 64-bit architectures
LOCAL_LDFLAGS_<arch> was being set for arm64, mips64, and x86_64.
Use LOCAL_LDFLAGS_64 instead.

Change-Id: Ib87855e8a7783f82461b707fffa7f1663e6be9c8
2015-02-04 17:40:29 -08:00
Colin Cross
a6b6ed5fe9 Fix typo in cpu variant makefile depenendency for arm64
cpu_variank_mk -> cpu_variant_mk

Change-Id: I4b46ae20de72ed2dc8820d62ac35ddc6b915a195
2015-02-04 17:38:27 -08:00
Colin Cross
7dc502d012 Remove libc_static_common_src_files
libc_static_common_src_files is never set after
c3f114037d, remove the remaining
references to it.

Change-Id: I66364a5c1b031ad69d608f6f44244049192944f6
2015-02-04 17:37:23 -08:00
Colin Cross
1742a32aea Share LP32 makefile settings between arches
Add <var>_32 to patch-up-arch-specific-flags, and move the LP32
cruft varaibles from the 32-bit arch specific makefiles into the
top level Android.mk.

Change-Id: Id3fcf6805d4af048c2524c94b1295416ebe7d057
2015-02-04 17:35:49 -08:00
Chris Dearman
8e55381939 linker: Use load_bias to adjust search address in elf_addr_lookup
load_bias is the delta between a symbols address in memory and the value
contained in the symbol table.

Change-Id: I35c87b69025b64f7e4a1418ca766618f4533fb3e
2015-02-04 17:16:27 -08:00
Yabin Cui
17976019a1 Merge "Fix poll/ppoll fortify test to avoid hanging in failed fortify clang test." 2015-02-05 01:14:32 +00:00
Yabin Cui
f4fe6937aa Fix poll/ppoll fortify test to avoid hanging in failed fortify clang test.
Bug: 19220800
Change-Id: Ie75c640183c4a41a499556fefb4f824a134a5fb1
2015-02-04 12:27:06 -08:00
Neil Fuller
6d632af3b0 am 2151f09f: Merge "Set INCLUDE_UNI_CORE_DATA=1 when rebuilding ICU4C time zone data."
* commit '2151f09fbfc2f6084366587df10132e93f4d818c':
  Set INCLUDE_UNI_CORE_DATA=1 when rebuilding ICU4C time zone data.
2015-02-04 16:39:06 +00:00
Neil Fuller
2151f09fbf Merge "Set INCLUDE_UNI_CORE_DATA=1 when rebuilding ICU4C time zone data." 2015-02-04 16:33:01 +00:00
Fredrik Roubert
bdd8452472 Set INCLUDE_UNI_CORE_DATA=1 when rebuilding ICU4C time zone data.
This is now necessary to build .dat files that are useable for ICU4J as
well, and will need to be used for any future updates of the .dat file:

https://android.googlesource.com/platform/external/icu/+/6b52738

Change-Id: Ifa3a7469a66ab932db20876697e45814f0c5ddc3
2015-02-04 17:17:34 +01:00
Yabin Cui
dcf371f5e7 am 7e1b3d3e: Merge "Switch sem_t from bionic atomics to stdatomic.h."
* commit '7e1b3d3e68f7430322a88be06f6b53c358fd14bf':
  Switch sem_t from bionic atomics to stdatomic.h.
2015-02-04 02:45:44 +00:00
Yabin Cui
7e1b3d3e68 Merge "Switch sem_t from bionic atomics to stdatomic.h." 2015-02-04 02:42:16 +00:00
Yabin Cui
a3d97da4c5 Switch sem_t from bionic atomics to stdatomic.h.
Bug: 17572887
Change-Id: If66851ba9b831cdd698b9f1303289bb14448bd03
2015-02-03 16:35:57 -08:00
Yabin Cui
2d98818771 am 11829be3: Merge "Add test about pthread_mutex_t owner tid limit."
* commit '11829be3e1a9e9e2271ba64a78c327bde6e044eb':
  Add test about pthread_mutex_t owner tid limit.
2015-02-03 22:34:58 +00:00
Yabin Cui
11829be3e1 Merge "Add test about pthread_mutex_t owner tid limit." 2015-02-03 22:28:56 +00:00
Nick Kralevich
72c3071d54 am f00f484c: Merge "Ensure raw fchmod/fchmodat syscalls are hidden."
* commit 'f00f484cb59c1d599242daecbf833397aa3ba5d8':
  Ensure raw fchmod/fchmodat syscalls are hidden.
2015-02-03 20:24:53 +00:00
Yabin Cui
140f3678f0 Add test about pthread_mutex_t owner tid limit.
Bug: 19216648
Change-Id: I7b12955bdcad31c13bf8ec2740ff88ba15223ec0
2015-02-03 12:20:46 -08:00
Nick Kralevich
f00f484cb5 Merge "Ensure raw fchmod/fchmodat syscalls are hidden." 2015-02-03 20:17:33 +00:00
Nick Kralevich
00490ae3f3 Ensure raw fchmod/fchmodat syscalls are hidden.
In https://android-review.googlesource.com/#/c/127908/5/libc/SYSCALLS.TXT@116
Elliott said:

  for LP64 these will be hidden. for LP32 we were cowards and left
  them all public for compatibility (though i don't think we ever
  dremeled to see whether it was needed). we don't have an easy
  way to recognize additions, though, so we can't prevent adding
  new turds.

Add a mechanism to prevent the adding of new turds, and use that
mechanism on the fchmod/fchmodat system calls.

Bug: 19233951
Change-Id: I98f98345970b631a379f348df57858f9fc3d57c0
2015-02-03 12:10:30 -08:00
Hans Boehm
0cddad0fd1 am d57bf449: Merge "Switch pthread_mutex_t from bionic atomics to <stdatomic.h>."
* commit 'd57bf449fe6c2dcf35d90d6e4098038ac8a24ecb':
  Switch pthread_mutex_t from bionic atomics to <stdatomic.h>.
2015-02-03 02:48:20 +00:00
Hans Boehm
d57bf449fe Merge "Switch pthread_mutex_t from bionic atomics to <stdatomic.h>." 2015-02-03 02:42:53 +00:00
Elliott Hughes
aa916c8db8 am c5999c1e: Merge "Clean up SEEK_SET definitions."
* commit 'c5999c1e0382c40286cc631c6a53e7781bc03154':
  Clean up SEEK_SET definitions.
2015-02-03 01:25:23 +00:00
Elliott Hughes
c5999c1e03 Merge "Clean up SEEK_SET definitions." 2015-02-03 01:21:17 +00:00
Yabin Cui
86fc96f733 Switch pthread_mutex_t from bionic atomics to <stdatomic.h>.
Bug: 17574456
Change-Id: I5ce3d3dc07e804e9ce55c42920f47531b56e04de
2015-02-02 15:00:01 -08:00
Nick Kralevich
0cb8abc620 am d80ec661: Merge "Add fchmodat(AT_SYMLINK_NOFOLLOW) and fchmod O_PATH support"
* commit 'd80ec66121b5af96c6b3d07ba34353b3d517f5b3':
  Add fchmodat(AT_SYMLINK_NOFOLLOW) and fchmod O_PATH support
2015-02-02 22:07:35 +00:00
Nick Kralevich
d80ec66121 Merge "Add fchmodat(AT_SYMLINK_NOFOLLOW) and fchmod O_PATH support" 2015-02-02 22:03:41 +00:00
Elliott Hughes
1ed337dbdf Clean up SEEK_SET definitions.
If we lose the #ifndef, the compiler will tell us if the definitions
of SEEK_SET and friends ever get out of sync.

Change-Id: I357cabec7c9cd451c604342344f210bba20fb6bc
2015-02-02 14:02:09 -08:00
Nick Kralevich
3cbc6c627f Add fchmodat(AT_SYMLINK_NOFOLLOW) and fchmod O_PATH support
Many libc functions have an option to not follow symbolic
links. This is useful to avoid security sensitive code
from inadvertantly following attacker supplied symlinks
and taking inappropriate action on files it shouldn't.
For example, open() has O_NOFOLLOW, chown() has
lchown(), stat() has lstat(), etc.

There is no such equivalent function for chmod(), such as lchmod().
To address this, POSIX introduced fchmodat(AT_SYMLINK_NOFOLLOW),
which is intended to provide a way to perform a chmod operation
which doesn't follow symlinks.

Currently, the Linux kernel doesn't implement AT_SYMLINK_NOFOLLOW.
In GLIBC, attempting to use the AT_SYMLINK_NOFOLLOW flag causes
fchmodat to return ENOTSUP. Details are in "man fchmodat".

Bionic currently differs from GLIBC in that AT_SYMLINK_NOFOLLOW
is silently ignored and treated as if the flag wasn't present.

This patch provides a userspace implementation of
AT_SYMLINK_NOFOLLOW for bionic. Using open(O_PATH | O_NOFOLLOW),
we can provide a way to atomically change the permissions on
files without worrying about race conditions.

As part of this change, we add support for fchmod on O_PATH
file descriptors, because it's relatively straight forward
and could be useful in the future.

The basic idea behind this implementation comes from
https://sourceware.org/bugzilla/show_bug.cgi?id=14578 , specifically
comment #10.

Change-Id: I1eba0cdb2c509d9193ceecf28f13118188a3cfa7
2015-02-02 13:17:17 -08:00
Elliott Hughes
815fc9bc9e am c57b5c50: Merge "Small logging cleanup."
* commit 'c57b5c5094f915ff975a256e086d58e2e7cfedf1':
  Small logging cleanup.
2015-02-02 20:46:39 +00:00
Elliott Hughes
c57b5c5094 Merge "Small logging cleanup." 2015-02-02 20:36:29 +00:00
Elliott Hughes
42084a2653 Small logging cleanup.
Don't send the trailing NUL bytes to the logger, call strlen if we already
know the length, or cast more specifically than we need to.

Change-Id: I68c9388a22bddea49120a1022dda8db8991360c1
2015-02-02 12:24:46 -08:00
Elliott Hughes
6c1252decb am 530aaecc: Merge "Explicitly check that the reason fortify tests abort is fortify."
* commit '530aaeccd875f708918f59cd5ff8b076c156adab':
  Explicitly check that the reason fortify tests abort is fortify.
2015-02-02 19:32:44 +00:00
Elliott Hughes
530aaeccd8 Merge "Explicitly check that the reason fortify tests abort is fortify." 2015-02-02 19:25:58 +00:00
Elliott Hughes
d036e94bb3 Explicitly check that the reason fortify tests abort is fortify.
Change-Id: I95291e2febf7b497c1d9f37fd7fa9acdd21e86a4
2015-02-02 11:18:58 -08:00
Elliott Hughes
5f7819d6f1 am 7f0f30c6: Merge "Fix clang build."
* commit '7f0f30c6e20c1bf04bec05077eef2d779e7a32df':
  Fix clang build.
2015-02-02 18:36:22 +00:00
Elliott Hughes
7f0f30c6e2 Merge "Fix clang build." 2015-02-02 18:23:28 +00:00
Elliott Hughes
30fbf5f44c Fix clang build.
Change-Id: I863137b5d35602267b4ef3a74399cf394c9994d6
2015-02-02 10:21:39 -08:00
Neil Fuller
0a302e0174 am d514d9bb: Merge "Fixes to the update-tzdata.py tool"
* commit 'd514d9bbae354da72fcb43349f0157378e52004d':
  Fixes to the update-tzdata.py tool
2015-02-02 17:57:22 +00:00
Elliott Hughes
20f2e4f7ad am 5940f98a: Merge "Fortify poll and ppoll."
* commit '5940f98a35d64f9ca249536bb8cdcdbfe43e9bc3':
  Fortify poll and ppoll.
2015-02-02 17:57:21 +00:00