Commit Graph

5299 Commits

Author SHA1 Message Date
Brian Carlstrom
baebc6489a am 9ef1fbb6: Make mips_relocate_got tolerate a missing got
* commit '9ef1fbb644bf85fa211588853316efa4848547c6':
  Make mips_relocate_got tolerate a missing got
2013-08-21 10:27:06 -07:00
Brian Carlstrom
9ef1fbb644 Make mips_relocate_got tolerate a missing got
Bug: 10094803

(cherry picked from commit 7ee26878065abb494600595349ce58b2b2db3709)

Change-Id: I9fbb65d20011f2f625fde3b15ac8c6887dd03ae4
2013-08-21 10:20:53 -07:00
Christopher Ferris
1ebb44013c am 5f7ccea3: Update all debug directives.
* commit '5f7ccea3ffab05aeceecb85c821003cf580630d3':
  Update all debug directives.
2013-08-20 13:23:32 -07:00
Christopher Ferris
5f7ccea3ff Update all debug directives.
The libcorkscrew stack unwinder does not understand cfi directives,
so add .save directives so that it can function properly.

Also add the directives in to strcmp.S and fix a missing set of
directives in cortex-a9/memcpy_base.S.

Bug: 10345269

Change-Id: I043f493e0bb6c45bd3f4906fbe1d9f628815b015
2013-08-20 11:22:34 -07:00
Christopher Ferris
2389a26705 am c058154b: am c8039337: Merge "Change hard-coded temporary directory."
* commit 'c058154b747f295c98ad771d3dec4065749ee1a9':
  Change hard-coded temporary directory.
2013-08-16 12:25:58 -07:00
Elliott Hughes
e714eb157e am 6b6aaec8: am 4eacb341: Merge "Fix pthread_getcpuclockid."
* commit '6b6aaec892b1f256787fbbf106449f7d7e5888a2':
  Fix pthread_getcpuclockid.
2013-08-16 12:25:58 -07:00
Christopher Ferris
c058154b74 am c8039337: Merge "Change hard-coded temporary directory."
* commit 'c8039337e3ee608e23f8ca6e5ea123d938b08029':
  Change hard-coded temporary directory.
2013-08-16 12:21:55 -07:00
Elliott Hughes
6b6aaec892 am 4eacb341: Merge "Fix pthread_getcpuclockid."
* commit '4eacb34132b3162cc3716edfee8bad528d84c16f':
  Fix pthread_getcpuclockid.
2013-08-16 12:21:46 -07:00
Christopher Ferris
4ff3ec05df am 2e544837: Merge commit \'cf052994\' into manualmerge
* commit '2e544837e7acb479c3e4e22f53835e9740800af7':
  Create optimized __strcpy_chk/__strcat_chk.
2013-08-16 12:21:27 -07:00
Christopher Ferris
c8039337e3 Merge "Change hard-coded temporary directory." 2013-08-16 03:13:42 +00:00
Christopher Ferris
2e544837e7 Merge commit 'cf052994' into manualmerge
Fixing merge conflict and pulling in all of the changes that I stupidly
marked as not requiring a merge.

Conflicts:
    libc/arch-arm/arm.mk
    libc/arch-arm/cortex-a15/bionic/memcpy.S
    libc/arch-arm/cortex-a15/bionic/memset.S
    libc/arch-arm/cortex-a9/bionic/memcpy.S
    libc/arch-arm/cortex-a9/bionic/memset.S
    libc/arch-arm/cortex-a9/cortex-a9.mk
    libc/arch-arm/krait/bionic/memcpy.S
    libc/arch-arm/krait/bionic/memset.S
    libc/arch-arm/krait/krait.mk

Change-Id: I5da280dd8700681f118719c964a4d13446db51db
2013-08-15 19:27:08 -07:00
Elliott Hughes
4eacb34132 Merge "Fix pthread_getcpuclockid." 2013-08-15 22:34:58 +00:00
Jeff Hao
9b06cc3c1b Fix pthread_getcpuclockid.
clock_gettime was returning EINVAL for the values
produced by pthread_getcpuclockid.

Bug: 10346183
Change-Id: Iabe643d7d46110bb311a0367aa0fc737f653208e
2013-08-15 15:34:22 -07:00
Christopher Ferris
cf0529946a Merge "Create optimized __strcpy_chk/__strcat_chk." 2013-08-15 20:02:59 +00:00
Christopher Ferris
bd6dc6a886 Change hard-coded temporary directory.
The properties tests creates a temporary directory in /data/nativetest,
but this directory might not exist in all circumstances.
Change this to create the temporary directory in /data/local/tmp.

