Commit graph

13520 commits

Author SHA1 Message Date
Dan Albert
1af434cc02 Add a hint about using --no-isolate for GDB.
Change-Id: Ib9df5ed986a1c4082c9c7cd793a4d670be21ca66
2015-09-18 13:17:02 -07:00
Elliott Hughes
355f3d0c12 Merge "Fix mips FP abi bug in the linker." 2015-09-18 15:20:40 +00:00
Christopher Ferris
d9639559cc Merge "Add support for manually modified kernel headers." 2015-09-18 04:15:32 +00:00
Christopher Ferris
d12c332018 Add support for manually modified kernel headers.
This changes the scripts so that if some kernel files exists
in external/kernel-headers/modified, that they will be preferred
over the same files found in original. This is to support the case
where the kernel headers cannot be taken without some small modifications.

Included with this change, is a general cleanup of the python scripts.

This also modifies the generate uapi headers script to indicate if the
source of the modified headers has changed.

Change-Id: Id13523b244ced52a2ecd9f1399c43996dd8296fa
2015-09-17 21:02:52 -07:00
Dan Willemsen
353e7e5d11 Merge "Update Android.bp for setjmp cookies" 2015-09-17 22:34:35 +00:00
Dan Willemsen
35e91a10e0 Update Android.bp for setjmp cookies
Change-Id: I57245e4eedf9b8e1edc7de46208be5aa47c94b28
2015-09-17 15:28:45 -07:00
Douglas Leung
dccc40883a Fix mips FP abi bug in the linker.
Change-Id: I1ffab938eb06f9dc0963ee15bc10eca216618792
2015-09-17 15:17:06 -07:00
Josh Gao
57866a6dde Merge changes Iea8d03de,I2014f959
* changes:
  Implement setjmp cookies on x86_64.
  Implement setjmp cookies on x86.
2015-09-17 22:14:41 +00:00
Josh Gao
2342e643d4 Implement setjmp cookies on x86_64.
Bug: http://b/23942752
Change-Id: Iea8d03de1dd9ca5a128c072c94b10de3a8056348
2015-09-17 14:51:44 -07:00
Josh Gao
85c14fb086 Implement setjmp cookies on x86.
Bug: http://b/23942752
Change-Id: I2014f95989d0ab094b225234d98ccee477166c9d
2015-09-17 14:51:44 -07:00
Josh Gao
823cff847b Merge changes I81408ef0,Id0eb8d06
* changes:
  Implement setjmp cookies on AArch64.
  Implement setjmp cookies on ARM.
2015-09-17 21:09:23 +00:00
Josh Gao
54db0df8d6 Implement setjmp cookies on AArch64.
Bug: http://b/23942752
Change-Id: I81408ef0dd53010140b51e3083d357d3f2961112
2015-09-17 14:07:24 -07:00
Josh Gao
7fda8d2aa4 Implement setjmp cookies on ARM.
Reuse the top bits of _JB_SIGFLAG field previously used to store a
boolean to store a cookie that's validated by [sig]longjmp to make it
harder to use as a ROP gadget. Additionally, encrypt saved registers
with the cookie so that an attacker can't modify a register's value to
a specific value without knowing the cookie.

Bug: http://b/23942752
Change-Id: Id0eb8d06916e89d5d776bfcaa9458f8826717ba3
2015-09-17 14:07:24 -07:00
Dan Willemsen
90fc8e2487 Merge "Add Android.bp for libc/libm/libdl" 2015-09-17 19:31:07 +00:00
Yabin Cui
cbd0a15be8 Merge "Fix the way to get main thread stack start address." 2015-09-17 02:37:20 +00:00
Dan Willemsen
208ae17e5f Add Android.bp for libc/libm/libdl
Change-Id: I3537363849ba1244348996ff17c5ace1b95dbeee
2015-09-16 16:50:01 -07:00
Mor-sarid, Nitzan
569333293a Fix the way to get main thread stack start address.
For previous way to get the stack using the [stack] string from
/proc/self/task/<pid>/maps is not enough. On x86/x86_64, if an
alternative signal stack is used while a task switch happens,
the [stack] indicator may no longer be correct.

