Commit Graph

10211 Commits

Author SHA1 Message Date
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
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
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
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
Elliott Hughes
0200a28583 am f9bfc2ff: Merge "Fix belated review comments on syslog change."
* commit 'f9bfc2ff8eb5db99a106a8a384498165361291ce':
  Fix belated review comments on syslog change.
2014-07-23 20:18:59 +00:00
Elliott Hughes
4126c12961 Fix belated review comments on syslog change.
Bug: 14292866

(cherry picked from commit afe6360627)

Change-Id: I8e3cc6b37b2539e51a27261ffb5d6e58266ce11d
2014-07-23 13:11:15 -07:00
Elliott Hughes
5e1183c216 am 467e49be: Merge "Fix generate-NOTICE to cope better with BSD __COPYRIGHT macros."
* commit '467e49be70231f55bd7ba908407b4413294d3bfc':
  Fix generate-NOTICE to cope better with BSD __COPYRIGHT macros.
2014-07-23 19:02:16 +00:00
Nick Kralevich
f965075749 Merge "debuggerd: if PR_GET_DUMPABLE=0, don't ask for dumping" 2014-07-23 18:51:55 +00:00
Nick Kralevich
be0e43b776 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
Change-Id: Idc7857b089f3545758f4d9b436b783d580fb653f
2014-07-23 15:48:49 -07:00
Elliott Hughes
7d22a45196 Merge "[MIPSR6] setjmp supports mips32r6 and FP64A/FPXX reg models" 2014-07-23 18:45:08 +00:00
Duane Sand
dd37251c47 [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.

Change-Id: I7f617a3ffea8da41c402ef3a68ab32c91d3d7622
2014-07-23 13:57:30 -07:00
Elliott Hughes
f9bfc2ff8e Merge "Fix belated review comments on syslog change." 2014-07-23 18:45:08 +00:00
Elliott Hughes
e34ce3741f am 2aa142ff: Fix generate-NOTICE to cope better with BSD __COPYRIGHT macros.
* commit '2aa142ffb20337e60f81642bed1c11d24a3756b1':
  Fix generate-NOTICE to cope better with BSD __COPYRIGHT macros.
2014-07-23 18:42:30 +00:00
Elliott Hughes
afe6360627 Fix belated review comments on syslog change.
Bug: 14292866
Change-Id: I3cd92084cb55b5673f6ba62d51952941b79deb51
2014-07-23 11:38:38 -07:00
Elliott Hughes
2aa142ffb2 Fix generate-NOTICE to cope better with BSD __COPYRIGHT macros.
(cherry picked from commit 5d2f86f363)

Change-Id: Iddf22c8d9ff7a4d1205d37bb58c6235af681d795
2014-07-23 11:36:21 -07:00
Dmitriy Ivanov
337c0cefdc Merge "Fix 'adb shell /system/bin/linker' crash" 2014-07-23 17:53:27 +00:00
Dmitriy Ivanov
efe13832dc Fix 'adb shell /system/bin/linker' crash
Bug: https://code.google.com/p/android/issues/detail?id=63174
Change-Id: I072290ea11109c07f277ad3dec7f44fcb7bf6aa6
2014-07-28 16:29:52 -07:00
Elliott Hughes
8dbe3f0f51 Merge "[MIPS] Drop soft-fp targets" 2014-07-23 17:53:27 +00:00
Duane Sand
ba23bd0a40 [MIPS] Drop soft-fp targets
Change-Id: I583bf8242d3034ebfc48548499cdb3316094c8e3
2014-07-24 18:04:21 +00:00
Elliott Hughes
66544dd136 am 4ac83fad: Fix a couple of bugs in generate-NOTICE and regenerate the NOTICE files.
* commit '4ac83fad3cdc486c00199eef9ea2a95d354839c4':
  Fix a couple of bugs in generate-NOTICE and regenerate the NOTICE files.
2014-07-23 16:50:57 +00:00
Elliott Hughes
5cd06abdcf am ea42a6ca: Merge "Fix a couple of bugs in generate-NOTICE and regenerate the NOTICE files."
* commit 'ea42a6caea9d5cb5a92939ba0696856306b1d56b':
  Fix a couple of bugs in generate-NOTICE and regenerate the NOTICE files.
2014-07-23 16:42:30 +00:00
Elliott Hughes
4ac83fad3c Fix a couple of bugs in generate-NOTICE and regenerate the NOTICE files.
(cherry picked from commit 3758a244cf)

Change-Id: I6ffb83b4a7b7746b095205c664cf025a72ead179
2014-07-23 09:39:40 -07:00
Elliott Hughes
be0ee5a626 am 3ff6d95a: Remove the unused swab.S.
* commit '3ff6d95a9b26154c94b5cf130649cf99eb6a4010':
  Remove the unused swab.S.
2014-07-23 03:51:55 +00:00
Elliott Hughes
3ff6d95a9b Remove the unused swab.S.
(cherry picked from commit ca70453e84)

Change-Id: I4dc13de0bdeb7abb3bd47b0397546ad7d1f11d49
2014-07-22 20:43:55 -07:00
Elliott Hughes
ad87093f04 am e26ac7f7: Merge "Remove the unused swab.S."
* commit 'e26ac7f776c4011d17e7609efafa116ac4db25ff':
  Remove the unused swab.S.
2014-07-23 03:33:41 +00:00
Duane Sand
f6ab6bfeb0 am 5d7775c6: [MIPS] Allow united mipsel and mips64el gcc toolchain
* commit '5d7775c6dfa8f9b2ae313c9493525d54a2d04b38':
  [MIPS] Allow united mipsel and mips64el gcc toolchain
2014-07-23 02:48:41 +00:00
Elliott Hughes
b5031b5d6b am 79b5a396: Merge "[MIPS] Allow united mipsel and mips64el gcc toolchain"
* commit '79b5a396178e798af4ba9b327b884ae014f15bb2':
  [MIPS] Allow united mipsel and mips64el gcc toolchain
2014-07-23 02:44:48 +00:00
Duane Sand
5d7775c6df [MIPS] Allow united mipsel and mips64el gcc toolchain
Explicitly tell 32-bit links that they are doing 32-bit links.
This is needed when using united 32-bit and 64-bit toolchains.
This is harmless when using older separate 32-only toolchains.

(cherry picked from commit f541650828)

Change-Id: I8df0ee7d36c6409458e18bea4e0e8b132edf77dc
2014-07-22 19:41:49 -07:00
Sreeram Ramachandran
1a1d0b7abf am 2582f02a: Cleanup: Delete dead code.
* commit '2582f02a01cd56c56a4e6c9de4444a6ec937cc37':
  Cleanup: Delete dead code.
2014-07-23 00:10:16 +00:00