Change-Id: I812d3e24fcd084c5d74055c9faa95b1656f255bc
2013-08-15 12:54:40 -07:00
Christopher Ferris
b25b276031 am 11855d47: (-s ours) am c5cf5370: (-s ours) Merge "Optimize __memset_chk, __memcpy_chk. DO NOT MERGE."
* commit '11855d4789501956c546604a35d5e56da280040c':
  Optimize __memset_chk, __memcpy_chk. DO NOT MERGE.
2013-08-15 11:16:11 -07:00
Christopher Ferris
11855d4789 am c5cf5370: (-s ours) Merge "Optimize __memset_chk, __memcpy_chk. DO NOT MERGE."
* commit 'c5cf53701a5e04aeead70b1298bb38c51633e96d':
  Optimize __memset_chk, __memcpy_chk. DO NOT MERGE.
2013-08-15 11:14:56 -07:00
Christopher Ferris
5f45d583b0 Create optimized __strcpy_chk/__strcat_chk.
This change pulls the memcpy code out into a new file so that the
__strcpy_chk and __strcat_chk can use it with an include.

The new versions of the two chk functions uses assembly versions
of strlen and memcpy to implement this check. This allows near
parity with the assembly versions of strcpy/strcat. It also means that
as memcpy implementations get faster, so do the chk functions.

Other included changes:
- Change all of the assembly labels to local labels. The other labels
  confuse gdb and mess up backtracing.
- Add .cfi_startproc and .cfi_endproc directives so that gdb is not
  confused when falling through from one function to another.
- Change all functions to use cfi directives since they are more powerful.
- Move the memcpy_chk fail code outside of the memcpy function definition
  so that backtraces work properly.
- Preserve lr before the calls to __fortify_chk_fail so that the backtrace
  actually works.

Testing:

- Ran the bionic unit tests. Verified all error messages in logs are set
  correctly.
- Ran libc_test, replacing strcpy with __strcpy_chk and replacing
  strcat with __strcat_chk.
- Ran the debugger on nexus10, nexus4, and old nexus7. Verified that the
  backtrace is correct for all fortify check failures. Also verify that
  when falling through from __memcpy_chk to memcpy that the backtrace is
  still correct. Also verified the same for __memset_chk and bzero.
  Verified the two different paths in the cortex-a9 memset routine that
  save variables to the stack still show the backtrace properly.

Bug: 9293744

(cherry-picked from 2be91915dc)

Change-Id: Ia407b74d3287d0b6af0139a90b6eb3bfaebf2155
2013-08-15 11:13:39 -07:00
Christopher Ferris
c5cf53701a Merge "Optimize __memset_chk, __memcpy_chk. DO NOT MERGE." 2013-08-15 18:11:02 +00:00
Christopher Ferris
59a13c122e Optimize __memset_chk, __memcpy_chk. DO NOT MERGE.
This change creates assembler versions of __memcpy_chk/__memset_chk
that is implemented in the memcpy/memset assembler code. This change
avoids an extra call to memcpy/memset, instead allowing a simple fall
through to occur from the chk code into the body of the real
implementation.

Testing:

- Ran the libc_test on __memcpy_chk/__memset_chk on all nexus devices.
- Wrote a small test executable that has three calls to __memcpy_chk and
  three calls to __memset_chk. First call dest_len is length + 1. Second
  call dest_len is length. Third call dest_len is length - 1.
  Verified that the first two calls pass, and the third fails. Examined
  the logcat output on all nexus devices to verify that the fortify
  error message was sent properly.
- I benchmarked the new __memcpy_chk and __memset_chk on all systems. For
  __memcpy_chk and large copies, the savings is relatively small (about 1%).
  For small copies, the savings is large on cortex-a15/krait devices
  (between 5% to 30%).
  For cortex-a9 and small copies, the speed up is present, but relatively
  small (about 3% to 5%).
  For __memset_chk and large copies, the savings is also small (about 1%).
  However, all processors show larger speed-ups on small copies (about 30% to
  100%).

Bug: 9293744

Merge from internal master.

(cherry-picked from 7c860db074)

Change-Id: I916ad305e4001269460ca6ebd38aaa0be8ac7f52
2013-08-14 18:14:43 -07:00
Brian Carlstrom
26c755b256 am 0f14e8d5: am c85e0dbb: Merge "Add more information to error due to truncated Elf32_Ehdr"
* commit '0f14e8d5ea2cef28cfa0f39851ad55b134043e7d':
  Add more information to error due to truncated Elf32_Ehdr
