Commit graph

1865 commits

Author SHA1 Message Date
Nick Kralevich
27ff1ae414 am de666485: am ba117e41: Merge "stack protector: use AT_RANDOM"
* commit 'de666485b8123ac35be94109336f7c56a7e9e3c2':
  stack protector: use AT_RANDOM
2013-01-16 13:31:24 -08:00
Nick Kralevich
de666485b8 am ba117e41: Merge "stack protector: use AT_RANDOM"
* commit 'ba117e4172fe6f160bf5f4d58b37e12c08c34245':
  stack protector: use AT_RANDOM
2013-01-16 11:31:00 -08:00
Elliott Hughes
b989c9ceda Revert "DO NOT MERGE Revert "Add the libcutils localtime_tz and mktime_t extensions to bionic.""
This reverts commit f4b34b6c39.
2013-01-16 10:34:33 -08:00
Nick Kralevich
e3a49a8661 stack protector: use AT_RANDOM
Populate the stack canaries from the kernel supplied
AT_RANDOM value, which doesn't involve any system calls.
This is slightly faster (6 fewer syscalls) and avoids
unnecessarily reading /dev/urandom, which depletes entropy.

Bug: 7959813

Change-Id: If2b43100a2a9929666df3de56b6139fed969e0f1
2013-01-16 10:09:52 -08:00
Elliott Hughes
e611fad0d0 am 14e1975e: Merge "Fix signalfd for MIPS."
* commit '14e1975e13c197180ed0481f305f83a362b16a24':
  Fix signalfd for MIPS.
2013-01-16 09:45:57 -08:00
Elliott Hughes
f193b9fc21 Fix signalfd for MIPS.
Also mark signalfd's sigset_t* argument as non-nullable.

Change-Id: I466e09cdf3fb92480744c496da92274a97f99dd1
2013-01-16 09:40:25 -08:00
Elliott Hughes
acb907fb0d Revert "DO NOT MERGE Revert "Add the libcutils localtime_tz and mktime_t extensions to bionic.""
This reverts commit f4b34b6c39.

The revert was only meant to apply to the jb-mr1 branch, but accidentally
leaked out into AOSP. This revert-revert gets AOSP master and internal
master back in sync.
2013-01-15 11:12:18 -08:00
Ben Cheng
4130af46bf am b09d7d86: Merge "Add __aeabi_idiv to the dummy reference list."
* commit 'b09d7d86004ab75b774358454d8ee261987af96b':
  Add __aeabi_idiv to the dummy reference list.
2013-01-14 15:44:01 -08:00
Ben Cheng
35f5385aa5 Add __aeabi_idiv to the dummy reference list.
If the platform code is compiled with -mcpu=cortex-a15, then without this
change prebuilt libraries built against -march=armv7 cannot resolve the
dependency on __aeabi_idiv (provided by libgcc.a).

Bug: 7961327

cherry-picked from internal master.

Change-Id: I8fe59a98eb53d641518b882523c1d6a724fb7e55
2013-01-14 15:33:40 -08:00
Nick Kralevich
1519690cfb am 29fe857e: Merge "headers: update auxvec.h from Linux kernel"
* commit '29fe857ec80e59347e28458a5396eb68d1cba0e4':
  headers: update auxvec.h from Linux kernel
2013-01-14 14:31:28 -08:00
Nick Kralevich
a67e4de662 headers: update auxvec.h from Linux kernel
Pull a new version of auxvec.h from the upstream Linux
kernel at commit b719f43059903820c31edb30f4663a2818836e7f

These files were generated using the following commands:

cd bionic/libc/kernel
./tools/clean_header.py -u ../../../external/kernel-headers/original/uapi/linux/auxvec.h
./tools/clean_header.py -u ../../../external/kernel-headers/original/linux/auxvec.h
./tools/clean_header.py -u ../../../external/kernel-headers/original/asm-x86/auxvec.h

This change is needed to get AT_RANDOM defined.

Change-Id: Ib064649684b17af6ff4b1a31d501a05f78bb81d0
2013-01-14 11:49:59 -08:00
Ian Rogers
763d4bb345 am 68fa57f0: Merge "Name anonymous mmap mallocs."
* commit '68fa57f000285af20100c00db3d2bc143ad32294':
  Name anonymous mmap mallocs.
