Commit Graph

10184 Commits

Author SHA1 Message Date
Elliott Hughes
a032277bb4 am 8a2ecf86: Merge "syscall(3)\'s return type should be long."
* commit '8a2ecf868feebaa39caddc6cdf9500b5385651f0':
  syscall(3)'s return type should be long.
2014-07-28 22:47:57 +00:00
Elliott Hughes
36666a4d51 am 8c66fd79: Merge "Use vsnprintf(3) in syslog(3)."
* commit '8c66fd798ed5b7cefe1568d9a000d01b69d29dd9':
  Use vsnprintf(3) in syslog(3).
2014-07-28 16:51:57 +00:00
Elliott Hughes
d201486cdb am b1b60c30: Use vsnprintf(3) in syslog(3).
* commit 'b1b60c30bf321c0fc02264b953b5c16c49d34457':
  Use vsnprintf(3) in syslog(3).
2014-07-28 16:47:40 +00:00
Elliott Hughes
b1b60c30bf Use vsnprintf(3) in syslog(3).
It seemed like a clever trick to use the internal log message formatting
code in syslog(3), but on reflection that means you can't (for example)
format floating point numbers. This patch switches us over to using good
old vsnprintf(3), even though that requires us to jump through a few hoops.

There's no obvious way to unit test this, so I wrote a little program and
ran that.

Bug: 14292866
Change-Id: I9c83500ba9cbb209b6f496067a91bf69434eeef5
2014-07-28 09:33:00 -07:00
Elliott Hughes
a09f2ebb40 am c1a6a725: Remove localtime_tz and strftime_tz.
* commit 'c1a6a7256026431a9ae49ef2a6139ea99410819b':
  Remove localtime_tz and strftime_tz.
2014-07-26 00:36:25 +00:00
Elliott Hughes
c1a6a72560 Remove localtime_tz and strftime_tz.
This also brings our copy of strftime.c much closer to upstream, though
we still have several GNU extensions and hacks to deal with Android32's
broken time_t.

Bug: 15765976

(cherry picked from commit 39d903aea9)

Change-Id: Ie278d3e976b7adc77bad5ce795dd4899cfbf3648
2014-07-25 17:28:52 -07:00
Elliott Hughes
e7e5e37ca4 am 1a918d9b: Merge "Remove localtime_tz and strftime_tz."
* commit '1a918d9be83013cdc8e194edf35b5295eba4ab1c':
  Remove localtime_tz and strftime_tz.
2014-07-25 23:26:24 +00:00
Elliott Hughes
d76f4a9b6f am 708c1120: Start hiding "private/bionic_time.h".
* commit '708c11205443cda14cfb21138d441106aa77a5f9':
  Start hiding "private/bionic_time.h".
2014-07-25 23:04:23 +00:00
Elliott Hughes
708c112054 Start hiding "private/bionic_time.h".
Bug: 15765976

(cherry picked from commit 905e6d58aa)

Change-Id: Ic7435308e8b521886f42ac7bf59531924921ea67
2014-07-25 15:24:57 -07:00
Elliott Hughes
4b4ee2fc1b am 50a9630c: Merge "Start hiding "private/bionic_time.h"."
* commit '50a9630cc26cbc1e38e3ddc589f04fa5cd91697b':
  Start hiding "private/bionic_time.h".
2014-07-25 22:21:42 +00:00
Dan Albert
779fdd7c0d am a4c14fda: Merge "en_US.UTF-8 is also supported."
* commit 'a4c14fda9176678cadb65fb53f503fda6668f8d1':
  en_US.UTF-8 is also supported.
2014-07-25 19:06:44 +00:00
Elliott Hughes
f4fd7cf138 am 123172ae: Merge "[MIPS] Fix atomic_is_lock_free test for mips32. On 32-bit MIPS, 64-bit atomic ops are achieved through locks. So allow the test to fail for atomic_intmax_t on 32-bit MIPS."
* commit '123172ae370fe51e2d1fc26fe0aafa095af52919':
  [MIPS] Fix atomic_is_lock_free test for mips32. On 32-bit MIPS, 64-bit atomic ops are achieved through locks. So allow the test to fail for atomic_intmax_t on 32-bit MIPS.