2013-08-14 15:56:12 -07:00
Brian Carlstrom
0f14e8d5ea am c85e0dbb: Merge "Add more information to error due to truncated Elf32_Ehdr"
* commit 'c85e0dbb0b8d602f930cf7ae99901730c1c6a26a':
  Add more information to error due to truncated Elf32_Ehdr
2013-08-14 15:54:08 -07:00
Brian Carlstrom
c85e0dbb0b Merge "Add more information to error due to truncated Elf32_Ehdr" 2013-08-14 22:51:47 +00:00
Brian Carlstrom
0e79b91962 Add more information to error due to truncated Elf32_Ehdr
Change-Id: I24f30bd0c1120bcf85d77f5c4e69f0fefe9a2478
2013-08-14 15:47:46 -07:00
The Android Open Source Project
243ae9f461 Reconcile with klp-release - do not merge
Change-Id: I427a690248ab49aca987347b18f08ec0aabe38b9
2013-08-14 14:10:28 -07:00
Michael Wright
a71f676b47 am 7b197ea1: am 5e4a2f31: Merge "Update kernel input headers"
* commit '7b197ea1107055bcdf0a15f285495c5d70a3555c':
  Update kernel input headers
2013-08-14 13:48:18 -07:00
Michael Wright
7b197ea110 am 5e4a2f31: Merge "Update kernel input headers"
* commit '5e4a2f3174485678d461d6b0eeb11a5e9a32e531':
  Update kernel input headers
2013-08-14 13:47:03 -07:00
Michael Wright
5e4a2f3174 Merge "Update kernel input headers" 2013-08-14 20:45:19 +00:00
Michael Wright
55bdef8677 Update kernel input headers
To upstream SHA e1c85813f3832b909d1c4309b213bb0a52c79ba5

Change-Id: I72ee3d59c105bc0252b5ca0c49c569d12ec685d1
2013-08-14 13:30:20 -07:00
Christopher Ferris
3f78cb428e am f0c3d909: Create optimized __strcpy_chk/__strcat_chk.
* commit 'f0c3d909136167fdbe32b7815e5e1e02b4c35d62':
  Create optimized __strcpy_chk/__strcat_chk.
2013-08-14 07:58:50 -07:00
The Android Automerger
de19a0c55d merge in klp-release history after reset to klp-dev 2013-08-14 06:04:54 -07:00
Christopher Ferris
f0c3d90913 Create optimized __strcpy_chk/__strcat_chk.
This change pulls the memcpy code out into a new file so that the
__strcpy_chk and __strcat_chk can use it with an include.

The new versions of the two chk functions uses assembly versions
of strlen and memcpy to implement this check. This allows near
parity with the assembly versions of strcpy/strcat. It also means that
as memcpy implementations get faster, so do the chk functions.

Other included changes:
- Change all of the assembly labels to local labels. The other labels
  confuse gdb and mess up backtracing.
- Add .cfi_startproc and .cfi_endproc directives so that gdb is not
  confused when falling through from one function to another.
- Change all functions to use cfi directives since they are more powerful.
- Move the memcpy_chk fail code outside of the memcpy function definition
  so that backtraces work properly.
- Preserve lr before the calls to __fortify_chk_fail so that the backtrace
  actually works.

Testing:

- Ran the bionic unit tests. Verified all error messages in logs are set
  correctly.
- Ran libc_test, replacing strcpy with __strcpy_chk and replacing
  strcat with __strcat_chk.
- Ran the debugger on nexus10, nexus4, and old nexus7. Verified that the
  backtrace is correct for all fortify check failures. Also verify that
  when falling through from __memcpy_chk to memcpy that the backtrace is
  still correct. Also verified the same for __memset_chk and bzero.
  Verified the two different paths in the cortex-a9 memset routine that
  save variables to the stack still show the backtrace properly.

Bug: 9293744
Change-Id: Id5aec8c3cb14101d91bd125eaf3770c9c8aa3f57
(cherry picked from commit 2be91915dc)
2013-08-14 07:46:00 +00:00
Elliott Hughes
d861b6cbdf am 3912f90e: Make ctype.h a little less unhygienic.
* commit '3912f90e56780ef54c68c796ff6793f5692e7658':
  Make ctype.h a little less unhygienic.