2013-01-14 11:19:00 -08:00
Ian Rogers
68fa57f000 Merge "Name anonymous mmap mallocs." 2013-01-14 10:54:44 -08:00
Nick Kralevich
13bd37160e am bb897fa9: Merge "libc_init_static: apply relro earlier."
* commit 'bb897fa9f79d25e4445fe3ab46b86657d6660c10':
  libc_init_static: apply relro earlier.
2013-01-14 10:25:16 -08:00
Nick Kralevich
9fb48ac257 libc_init_static: apply relro earlier.
The dynamic linker applies relro before the preinit and init
arrays are executed, so we should be consistent for statically
linked executables.

Change-Id: Ia0a49d0e981a6e8791f74eed00280edf576ba139
2013-01-11 18:38:26 -08:00
Ian Rogers
8921060253 Name anonymous mmap mallocs.
Change-Id: Icc53ba1eecb8445210623826d8e99a611d686f7f
2013-01-11 17:42:17 -08:00
Nick Kralevich
fdd6dfa863 am 2c5153b0: libc: add getauxval()
* commit '2c5153b043b44e9935a334ae9b2d5a4bc5258b40':
  libc: add getauxval()
2013-01-11 16:59:57 -08:00
Nick Kralevich
2c5153b043 libc: add getauxval()
Add support for getauxval().  This method allows a program an easy way
to retrieve information from the kernel auxiliary vector, and will
hopefully replace other clumsy ways of accessing this same information.

This particular function was also added to glibc in glibc 2.16.
See the following URLs for more details.

  * http://lwn.net/Articles/519085/
  * http://www.gnu.org/software/libc/manual/html_node/Auxiliary-Vector.html

This change is a prerequisite for bug 7959813.

Bug: http://code.google.com/p/android/issues/detail?id=38441
Change-Id: Iba19d899df334bddc6f4899077ece2fc87564ea8
2013-01-11 16:44:15 -08:00
Wink Saville
801aeefe2d am a12c5445: Fix unused warnings in pthread.c
* commit 'a12c54454f3a6132988b68873903f6e9eed7f384':
  Fix unused warnings in pthread.c
2013-01-11 10:12:12 -08:00
Wink Saville
a12c54454f Fix unused warnings in pthread.c
Change-Id: I0287aadb825fd8cda29dc976bce55d75a1279fc5
2013-01-10 16:30:22 -08:00
Elliott Hughes
0f9be1eaee am bfde0b6f: Merge "glibc 2.15 treats errno as signed in strerror(3)."
* commit 'bfde0b6fd9e5de545746ab963d3a05ed2a8014f6':
  glibc 2.15 treats errno as signed in strerror(3).
2013-01-10 16:27:26 -08:00
Elliott Hughes
e6e60065ff glibc 2.15 treats errno as signed in strerror(3).
And the only reason I hadn't done that in bionic is because I wanted to behave
the same as glibc.

Change-Id: I2cf1bf0aac82a748cd6305a2cabbac0790058570
2013-01-10 16:01:59 -08:00
Elliott Hughes
34c7a3c2b0 am 0d3700d9: Merge "Only have one copy of the kernel_sigset_t hack, and add more tests."
* commit '0d3700d957debe841c385f66a8026ca8b3755815':
  Only have one copy of the kernel_sigset_t hack, and add more tests.
2013-01-10 15:28:46 -08:00
Elliott Hughes
c5d028fc91 Only have one copy of the kernel_sigset_t hack, and add more tests.
Change-Id: I377522fcba6fb4b5fd2754ab15b091014bd7c16f
2013-01-10 14:42:14 -08:00
Elliott Hughes
4ff6fa97e7 am 2bbb8fac: Merge "Add signalfd call to bionic"
* commit '2bbb8fac61e482dd96386620cc6f7f193e9c6840':
  Add signalfd call to bionic
2013-01-10 13:30:16 -08:00
Rom Lemarchand
a4b2dc016f Add signalfd call to bionic
Add signalfd() call to bionic.

Adding the signalfd call was done in 3 steps:
- add signalfd4 system call (function name and syscall
  number) to libc/SYSCALLS.TXT