2014-07-25 01:03:46 +00:00
Dmitriy Ivanov
ceaec0d95c am dbf52ec3: Merge "Fix global variable initialization for linker"
* commit 'dbf52ec37b835973d8f357af2a16694c98894c4d':
  Fix global variable initialization for linker
2014-07-25 01:03:45 +00:00
Elliott Hughes
e7b2b02dec am d6f614a4: Merge "Implement twalk(3), add unit tests."
* commit 'd6f614a4e16b0fcf4a4fba748bf21fc0017d3619':
  Implement twalk(3), add unit tests.
2014-07-25 01:03:33 +00:00
Dmitriy Ivanov
a9b2185bc4 am 65549969: Fix global variable initialization for linker
* commit '65549969488bbce7f5d1b57714ba32c466943470':
  Fix global variable initialization for linker
2014-07-24 23:58:31 +00:00
Dmitriy Ivanov
6554996948 Fix global variable initialization for linker
Linker now calls init functions for itself.

(cherry picked from commit 4151ea73b7)

Change-Id: I3300fe22de8ad8466a5b1c2d551429769a42852d
2014-07-24 16:49:36 -07:00
Raghu Gandham
56152a8b81 am 34b258dd: [MIPS] Fix atomic_is_lock_free test for mips32. On 32-bit MIPS, 64-bit atomic ops are achieved through locks. So allow the test to fail for atomic_intmax_t on 32-bit MIPS.
* commit '34b258dd692951ab2236e134e5520367cda60125':
  [MIPS] Fix atomic_is_lock_free test for mips32. On 32-bit MIPS, 64-bit atomic ops are achieved through locks. So allow the test to fail for atomic_intmax_t on 32-bit MIPS.
2014-07-24 23:46:28 +00:00
Elliott Hughes
d00b2327c5 am b902641d: Implement twalk(3), add unit tests.
* commit 'b902641d7303d2ea24c10f6d6e7ff49e7ee75611':
  Implement twalk(3), add unit tests.
2014-07-24 23:36:16 +00:00
Duane Sand
eb1fbf1781 am 5ade7e3f: [MIPS] Drop soft-fp targets
* commit '5ade7e3f6bb43d419402aab2c7adca2173e2c584':
  [MIPS] Drop soft-fp targets
2014-07-24 23:33:44 +00:00
Raghu Gandham
34b258dd69 [MIPS] Fix atomic_is_lock_free test for mips32.
On 32-bit MIPS, 64-bit atomic ops are achieved through locks.
So allow the test to fail for atomic_intmax_t on 32-bit MIPS.

(cherry picked from commit f1837377d2)

Change-Id: I973d999c31c9ab89b5a7b709beff6486b93408f2
2014-07-24 16:22:02 -07:00
Elliott Hughes
b902641d73 Implement twalk(3), add unit tests.
I've also added insque(3) and remque(3) (from NetBSD because the OpenBSD
ones are currently broken for non-circular lists).

I've not added the three hash table functions that should be in this header
because they operate on a single global hash table and thus aren't likely
to be useful.

Bug: https://code.google.com/p/android/issues/detail?id=73719

(cherry picked from commit 3e424d0a24)

Change-Id: I5882a6b48c80fea8ac6b9c27e7b9de10b202b4ff
2014-07-24 15:14:06 -07:00
Elliott Hughes
d6f614a4e1 Merge "Implement twalk(3), add unit tests." 2014-07-24 22:07:52 +00:00
Elliott Hughes
3e424d0a24 Implement twalk(3), add unit tests.
I've also added insque(3) and remque(3) (from NetBSD because the OpenBSD
ones are currently broken for non-circular lists).

I've not added the three hash table functions that should be in this header
because they operate on a single global hash table and thus aren't likely
to be useful.

Bug: https://code.google.com/p/android/issues/detail?id=73719
Change-Id: I97397a7b921e2e860fd9c8032cafd9097380498a
2014-07-24 14:55:29 -07:00
Elliott Hughes
8a2ecf868f Merge "syscall(3)'s return type should be long." 2014-07-24 20:55:36 +00:00
Elliott Hughes
21972b61ec syscall(3)'s return type should be long.
This doesn't require us to change any of the syscall implementations
because (a) the LP32 ones have sizeof(int) == sizeof(long) anyway,
which is how we never noticed this bug before and (b) the LP64 ones
all use a 64-bit register for the result (and for the syscall number
too).