Instead, stack_start from /proc/self/stat which is always inside
the main stack, is used to find the main stack in /proc/self/maps.

Change-Id: Ieb010e71518b57560d541cd3b3563e5aa9660750
Signed-off-by: Nitzan Mor-sarid <nitzan.mor-sarid@intel.com>
Signed-off-by: Mingwei Shi <mingwei.shi@intel.com>
2015-09-16 11:45:13 -07:00
Elliott Hughes
14545d4ce3 Merge "Move several FreeBSD functions to OpenBSD." 2015-09-15 15:13:35 +00:00
Elliott Hughes
44c8ac8bd7 Merge "Sync with upstream NetBSD lib/libc/regex." 2015-09-15 15:05:21 +00:00
Elliott Hughes
26a8322972 Move several FreeBSD functions to OpenBSD.
There's no difference between the two BSDs for these functions, so let's go
with the majority.

Change-Id: Ic296f23153a48bed5ad152f5b31989c4e00e60bd
2015-09-14 19:01:58 -07:00
Elliott Hughes
71927a8237 Sync with upstream NetBSD lib/libc/regex.
Bug: http://b/22850181
Change-Id: I11a51a2031e68a953ccd5691da98c699c7d01904
2015-09-14 18:45:52 -07:00
Dan Albert
cd0ed2f174 Merge "CMSG_DATA should return an unsigned char*." 2015-09-11 17:39:12 +00:00
Dan Albert
268af26359 CMSG_DATA should return an unsigned char*.
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_socket.h.html
> CMSG_DATA(cmsg)
>    If the argument is a pointer to a cmsghdr structure, this macro
>    shall return an unsigned character pointer to the data array
>    associated with the cmsghdr structure.

Change-Id: I3f89ba19cbca4e6727abc65a2bbcd59267892ba8
2015-09-11 09:47:27 -07:00
Dan Albert
1c7b84ca00 Merge changes Ia1777fd4,I3998d88b
* changes:
  Unify unistd.h.
  Use attribute availability.
2015-09-08 20:24:39 +00:00
Dan Albert
af4713e6a5 Unify unistd.h.
Make unistd.h usable from all platform versions.

Also name all function parameters for Android Studio.

Bug: http://b/21952040
Change-Id: Ia1777fd4a6d4e37f25cc402c28fb78c003e481e3
2015-09-04 13:02:09 -07:00
Dan Albert
a6435a186d Use attribute availability.
Bug: http://b/21952040
Change-Id: I3998d88bc6076d60ae5cf7efd112817f80f17971
2015-09-04 13:02:03 -07:00
Elliott Hughes
ba9c170534 Merge "linker: don't pass dlextinfo to dependent loads" 2015-09-04 18:02:18 +00:00
Christopher Ferris
cb0d96e6a2 Merge "Only close stdin/stdout/stderr for debug malloc." 2015-09-04 01:09:11 +00:00
Christopher Ferris
efc134dba3 Only close stdin/stdout/stderr for debug malloc.
The debug malloc code unconditionally closes stdin/stdout/stderr,
which means that other atexit functions cannot use them. Only
close these if there is a debug malloc final function to call.

This doesn't appear to be a problem on most normal applications or the
atexit_exit bionic unit test would be failing. However, if you
enable stat dumping in jemalloc, nothing prints. Most likely trying
to add an atexit function from within libc is causing that atexit
to run after the debug malloc atexit function.

Change-Id: I963720d4ccaaa511e44af07a7461f17eb3f84e8e
2015-09-03 17:45:33 -07:00
Christopher Ferris
b423ffa6c2 Merge "Update to v3.18.21 kernel headers." 2015-09-03 17:52:47 +00:00
Christopher Ferris
915bf813ad Update to v3.18.21 kernel headers.
Change-Id: I4ade68d62981c7f6f361750cc811e8d84be9d5b9
2015-09-02 17:23:31 -07:00
Dmitriy Ivanov
edfc9f63a2 linker: don't pass dlextinfo to dependent loads
Don't pass the parent load's dlextinfo to dependent loads, since this
causes the linker to try to load the dependencies using the same
addresses/relro/fds/etc as the main library, which is never going to
work. This was how it worked before ae69a95 which broke this.

