Commit Graph

5348 Commits

Author SHA1 Message Date
Robert Greenwalt
8b1cc6ceb8 am e5911f31: resolved conflicts for merge of 937c3742 to klp-dev-plus-aosp
* commit 'e5911f31286179c1e4dc9bb2691e5098c6e3d20e':
  Change how DNS resolver handle no default iface
2013-08-24 08:25:39 -07:00
Robert Greenwalt
e5911f3128 resolved conflicts for merge of 937c3742 to klp-dev-plus-aosp
Change-Id: I4c0ad42ea3802cd232c80e5589af8a8e25f88a60
2013-08-24 08:21:41 -07:00
Robert Greenwalt
937c374225 am c6135ba7: Merge "Change how DNS resolver handle no default iface"
* commit 'c6135ba76db027d85751f84bf648a865609c0e1b':
  Change how DNS resolver handle no default iface
2013-08-24 05:40:18 -07:00
Robert Greenwalt
c6135ba76d Merge "Change how DNS resolver handle no default iface" 2013-08-24 12:35:08 +00:00
Robert Greenwalt
a31ddef36d Change how DNS resolver handle no default iface
We used to just try any iface we'd been told about as a
fallback, but that will end up mistakenly using a secondary
network's dns when we really don't have a default connection.

It also messed up our detection of whether we were doing the
lookup on the default or not (we'd get back our secondary net
iface as the default, do the compare and think we were on default).

Remove the lies and let dns fail if we don't have an iface for it.

bug:10132565
Change-Id: I5f0f2abacaaaaf23c5292b20fba9d8dcb6fb10c5
2013-08-22 21:05:49 -07:00
Elliott Hughes
aa3defdecb am 9fd0cf81: am 345eb225: Apply upstream commit 943a6621866e9d6e654f5cfe1494378c1fb8957a.
* commit '9fd0cf81702d083b39a839b07ad75d2ff0ac277d':
  Apply upstream commit 943a6621866e9d6e654f5cfe1494378c1fb8957a.
2013-08-22 14:36:54 -07:00
Elliott Hughes
b58a14df12 am 2d38fced: am 7003a14b: am 41f08abf: Merge "Apply upstream commit 943a6621866e9d6e654f5cfe1494378c1fb8957a."
* commit '2d38fced00a873da8077a5193b2d5ef8603dcc66':
  Apply upstream commit 943a6621866e9d6e654f5cfe1494378c1fb8957a.
2013-08-22 14:36:54 -07:00
Elliott Hughes
9fd0cf8170 am 345eb225: Apply upstream commit 943a6621866e9d6e654f5cfe1494378c1fb8957a.
* commit '345eb225ae2e87e36354be5f1e62301179482804':
  Apply upstream commit 943a6621866e9d6e654f5cfe1494378c1fb8957a.
2013-08-22 14:34:14 -07:00
Elliott Hughes
2d38fced00 am 7003a14b: am 41f08abf: Merge "Apply upstream commit 943a6621866e9d6e654f5cfe1494378c1fb8957a."
* commit '7003a14b536bad08476d2f2005ebcc0490b77b24':
  Apply upstream commit 943a6621866e9d6e654f5cfe1494378c1fb8957a.
2013-08-22 14:32:44 -07:00
Elliott Hughes
7003a14b53 am 41f08abf: Merge "Apply upstream commit 943a6621866e9d6e654f5cfe1494378c1fb8957a."
* commit '41f08abf3d020ad8b48ff4151f8c623a119790e0':
  Apply upstream commit 943a6621866e9d6e654f5cfe1494378c1fb8957a.
2013-08-22 14:30:42 -07:00
Elliott Hughes
345eb225ae Apply upstream commit 943a6621866e9d6e654f5cfe1494378c1fb8957a.
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Thu Aug 22 12:47:51 2013 -0700

    * localtime.c: Fix another integer overflow bug in mktime.

    (time2sub): Avoid undefined behavior on time_t overflow.
    Reported by Elliott Hughes in
    <http://mm.icann.org/pipermail/tz/2013-August/019580.html>.

Bug: 10310929

(cherry picked from commit 713fe6463e)

Change-Id: I9ec79fd8d825e6b9e8bb5af549dbfc2182346c05
2013-08-22 14:29:07 -07:00
Elliott Hughes
41f08abf3d Merge "Apply upstream commit 943a6621866e9d6e654f5cfe1494378c1fb8957a." 2013-08-22 21:27:55 +00:00
Elliott Hughes
713fe6463e Apply upstream commit 943a6621866e9d6e654f5cfe1494378c1fb8957a.
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Thu Aug 22 12:47:51 2013 -0700

    * localtime.c: Fix another integer overflow bug in mktime.

    (time2sub): Avoid undefined behavior on time_t overflow.
    Reported by Elliott Hughes in
    <http://mm.icann.org/pipermail/tz/2013-August/019580.html>.

Bug: 10310929
Change-Id: I3bf26f1f91371552e0a3828457d27e22af55acb2
2013-08-22 14:18:04 -07:00
Elliott Hughes
51edfd4701 am 5cf93f8d: am f0c10a4a: Work around tzcode\'s reliance on signed overflow.
* commit '5cf93f8d91be8e7e1654d7eee5966d6da5d6fe85':
  Work around tzcode's reliance on signed overflow.