Bug: https://code.google.com/p/android/issues/detail?id=73952
Change-Id: I9866c3579a7a94de27bfbe80ad7a822c3183c7fb
2014-07-28 12:33:07 -07:00
Elliott Hughes
8c66fd798e Merge "Use vsnprintf(3) in syslog(3)." 2014-07-24 20:55:36 +00:00
Elliott Hughes
f1e83cc34a Use vsnprintf(3) in syslog(3).
It seemed like a clever trick to use the internal log message formatting
code in syslog(3), but on reflection that means you can't (for example)
format floating point numbers. This patch switches us over to using good
old vsnprintf(3), even though that requires us to jump through a few hoops.

There's no obvious way to unit test this, so I wrote a little program and
ran that.

(cherry-pick of b1b60c30bf321c0fc02264b953b5c16c49d34457.)

Bug: 14292866
Change-Id: I9c83500ba9cbb209b6f496067a91bf69434eeef5
2014-07-28 09:43:21 -07:00
Elliott Hughes
1a918d9be8 Merge "Remove localtime_tz and strftime_tz." 2014-07-24 20:55:36 +00:00
Elliott Hughes
39d903aea9 Remove localtime_tz and strftime_tz.
This also brings our copy of strftime.c much closer to upstream, though
we still have several GNU extensions and hacks to deal with Android32's
broken time_t.

Bug: 15765976
Change-Id: Ic9ef36e8acd3619504ecc4d73feec2b61fd4dfa1
2014-07-25 15:50:31 -07:00
Elliott Hughes
50a9630cc2 Merge "Start hiding "private/bionic_time.h"." 2014-07-24 20:55:36 +00:00
Elliott Hughes
905e6d58aa Start hiding "private/bionic_time.h".
Bug: 15765976
Change-Id: Ibd9cf07067ec8dffe9fda6c3d498d4ab90708220
2014-07-25 12:03:51 -07:00
Dan Albert
a4c14fda91 Merge "en_US.UTF-8 is also supported." 2014-07-24 20:55:36 +00:00
Dan Albert
1abb8bd21d en_US.UTF-8 is also supported.
Change-Id: Ic35fad3596dc5e24ee8ae35543a274a471f27bb2
2014-07-25 11:24:03 -07:00
Dmitriy Ivanov
dbf52ec37b Merge "Fix global variable initialization for linker" 2014-07-24 20:55:36 +00:00
Dmitriy Ivanov
4151ea73b7 Fix global variable initialization for linker
Linker now calls init functions for itself.

Change-Id: Ibd099812493041ac70f591e3f379ee742b4683b8
2014-07-24 15:33:25 -07:00
Duane Sand
3a11c10ad6 am c86950cb: [MIPSR6] setjmp supports mips32r6 and FP64A/FPXX reg models
* commit 'c86950cb3f50ead0c9a9d0366b870d6c6e1b91c8':
  [MIPSR6] setjmp supports mips32r6 and FP64A/FPXX reg models
2014-07-24 19:48:30 +00:00
Christopher Ferris
efbb837dc4 am bc74ecfa: HACK: Disable syslog going to android log.
* commit 'bc74ecfaf5de47056fd8a48db65c0e5aef892f0c':
  HACK: Disable syslog going to android log.
2014-07-24 19:47:58 +00:00
Nick Kralevich
9a2778a3a6 am 92d8b232: debuggerd: if PR_GET_DUMPABLE=0, don\'t ask for dumping
* commit '92d8b2320a4c3911452227f560ae4a39e83b0abf':
  debuggerd: if PR_GET_DUMPABLE=0, don't ask for dumping
2014-07-24 19:46:25 +00:00
Colin Cross
abca870989 am 49fbec6d: HACK: remove %m support from printf.
* commit '49fbec6d9aee62462a4acf3ba47788ca1e35be37':
  HACK: remove %m support from printf.
2014-07-24 19:23:45 +00:00
Elliott Hughes
c6f39339de am 8dbe3f0f: Merge "[MIPS] Drop soft-fp targets"
* commit '8dbe3f0f51f0cd26c22df82bdef9a2f8caea7ef6':
  [MIPS] Drop soft-fp targets
2014-07-24 18:29:55 +00:00
Duane Sand
5ade7e3f6b [MIPS] Drop soft-fp targets
(cherry picked from commit ba23bd0a40)