Bug: http://b/23742664
Bug: http://b/20948231
Bug: http://b/20841817
Change-Id: I340ebae1127666d5c6c6f9c6521b89fb93f15bdd
2015-09-02 16:32:02 -07:00
Elliott Hughes
cc25196662 Merge "Rename debug_stacktrace to debug_backtrace." 2015-09-02 03:44:31 +00:00
Elliott Hughes
32bf43f44a Rename debug_stacktrace to debug_backtrace.
All the functions say "backtrace", so it's weird that the filename
says "stacktrace".

Change-Id: I1c88a56c1f9adb1bae4615edc8af3e73db270a8c
2015-09-01 16:01:50 -07:00
Yabin Cui
32c85daa15 Merge "build bionic gtest runner on mac." 2015-09-01 22:58:23 +00:00
Yabin Cui
767fb1c5c6 build bionic gtest runner on mac.
Change-Id: I39a7e94b6662256646dfaeb8f9ecd5c03cd5fbc6
2015-09-01 15:40:38 -07:00
Elliott Hughes
a992004c9e Merge "Regenerate NOTICE files." 2015-08-29 04:00:21 +00:00
Elliott Hughes
cb58f528bf Merge "Sync with upstream FreeBSD libm." 2015-08-29 03:46:21 +00:00
Elliott Hughes
44ead71726 Regenerate NOTICE files.
Change-Id: Ia5c340220bb75e4e3166cc483ea77d19cfb08a71
2015-08-28 20:23:52 -07:00
Elliott Hughes
8cff2f95d8 Sync with upstream FreeBSD libm.
Change-Id: I97e9b23903f1d993d84825806065e85626007d31
2015-08-28 20:21:43 -07:00
Elliott Hughes
c2e634dd30 Merge "Fix regoff_t for LP32 and _FILE_OFFSET_BITS=64." 2015-08-27 23:17:43 +00:00
Dan Albert
46c7bc83ab Merge "Don't re-export libunwind_llvm." 2015-08-27 22:20:51 +00:00
Elliott Hughes
adf5c7237d Fix regoff_t for LP32 and _FILE_OFFSET_BITS=64.
bionic is built without _FILE_OFFSET_BITS=64, so internally regoff_t
was 32-bit on LP32, but code compiled with _FILE_OFFSET_BITS would
expect rm_so and rm_eo in struct regmatch_t to be 64-bit, leading to
confusion.

Bug: http://b/23566443
Change-Id: Iae92fa545104068e4f64ce1977f5ec616859638c
2015-08-27 14:48:32 -07:00
Chih-hung Hsieh
bfaee4bd6a Merge "Add test cases for __emutls_get_address." 2015-08-26 22:27:35 +00:00
Elliott Hughes
848808c660 Merge "Add preadv/pwritev." 2015-08-26 22:04:32 +00:00
Elliott Hughes
6f4594d5dc Add preadv/pwritev.
Bug: http://b/12612572
Change-Id: I38ff2684d69bd0fe3f21b1d371b88fa60d5421cb
2015-08-26 14:48:55 -07:00
Chih-Hung Hsieh
83380b5cf0 Add test cases for __emutls_get_address.
BUG: 22984770
Change-Id: I193c3612190260a08f3b3ad8b856c0ae8f94e03d
2015-08-26 13:10:14 -07:00
Christopher Ferris
d518a6d3bc Merge "Fix the 16 bit/32 bit instruction check for arm." 2015-08-26 19:39:36 +00:00
Elliott Hughes
629ed51712 Merge "Add strchrnul." 2015-08-26 18:27:05 +00:00
Christopher Ferris
b72c9d80ab Fix the 16 bit/32 bit instruction check for arm.
The current code only looks for a branch, instead make this more
general.

Change-Id: Ib442d6f2f04074e274b320ca0cf04734cc78e5d2
2015-08-26 10:55:09 -07:00