2013-08-13 14:48:40 -07:00
Elliott Hughes
34cd499875 am fd61eccf: am ff9b7aa6: Merge "Make ctype.h a little less unhygienic."
* commit 'fd61eccf6b909ee6374ad43164f0e9bcd4b3547c':
  Make ctype.h a little less unhygienic.
2013-08-13 14:45:44 -07:00
Elliott Hughes
0d5745fe8a am 5951e846: Fix our missing abs/labs/llabs/imaxabs (and imaxdiv) symbols.
* commit '5951e84646553cdcba0c619f1424f2d934eeabb2':
  Fix our missing abs/labs/llabs/imaxabs (and imaxdiv) symbols.
2013-08-13 14:45:22 -07:00
Elliott Hughes
fd61eccf6b am ff9b7aa6: Merge "Make ctype.h a little less unhygienic."
* commit 'ff9b7aa695bd4860c0551b8899f2f26311174855':
  Make ctype.h a little less unhygienic.
2013-08-13 14:43:26 -07:00
Elliott Hughes
3912f90e56 Make ctype.h a little less unhygienic.
This caused trouble for stlport.

(cherry picked from commit 5e9b20f721)

Change-Id: I85d09c12c6de1e8502f83e0ef0f17747fdfe08a5
2013-08-13 14:42:43 -07:00
Elliott Hughes
5951e84646 Fix our missing abs/labs/llabs/imaxabs (and imaxdiv) symbols.
(cherry picked from commit aec2ffbc5a)

Change-Id: Ib61b52dc37e63493094a0a7af23bf89d4a9f0ce5
2013-08-13 14:41:07 -07:00
Elliott Hughes
ff9b7aa695 Merge "Make ctype.h a little less unhygienic." 2013-08-13 21:40:13 +00:00
Elliott Hughes
5e9b20f721 Make ctype.h a little less unhygienic.
This caused trouble for stlport.

Change-Id: Id40787c5a2b7a3a4e12fb557efe549778a01cbbd
2013-08-13 14:30:59 -07:00
Elliott Hughes
c1772397f9 am ff8dcd4a: am c933493a: Merge "Fix our missing abs/labs/llabs/imaxabs (and imaxdiv) symbols."
* commit 'ff8dcd4a1056257b454da71e1ea1371bb73d3a79':
  Fix our missing abs/labs/llabs/imaxabs (and imaxdiv) symbols.
2013-08-12 14:28:52 -07:00
Elliott Hughes
ff8dcd4a10 am c933493a: Merge "Fix our missing abs/labs/llabs/imaxabs (and imaxdiv) symbols."
* commit 'c933493ac28c40558f369d175da738ba601d8499':
  Fix our missing abs/labs/llabs/imaxabs (and imaxdiv) symbols.
2013-08-12 13:25:48 -07:00
Elliott Hughes
c933493ac2 Merge "Fix our missing abs/labs/llabs/imaxabs (and imaxdiv) symbols." 2013-08-12 20:23:34 +00:00
Elliott Hughes
aec2ffbc5a Fix our missing abs/labs/llabs/imaxabs (and imaxdiv) symbols.
Change-Id: I94c411c22634e43184445c82e7388e51fc46a8cc
2013-08-12 12:07:05 -07:00
The Android Automerger
f63a467cdd merge in klp-release history after reset to klp-dev 2013-08-12 06:00:44 -07:00
Elliott Hughes
2a5d2e98f9 am 9e9d1e01: resolved conflicts for merge of 86125aca to klp-dev
* commit '9e9d1e016faf12c4bc5454ce16e20f7db693a72d':
2013-08-08 18:10:55 -07:00
Elliott Hughes
9e9d1e016f resolved conflicts for merge of 86125aca to klp-dev
Change-Id: I78622ecbad27301b285193a085fa04374aa60033
2013-08-08 18:08:33 -07:00
Elliott Hughes
598f3e9c4a Merge "resolved conflicts for merge of dce94165 to klp-dev-plus-aosp" into klp-dev-plus-aosp 2013-08-09 01:05:49 +00:00
Elliott Hughes
3c3a64616a resolved conflicts for merge of dce94165 to klp-dev-plus-aosp
Change-Id: If5f34f4a31c6a1218751f472ac949c324117a948
2013-08-08 18:03:38 -07:00
Elliott Hughes
14ec1b5886 am ceb670cf: Merge branch \'klp-dev\' of https://googleplex-android.googlesource.com/_direct/platform/bionic into klp-dev
* commit 'ceb670cfc09e407a30627d5044f45d5e28e1be5d':
  Add futimens.
2013-08-08 17:59:33 -07:00