- generate all necessary headers by calling
  libc/tools/gensyscalls.py. This patch is adding
  the generated files since the build system
  does not call gensyscalls.py.
- create the signalfd wrapper in signalfd.cpp and add
  the function prototype to sys/signalfd.h

(cherry-pick of 0c11611c11, modified to
work with older versions of GCC still in use on some branches.)

Change-Id: I4c6c3f12199559af8be63f93a5336851b7e63355
2013-01-10 13:14:46 -08:00
Elliott Hughes
79cecbd421 am 7e22db03: Merge "Fix an off-by-one error in the sigset_t function error handling."
* commit '7e22db037e6d9ab117bf5d50c7aca85fe74941a0':
  Fix an off-by-one error in the sigset_t function error handling.
2013-01-07 14:21:26 -08:00
Elliott Hughes
fb5e5cbdd4 Fix an off-by-one error in the sigset_t function error handling.
Spotted while running the tests on MIPS, where sigset_t is
actually large enough. The bits in sigset_t are used such that
signal 1 is represented by bit 0, so the range of signals is
actually [1, 8*sizeof(sigset_t)]; it seems clearer to reword
the code in terms of valid bit offsets [0, 8*sizeof(sigset_t)),
which leads to the usual bounds checking idiom.

Change-Id: Id899c288e15ff71c85dd2fd33c47f8e97aa1956f
2013-01-07 13:58:49 -08:00
Elliott Hughes
ec1370191e am 63dc5927: Merge "Add AF_CAN and PF_CAN (and other missing families)."
* commit '63dc592789e386ba2cd4e748090ba71d449a1e7c':
  Add AF_CAN and PF_CAN (and other missing families).
2013-01-03 16:59:39 -08:00
Elliott Hughes
81508de3d2 am f0036944: Merge "Fix debug malloc."
* commit 'f0036944a13a76dddda70347032128d4a27081d6':
  Fix debug malloc.
2013-01-03 16:42:42 -08:00
Elliott Hughes
d73c0b300e Add AF_CAN and PF_CAN (and other missing families).
Change-Id: I2c183a6f5f7a7e81e87dad85d8c9aff9c43ed33a
2013-01-03 16:25:47 -08:00
Elliott Hughes
db492b3ca7 Fix debug malloc.
...which has been broken since the linker data structures went read-only.

Bug: 7941716
Change-Id: If28f6bac0fcb13e371e4d85b064544f561c8d692
2013-01-03 15:44:03 -08:00
Elliott Hughes
c654f4fda8 am b1b53177: Merge "sysconf.c was renamed to sysconf.cpp (and modified)..."
* commit 'b1b5317799a34ac9e93f568af82952e52a9e9a13':
  sysconf.c was renamed to sysconf.cpp (and modified)...
2013-01-03 12:04:48 -08:00
Elliott Hughes
7cbff41ba3 sysconf.c was renamed to sysconf.cpp (and modified)...
...but sysconf.c still lingers on due to some git/repo accident. Kill it.

Change-Id: Iae354ecb21abf03a3f718cc45cfdddb7a9347778
2013-01-03 11:53:35 -08:00
Elliott Hughes
1287d106ed am fb62558b: Merge "Define _POSIX_MONOTONIC_CLOCK and implement sysconf(_SC_MONOTONIC_CLOCK)."
* commit 'fb62558bb4c25c8f71e0b949ba8552c674578674':
  Define _POSIX_MONOTONIC_CLOCK and implement sysconf(_SC_MONOTONIC_CLOCK).
2013-01-02 15:55:42 -08:00
Elliott Hughes
a55f63083f Define _POSIX_MONOTONIC_CLOCK and implement sysconf(_SC_MONOTONIC_CLOCK).
Bug: http://code.google.com/p/android/issues/detail?id=39680
Change-Id: I11cf10a66f9d305868a725f04f581099fb88bbfc
2013-01-02 14:23:43 -08:00
Elliott Hughes
607bd47707 am 4c4b08a3: Merge "Fix <endian.h> and <sys/endian.h>."
* commit '4c4b08a32eace878e4780ee340a57c43be950159':
  Fix <endian.h> and <sys/endian.h>.