Change-Id: Ica09192c2760d38ceebc14e23a5d3ba94c20764c
2014-07-24 11:17:55 -07:00
Duane Sand
c86950cb3f [MIPSR6] setjmp supports mips32r6 and FP64A/FPXX reg models
Save and restore floating point registers via 64-bit
load/stores when possible.  Use assembler's builtin macro
ops to generate pairs of 32-bit load/stores on Mips I cpus.

Some cpus or FR modes have only 16 even-numbered dp fp regs.
This is exposed by _MIPS_FPSET, defined by existing compilers.

(cherry picked from commit dd37251c47)

Change-Id: Ibd43653701a363a77af85121d3cbd229d132a06a
2014-07-23 21:04:20 -07:00
Elliott Hughes
0caa27b148 am 7d22a451: Merge "[MIPSR6] setjmp supports mips32r6 and FP64A/FPXX reg models"
* commit '7d22a4519610f830178bbff32d961a2784354397':
  [MIPSR6] setjmp supports mips32r6 and FP64A/FPXX reg models
2014-07-24 04:03:03 +00:00
Christopher Ferris
bc74ecfaf5 HACK: Disable syslog going to android log.
Bug: 14292866

Change-Id: I3adc448dbacfeecd32508ddccf27be3aa653e466
2014-07-23 18:08:09 -07:00
Nick Kralevich
92d8b2320a debuggerd: if PR_GET_DUMPABLE=0, don't ask for dumping
PR_GET_DUMPABLE is used by an application to indicate whether or
not core dumps / PTRACE_ATTACH should work.

Security sensitive applications often set PR_SET_DUMPABLE to 0 to
disable core dumps, to avoid leaking sensitive memory to persistent
storage. Similarly, they also set PR_SET_DUMPABLE to zero to prevent
PTRACE_ATTACH from working, again to avoid leaking the contents
of sensitive memory.

Honor PR_GET_DUMPABLE when connecting to debuggerd. If an application
has said it doesn't want its memory dumped, then we shouldn't
ask debuggerd to dump memory on its behalf.

FORTIFY_SOURCE tests: Modify the fortify_source tests to set
PR_SET_DUMPABLE=0. This reduces the total runtime of
/data/nativetest/bionic-unit-tests/bionic-unit-tests32 from approx
53 seconds to 25 seconds. There's no need to connect to debuggerd
when running these tests.

Bug: 16513137

(cherry picked from commit be0e43b776)

Change-Id: I6e1a9bce564e94fc19893d639b15f38c549cabfa
2014-07-23 16:07:33 -07:00
Nick Kralevich
3363e16ac9 am f9650757: Merge "debuggerd: if PR_GET_DUMPABLE=0, don\'t ask for dumping"
* commit 'f9650757493060d950cc28c5a58acdcdd41f02e9':
  debuggerd: if PR_GET_DUMPABLE=0, don't ask for dumping
2014-07-23 23:00:01 +00:00
Elliott Hughes
123172ae37 Merge "[MIPS] Fix atomic_is_lock_free test for mips32. On 32-bit MIPS, 64-bit atomic ops are achieved through locks. So allow the test to fail for atomic_intmax_t on 32-bit MIPS." 2014-07-23 22:55:49 +00:00
Raghu Gandham
f1837377d2 [MIPS] Fix atomic_is_lock_free test for mips32.
On 32-bit MIPS, 64-bit atomic ops are achieved through locks.
So allow the test to fail for atomic_intmax_t on 32-bit MIPS.

Change-Id: I78e7807e50f899a0fea0d5b388d9ebb53228aaa0
2014-07-24 16:11:52 -07:00
Colin Cross
49fbec6d9a HACK: remove %m support from printf.
The change that added this support causes a cpu hard lock on one
device.  This code clearly isn't at fault, but disabling it to
unblock until we can find a real fix.

Bug: 16484311
Change-Id: I33834dc49d959ae403b10d2c7cad12ae2950f772
2014-07-23 14:56:20 -07:00
Elliott Hughes
aa8672cb6d am 4126c129: Fix belated review comments on syslog change.
* commit '4126c129613e27717c110626070c44ea7e3f29ce':
  Fix belated review comments on syslog change.
2014-07-23 20:20:33 +00:00