Commit Graph

15553 Commits

Author SHA1 Message Date
Josh Gao
91624eae9a am 57866a6d: Merge changes Iea8d03de,I2014f959
* commit '57866a6ddef66e9c331df4f20e6c39920aba2a99':
  Implement setjmp cookies on x86_64.
  Implement setjmp cookies on x86.
2015-09-17 22:22:33 +00: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
5c12a504cf am 9e3d8730: am 823cff84: Merge changes I81408ef0,Id0eb8d06
* commit '9e3d873036b581b9986f42cc40f2d43f057ed7f1':
  Implement setjmp cookies on AArch64.
  Implement setjmp cookies on ARM.
2015-09-17 21:22:32 +00:00
Josh Gao
9e3d873036 am 823cff84: Merge changes I81408ef0,Id0eb8d06
* commit '823cff847b3b202b235ddd84650338f07bc61511':
  Implement setjmp cookies on AArch64.
  Implement setjmp cookies on ARM.
2015-09-17 21:15:57 +00: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
c101cc20bf am 64ce4787: am 90fc8e24: Merge "Add Android.bp for libc/libm/libdl"
* commit '64ce4787e593a547dab41210b28bc74e19318820':
  Add Android.bp for libc/libm/libdl
2015-09-17 19:52:53 +00:00
Dan Willemsen
64ce4787e5 am 90fc8e24: Merge "Add Android.bp for libc/libm/libdl"
* commit '90fc8e24876412a816776d44bedc77e1f1888a13':
  Add Android.bp for libc/libm/libdl
2015-09-17 19:40:42 +00:00
Dan Willemsen
90fc8e2487 Merge "Add Android.bp for libc/libm/libdl" 2015-09-17 19:31:07 +00:00
Yabin Cui
a59905b80c am 72e678c8: am cbd0a15b: Merge "Fix the way to get main thread stack start address."
* commit '72e678c8a7f78a04dffc57a6b2add45aeee4d1ec':
  Fix the way to get main thread stack start address.
2015-09-17 02:50:56 +00:00
Yabin Cui
72e678c8a7 am cbd0a15b: Merge "Fix the way to get main thread stack start address."
* commit 'cbd0a15be881abb8ce1feb5b389da2f517a9a4c6':
  Fix the way to get main thread stack start address.
2015-09-17 02:42:52 +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
5278af69ac am bab1044d: am 14545d4c: Merge "Move several FreeBSD functions to OpenBSD."
* commit 'bab1044d27cc5b88809f2fc0e5be7e23f2ab6623':
  Move several FreeBSD functions to OpenBSD.
2015-09-15 15:25:18 +00:00
Elliott Hughes
bab1044d27 am 14545d4c: Merge "Move several FreeBSD functions to OpenBSD."
* commit '14545d4ce3dd446f20a14dcff37d60ff8d756f7a':
  Move several FreeBSD functions to OpenBSD.
2015-09-15 15:19:20 +00:00
Elliott Hughes
8abd365509 am 364dbb3c: am 44c8ac8b: Merge "Sync with upstream NetBSD lib/libc/regex."
* commit '364dbb3cf493b00e48d8f29e4a845e78f8139f4f':
  Sync with upstream NetBSD lib/libc/regex.
2015-09-15 15:18:56 +00:00
Elliott Hughes
14545d4ce3 Merge "Move several FreeBSD functions to OpenBSD." 2015-09-15 15:13:35 +00:00
Elliott Hughes
364dbb3cf4 am 44c8ac8b: Merge "Sync with upstream NetBSD lib/libc/regex."
* commit '44c8ac8bd7747d907720c63538625a4b95245234':
  Sync with upstream NetBSD lib/libc/regex.
2015-09-15 15:12:36 +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
a4b45b70f5 am a1a46a8e: am cd0ed2f1: Merge "CMSG_DATA should return an unsigned char*."
* commit 'a1a46a8e946d1fd1c50f44e7e23f462e179ddbb1':
  CMSG_DATA should return an unsigned char*.
2015-09-11 23:04:58 +00:00
Dan Albert
a1a46a8e94 am cd0ed2f1: Merge "CMSG_DATA should return an unsigned char*."
* commit 'cd0ed2f174d9015da5ae7206bc4c5190cd0bb51e':
  CMSG_DATA should return an unsigned char*.
2015-09-11 22:14:07 +00: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
b3c3fb5b59 am 32ec7498: am 1c7b84ca: Merge changes Ia1777fd4,I3998d88b
* commit '32ec74987344cedb5596e6da1891a9d54962f149':
  Unify unistd.h.
  Use attribute availability.
2015-09-08 20:38:46 +00:00
Dan Albert
32ec749873 am 1c7b84ca: Merge changes Ia1777fd4,I3998d88b
* commit '1c7b84ca0095e0dc4da8434e9e0c59cd2326f763':
  Unify unistd.h.
  Use attribute availability.
2015-09-08 20:32:37 +00: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
a775a41130 am edc73f62: am ba9c1705: Merge "linker: don\'t pass dlextinfo to dependent loads"
* commit 'edc73f6286bcd1f7d0278d25d4484bf23a0e53b2':
  linker: don't pass dlextinfo to dependent loads
2015-09-04 18:21:34 +00:00
Elliott Hughes
edc73f6286 am ba9c1705: Merge "linker: don\'t pass dlextinfo to dependent loads"
* commit 'ba9c17053456aed4452a349cf45c5960d9231f25':
  linker: don't pass dlextinfo to dependent loads
2015-09-04 18:12:33 +00:00
Elliott Hughes
ba9c170534 Merge "linker: don't pass dlextinfo to dependent loads" 2015-09-04 18:02:18 +00:00
Christopher Ferris
23ff8fc4ee am 2fe50aa3: am cb0d96e6: Merge "Only close stdin/stdout/stderr for debug malloc."
* commit '2fe50aa3806f2c367dddfc5ddedd1c636223b823':
  Only close stdin/stdout/stderr for debug malloc.
2015-09-04 01:31:18 +00:00
Christopher Ferris
2fe50aa380 am cb0d96e6: Merge "Only close stdin/stdout/stderr for debug malloc."
* commit 'cb0d96e6a218cc37eb0ab764740a8bf1ea385511':
  Only close stdin/stdout/stderr for debug malloc.
2015-09-04 01:17:48 +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
407dea47bd am 7bb544cc: am b423ffa6: Merge "Update to v3.18.21 kernel headers."
* commit '7bb544cc7c3d70af5f06dd5cf8b33e841b816ded':
  Update to v3.18.21 kernel headers.
2015-09-03 18:14:10 +00:00
Christopher Ferris
7bb544cc7c am b423ffa6: Merge "Update to v3.18.21 kernel headers."
* commit 'b423ffa6c27ade8485f1f061fd3775553e9bb457':
  Update to v3.18.21 kernel headers.
2015-09-03 18:00:09 +00: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
eb457e212e am 67c6da80: am cc251966: Merge "Rename debug_stacktrace to debug_backtrace."
* commit '67c6da80bb3b6b4febc783db04ce19cdeb187092':
  Rename debug_stacktrace to debug_backtrace.
2015-09-02 04:00:02 +00:00
Elliott Hughes
67c6da80bb am cc251966: Merge "Rename debug_stacktrace to debug_backtrace."
* commit 'cc25196662cab824117e7cb79e435bd3aaf37dcc':
  Rename debug_stacktrace to debug_backtrace.
2015-09-02 03:52:24 +00:00
Elliott Hughes
cc25196662 Merge "Rename debug_stacktrace to debug_backtrace." 2015-09-02 03:44:31 +00:00