2013-08-22 12:39:55 -07:00
Elliott Hughes
5cf93f8d91 am f0c10a4a: Work around tzcode\'s reliance on signed overflow.
* commit 'f0c10a4a16c74f5099cf6b272c0a2f11f454e63c':
  Work around tzcode's reliance on signed overflow.
2013-08-22 12:36:34 -07:00
Elliott Hughes
617368d07d am 6b5eb313: am e5ac43e1: am c44205cf: Merge "Work around tzcode\'s reliance on signed overflow."
* commit '6b5eb3134adb3d08c0803228ce79d3a5b14d4fac':
  Work around tzcode's reliance on signed overflow.
2013-08-22 12:30:08 -07:00
Elliott Hughes
6b5eb3134a am e5ac43e1: am c44205cf: Merge "Work around tzcode\'s reliance on signed overflow."
* commit 'e5ac43e19afe270c2a70e4fb5d02b4cf056d50d7':
  Work around tzcode's reliance on signed overflow.
2013-08-22 12:27:52 -07:00
Elliott Hughes
e5ac43e19a am c44205cf: Merge "Work around tzcode\'s reliance on signed overflow."
* commit 'c44205cf717fc8ab8ccaf3631032fa236ba61a86':
  Work around tzcode's reliance on signed overflow.
2013-08-22 12:25:10 -07:00
Elliott Hughes
f0c10a4a16 Work around tzcode's reliance on signed overflow.
I've mailed the tz list about this, and will switch to whatever upstream
fix comes along as soon as it's available.

Bug: 10310929

(cherry picked from commit 7843d44a59)

Change-Id: I205e2440703444c50cecd91d3458d33613ddbc59
2013-08-22 12:23:47 -07:00
Elliott Hughes
c44205cf71 Merge "Work around tzcode's reliance on signed overflow." 2013-08-22 19:22:16 +00:00
Elliott Hughes
7843d44a59 Work around tzcode's reliance on signed overflow.
I've mailed the tz list about this, and will switch to whatever upstream
fix comes along as soon as it's available.

Bug: 10310929
Change-Id: I36bf3fcf11f5ac9b88137597bac3487a7bb81b0f
2013-08-22 12:21:18 -07:00
Brian Carlstrom
8718496e46 am 91df2dd3: am b6cd9cec: am bb34907f: Merge "Make mips_relocate_got tolerate a missing got"
* commit '91df2dd346b1adad48249dc984e102517bd3e2fb':
  Make mips_relocate_got tolerate a missing got
2013-08-21 10:33:06 -07:00
Brian Carlstrom
1714e372df am baebc648: am 9ef1fbb6: Make mips_relocate_got tolerate a missing got
* commit 'baebc6489a2a18a1a406ddea2fd5d228229cb532':
  Make mips_relocate_got tolerate a missing got
2013-08-21 10:33:05 -07:00
Brian Carlstrom
91df2dd346 am b6cd9cec: am bb34907f: Merge "Make mips_relocate_got tolerate a missing got"
* commit 'b6cd9cecc818fd5303e8c664fcbc5b408883c185':
  Make mips_relocate_got tolerate a missing got
2013-08-21 10:30:24 -07:00
Brian Carlstrom
b6cd9cecc8 am bb34907f: Merge "Make mips_relocate_got tolerate a missing got"
* commit 'bb34907ff5f60cf1600e83ea1bb4a6c26da6854e':
  Make mips_relocate_got tolerate a missing got
2013-08-21 10:28:51 -07:00
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
bb34907ff5 Merge "Make mips_relocate_got tolerate a missing got" 2013-08-21 17:25:48 +00: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
Brian Carlstrom
87c358524e Make mips_relocate_got tolerate a missing got
Bug: 10094803

(cherry picked from commit 7ee26878065abb494600595349ce58b2b2db3709)

Change-Id: Ib15bccecaee421dc463d46a3956b054051708759
2013-08-21 10:20:13 -07:00
Christopher Ferris
ad73d4d9de am 1ebb4401: am 5f7ccea3: Update all debug directives.
* commit '1ebb44013c4d585ca720f391641351eab4bb832f':
  Update all debug directives.
2013-08-20 13:25:50 -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
c3867e1fb7 am 2389a267: am c058154b: am c8039337: Merge "Change hard-coded temporary directory."
* commit '2389a26705a600e69c8c0b24a02bc05522bc68d1':
  Change hard-coded temporary directory.
2013-08-16 12:29:43 -07:00
Elliott Hughes
f2046ab3f2 am e714eb15: am 6b6aaec8: am 4eacb341: Merge "Fix pthread_getcpuclockid."
* commit 'e714eb157ea92f3166b6292ed54138f3e092d5da':
  Fix pthread_getcpuclockid.
2013-08-16 12:29:43 -07:00
Christopher Ferris
831b91eab8 am 4ff3ec05: am 2e544837: Merge commit \'cf052994\' into manualmerge
* commit '4ff3ec05dfbec3029b5656868b643f812bec2853':
  Create optimized __strcpy_chk/__strcat_chk.
2013-08-16 12:26:03 -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
d48e0bd084 am b25b2760: (-s ours) am 11855d47: (-s ours) am c5cf5370: (-s ours) Merge "Optimize __memset_chk, __memcpy_chk. DO NOT MERGE."
* commit 'b25b2760313d1abd123bf99a3c449600c8c76731':
  Optimize __memset_chk, __memcpy_chk. DO NOT MERGE.
2013-08-15 11:19:52 -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