2012-12-11 17:27:41 -08:00
Elliott Hughes
4fa35d8ae8 Fix <endian.h> and <sys/endian.h>.
Previously we'd been relying on getting the machine-specific <endian.h>
instead of the top-level <endian.h>, and <sys/endian.h> was basically broken.
Now, with this patch and the previous patch we should have <endian.h>
and <sys/endian.h> behaving the same. This is basically how NetBSD's endian.h
works, and was probably how ours was originally intended to work.

Bug: http://code.google.com/p/android/issues/detail?id=39824
Change-Id: I71de5a507e633de166013a658b5764df9e1aa09c
2012-12-11 16:17:33 -08:00
Elliott Hughes
f822e7f68e am 0521ff82: Merge "Use pthread_kill() in raise()"
* commit '0521ff8234cafcc61060961b2f856fcf4dae1e7d':
  Use pthread_kill() in raise()
2012-12-10 11:40:04 -08:00
Chris Dearman
d8a5a6f513 Use pthread_kill() in raise()
raise() should use pthread_kill() in a pthreads environment.
For bionic this means it should always be used.

Change-Id: Ic679272b664d2b8a7068b628fb83a9f7395c441f
2012-12-10 11:20:57 -08:00
Geremy Condra
28996f8006 am 6fcf1770: Merge "Added audit.h from the kernel."
* commit '6fcf1770e5829b8439b7e7ed7efb39ee5d425e23':
  Added audit.h from the kernel.
2012-12-07 14:32:21 -08:00
Geremy Condra
03e1ebbdd6 Added audit.h from the kernel.
Just followed the recipe in I1ca996541d05b0d5927ab828a6ce49c09877ea01

Change-Id: I5713d9ce5ff62e310a694ecfbe21cad6577bcb4d
2012-12-07 14:13:23 -08:00
Nick Kralevich
080210c16a am c8354f50: Merge "FORTIFY_SOURCE: remove memcpy overlap checks"
* commit 'c8354f501ef9a6d3430de27386bf0b42c30981d9':
  FORTIFY_SOURCE: remove memcpy overlap checks
2012-12-07 12:19:08 -08:00
Nick Kralevich
79e1a01e9e am 5dfdb701: Merge "FORTIFY_SOURCE: fix up previous commit"
* commit '5dfdb701292c53e74e319f277d808e598389c8e7':
  FORTIFY_SOURCE: fix up previous commit
2012-12-07 12:18:58 -08:00
Nick Kralevich
5787475390 FORTIFY_SOURCE: remove memcpy overlap checks
These checks haven't been as useful as I hoped, and it's
causing a false positive finding.  Remove the overlap
compile time checks.

Change-Id: I5d45dde10ae4663d728230d41fa904adf20acaea
2012-12-07 09:57:01 -08:00
Nick Kralevich
8b6fea59ac FORTIFY_SOURCE: fix up previous commit
I forgot two files in 326ea5413d.

Change-Id: I30430f65bfafad4274193fc5b973959eac0791a7
2012-12-05 15:26:54 -08:00
Nick Kralevich
8717c3db2f am 7a34ed2b: Merge "clean up FORTIFY_SOURCE handling."
* commit '7a34ed2bb36fcbe6967d8b670f4d70ada1dcef49':
  clean up FORTIFY_SOURCE handling.
2012-12-04 15:52:53 -08:00
Nick Kralevich
326ea5413d clean up FORTIFY_SOURCE handling.
Avoid duplicating huge chunks of code.

Change-Id: Id6145cdfce781c5ffba2abaaa79681d25a7ab28f
2012-12-04 15:27:30 -08:00
Nick Kralevich
ded6e3bfca am db79e827: Merge "FORTIFY_SOURCE: fortify strrchr"
* commit 'db79e827ebcb077ebaa6d6c96915c5bffba9a0ca':
  FORTIFY_SOURCE: fortify strrchr
2012-12-04 11:43:30 -08:00
Nick Kralevich
9a4d305340 FORTIFY_SOURCE: fortify strrchr
This change compliments 049e58369c

Change-Id: I27d015d70a520713c7472558a3c427f546d36ee4
2012-12-03 10:39:16 -08:00