OSDN Git Service
Rom Lemarchand [Tue, 23 Jul 2013 20:49:46 +0000 (20:49 +0000)]
Merge "Restore dlmalloc mmap threshold to 64k"
Rom Lemarchand [Tue, 23 Jul 2013 18:30:52 +0000 (11:30 -0700)]
Restore dlmalloc mmap threshold to 64k
Restoring DEFAULT_MMAP_THRESHOLD to 64k, the way it was before
999089181ef60bb67e1a49f2cf6f4ec608a7caf8.
This forces allocations in the 64k-256k range to be mmaped.
Change-Id: Iace55ed638edd272b3e94fa6cd2ddd349042be84
Signed-off-by: Rom Lemarchand <romlem@google.com>
Elliott Hughes [Sat, 20 Jul 2013 00:10:31 +0000 (00:10 +0000)]
Merge "Move stuff only needed by pthread-timers.c into pthread-timers.c."
Elliott Hughes [Fri, 19 Jul 2013 23:42:27 +0000 (16:42 -0700)]
Move stuff only needed by pthread-timers.c into pthread-timers.c.
Change-Id: I4915b3fff9c4f5a36b4f51027fb22019c11607b0
Elliott Hughes [Fri, 19 Jul 2013 23:35:29 +0000 (23:35 +0000)]
Merge "Upgrade mktemp.c to the current upstream version."
Elliott Hughes [Fri, 19 Jul 2013 22:20:31 +0000 (15:20 -0700)]
Upgrade mktemp.c to the current upstream version.
Yet another archaic relic containing bugs that had been fixed years before the
Android project even started...
Bug:
9935113
Change-Id: I3c9d019a216efd609ee568cf8c70bc360f357403
Elliott Hughes [Thu, 18 Jul 2013 00:39:35 +0000 (00:39 +0000)]
Merge "Remove some non-unused makefile generality."
Elliott Hughes [Thu, 18 Jul 2013 00:38:45 +0000 (17:38 -0700)]
Remove some non-unused makefile generality.
MIPS uses .c files like ARM and x86 now.
Change-Id: Ie580647e385121c380316c443ec199dabf657ff8
Elliott Hughes [Thu, 18 Jul 2013 00:34:22 +0000 (00:34 +0000)]
Merge "[MIPS] Rewrite MIPS crtbegin* as C files."
Pete Delaney [Wed, 17 Jul 2013 21:23:29 +0000 (14:23 -0700)]
[MIPS] Rewrite MIPS crtbegin* as C files.
This updates the MIPS arch to be much more in
sync with the commit Nick Kralevich made last
June; see
9d40326830c2bd407427889c554adeb915ee6b4a.
Rewrite
crtbegin.S -> crtbegin.c
crtbegin_so.S -> crtbegin_so.c
__dso_handle.S -> __dso_handle.c
__dso_handle_so.S -> __dso_handle_so.c
atexit.S -> atexit.c
Previously __do_global_dtors_aux was in the tasks
__FINI_ARRAY__ linked with crtbegin.S and it now being
removed as there is no need to call a destructor just
before terminating a process.
Shared libraries, on the other hand, are linked with
crtbegin_so.c and have a hidden destructor declared
to allow the bionic linker to call __on_dlclose().
Change-Id: Ieb4da5199b54573de05743990e309db381a11cb8
Signed-off-by: Pete Delaney <piet.delaney@imgtec.com>
Signed-off-by: Chao-Ying Fu <chao-ying.fu@imgtec.com>
Signed-off-by: Chris Dearman <chris.dearman@imgtec.com>
Elliott Hughes [Wed, 17 Jul 2013 20:48:25 +0000 (20:48 +0000)]
Merge "Improve stack overflow diagnostics (take 2)."
Elliott Hughes [Wed, 17 Jul 2013 20:33:19 +0000 (13:33 -0700)]
Improve stack overflow diagnostics (take 2).
This reverts commits
eb1b07469f2b5a392dc1bfd8adc211aea8c72bc5 and
d14dc3b87fbf80553f1cafa453816b7f11366627, and fixes the bug where
we were calling mmap (which might cause errno to be set) before
__set_tls (which is required to implement errno).
Bug:
8557703
Change-Id: I2c36d00240c56e156e1bb430d8c22a73a068b70c
Elliott Hughes [Wed, 17 Jul 2013 20:20:41 +0000 (20:20 +0000)]
Merge "Prevent the madvise(MADV_MERGEABLE) mmap hack from affecting errno."
Elliott Hughes [Wed, 17 Jul 2013 20:12:26 +0000 (13:12 -0700)]
Prevent the madvise(MADV_MERGEABLE) mmap hack from affecting errno.
Bug:
9889616
Change-Id: I4a7323e0ae5aeb5cbe0da1b2bc7501d83b3a2aa4
Elliott Hughes [Wed, 17 Jul 2013 20:02:11 +0000 (20:02 +0000)]
Merge "mmap: Reinstate passing MADV_MERGEABLE on private anonymous maps"
Rom Lemarchand [Sat, 18 May 2013 00:08:41 +0000 (17:08 -0700)]
mmap: Reinstate passing MADV_MERGEABLE on private anonymous maps
Reinstate mmap calling madvise(MADV_MERGEABLE) removed in
635df850e5037be5093f64a87ec2e0a23bf7a50b
(cherry-pick of
c702a904679a36511bead29c51eeac15d81f4fd2.)
Change-Id: I18803fb54701b2b3d8186dff5c678211ee3efa1f
Guang Zhu [Wed, 17 Jul 2013 03:17:19 +0000 (03:17 +0000)]
Merge "Revert "Improve stack overflow diagnostics.""
Guang Zhu [Wed, 17 Jul 2013 03:17:05 +0000 (03:17 +0000)]
Revert "Improve stack overflow diagnostics."
This reverts commit
aa754dca90487356cabf07ade0e8d88c2630b784.
Change-Id: Ifa76eee31f7f44075eb3a48554315b2693062f44
Guang Zhu [Wed, 17 Jul 2013 03:16:51 +0000 (03:16 +0000)]
Merge "Revert "Clean up our alternate signal stacks.""
Guang Zhu [Wed, 17 Jul 2013 03:16:04 +0000 (03:16 +0000)]
Revert "Clean up our alternate signal stacks."
This reverts commit
5cf87951abd23b0b3ebf159e8aa06b02e39527ca.
Change-Id: Idd6ca7d80a018755da3bd315d91193723ce7f3bf
Christopher Ferris [Wed, 17 Jul 2013 00:19:42 +0000 (00:19 +0000)]
Merge "Fix assembler errors in generic arm strlen.c."
Christopher Ferris [Wed, 17 Jul 2013 00:19:29 +0000 (00:19 +0000)]
Merge "Add new optimized strlen for arm."
Christopher Ferris [Mon, 15 Jul 2013 20:55:45 +0000 (13:55 -0700)]
Fix assembler errors in generic arm strlen.c.
Tested using a static version of the strlen libc_test program
on a nexus7 that uses the generic code.
Merge from internal master.
(cherry-picked from
d8d10a8994472e40d19301b7087806630877b4d5)
Change-Id: I88f7dc01dc5b5c3ac2d5580d92153bc1bc36c564
Christopher Ferris [Wed, 10 Jul 2013 21:31:03 +0000 (14:31 -0700)]
Add new optimized strlen for arm.
This optimized version is primarily targeted at cortex-a15.
Tested on all nexus devices using the system/extras/libc_test strlen test.
Tested alignments from 1 to 32 that are powers of 2.
Tested that strlen does not cross page boundaries at all alignments.
Speed improvements listed below:
cortex-a15
- Sizes >= 32 bytes, ~75% improvement.
- Sizes >= 1024 bytes, ~250% improvement.
cortex-a9
- Sizes >= 32 bytes, ~75% improvement.
- Sizes >= 1024 bytes, ~85% improvement.
krait
- Sizes >= 32 bytes, ~95% improvement.
- Sizes >= 1024 bytes, ~160% improvement.
Merge from internal master.
(cherry-picked from
2fc071797743b88a9a47427d46baed7c7b24f4d2)
Change-Id: I1ceceb4e745fd68e9d946f96d1d42e0cdaff6ccf
Elliott Hughes [Tue, 16 Jul 2013 22:47:41 +0000 (22:47 +0000)]
Merge "Clean up our alternate signal stacks."
Elliott Hughes [Tue, 16 Jul 2013 21:32:47 +0000 (14:32 -0700)]
Clean up our alternate signal stacks.
Bug:
8557703
Change-Id: Ie93901dd1c29e9d3bf795b0f0400616d9ef08f75
Elliott Hughes [Tue, 16 Jul 2013 20:38:55 +0000 (20:38 +0000)]
Merge "Improve stack overflow diagnostics."
Elliott Hughes [Tue, 16 Jul 2013 20:14:24 +0000 (13:14 -0700)]
Improve stack overflow diagnostics.
We notify debuggerd of problems by installing signal handlers. That's
fine except for when the signal is caused by us running off the end of
a thread's stack and into the guard page.
Bug:
8557703
Change-Id: I1ef65b4bb3bbca7e9a9743056177094921e60ed3
Elliott Hughes [Tue, 16 Jul 2013 19:52:30 +0000 (19:52 +0000)]
Merge "Clean up __builtin_expect usage."
Elliott Hughes [Tue, 16 Jul 2013 19:45:46 +0000 (12:45 -0700)]
Clean up __builtin_expect usage.
Also remove some dead code; our malloc debugging doesn't use this
any more.
Change-Id: Id69cf182371f5f37d40b5bbd08f2744ade286e66
Elliott Hughes [Tue, 16 Jul 2013 19:35:57 +0000 (19:35 +0000)]
Merge "EABI syscall cleanup."
Elliott Hughes [Tue, 16 Jul 2013 18:52:24 +0000 (11:52 -0700)]
EABI syscall cleanup.
We cleaned up the auto-generated ones a while back to not touch
the stack unnecessarily if they have <= 4 arguments. This patch
cleans up some hand-crafted ones.
Also improve comments in clone.S.
Change-Id: I8850bf98f2b26829385315304472a760e6880ed8
Elliott Hughes [Mon, 15 Jul 2013 23:39:38 +0000 (23:39 +0000)]
Merge "Fix pthread_getattr_np, pthread_attr_setguardsize, and pthread_attr_setstacksize."
Elliott Hughes [Mon, 15 Jul 2013 21:51:07 +0000 (14:51 -0700)]
Fix pthread_getattr_np, pthread_attr_setguardsize, and pthread_attr_setstacksize.
pthread_getattr_np was reporting the values supplied to us, not the values we
actually used, which is kinda the whole point of pthread_getattr_np.
pthread_attr_setguardsize and pthread_attr_setstacksize were reporting EINVAL
for any size that wasn't a multiple of the system page size. This is
unnecessary. We can just round like POSIX suggests and glibc already does.
Also improve the error reporting for pthread_create failures.
Change-Id: I7ebc518628a8a1161ec72e111def911d500bba71
Elliott Hughes [Mon, 15 Jul 2013 17:08:41 +0000 (17:08 +0000)]
Merge "Upgrade to tzcode2013d."
Elliott Hughes [Sat, 13 Jul 2013 00:31:11 +0000 (17:31 -0700)]
Upgrade to tzcode2013d.
Well, kinda... localtime.c still contains a bunch of Android-specific
hacks, as does strftime.c. But the other files are now exactly the same
as upstream.
This catches up with several years of bug fixes, and fixes most of the
compiler warnings that were in this code. (Just two remain.)
Bug:
1744909
Change-Id: I2ddfecb6fd408c847397c17afb0fff859e27feef
Elliott Hughes [Fri, 12 Jul 2013 21:23:48 +0000 (21:23 +0000)]
Merge "Add a trivial gmtime(3) test."
Elliott Hughes [Fri, 12 Jul 2013 18:25:20 +0000 (11:25 -0700)]
Add a trivial gmtime(3) test.
Change-Id: I849f200a455cd6971646fa45766ab22ba19fb866
Elliott Hughes [Thu, 11 Jul 2013 23:58:48 +0000 (23:58 +0000)]
Merge "Add TCP_INFO state enum values."
Elliott Hughes [Thu, 11 Jul 2013 23:21:32 +0000 (16:21 -0700)]
Add TCP_INFO state enum values.
Bug: https://code.google.com/p/android/issues/detail?id=38881
Change-Id: Ie22816c666474e6441e0ec3afd2a6eb04d64a673
Nick Kralevich [Thu, 11 Jul 2013 15:32:49 +0000 (15:32 +0000)]
Merge "syslog.h: add __printflike to syslog functions"
Nick Kralevich [Wed, 10 Jul 2013 14:37:11 +0000 (07:37 -0700)]
syslog.h: add __printflike to syslog functions
Allow the compiler to detect formating bugs.
Change-Id: I6a4af6cae59dc3adf14b075431a41885213a649a
Elliott Hughes [Tue, 9 Jul 2013 21:19:15 +0000 (21:19 +0000)]
Merge "Fix MIPS build."
Elliott Hughes [Tue, 9 Jul 2013 21:18:36 +0000 (14:18 -0700)]
Fix MIPS build.
Change-Id: I583b1794dbc12fcded8c4f57f367593a742ab33f
Elliott Hughes [Tue, 9 Jul 2013 20:43:13 +0000 (20:43 +0000)]
Merge "Add <sys/statvfs.h>."
Elliott Hughes [Tue, 9 Jul 2013 20:25:03 +0000 (13:25 -0700)]
Add <sys/statvfs.h>.
Bug:
2512019
Change-Id: I6e7fd3fa281977cc4bc270481a95416b5b2dc351
Elliott Hughes [Mon, 8 Jul 2013 22:08:12 +0000 (22:08 +0000)]
Merge "Remove <netinet/icmp6.h> ni_* macros."
Elliott Hughes [Mon, 8 Jul 2013 22:05:50 +0000 (15:05 -0700)]
Remove <netinet/icmp6.h> ni_* macros.
glibc doesn't have these, and they prevent ping from building out of
the box because it assumes it can define them.
Bug:
9671560
Change-Id: I815f2a9c4fd96a0ea2952eb5a71ddf51e0763660
Elliott Hughes [Mon, 8 Jul 2013 21:53:02 +0000 (21:53 +0000)]
Merge "Upgrade to tzdata2013d."
Elliott Hughes [Mon, 8 Jul 2013 21:51:15 +0000 (14:51 -0700)]
Upgrade to tzdata2013d.
From the release notes:
Changes affecting future time stamps:
Morocco's midsummer transitions this year are July 7 and August 10,
not July 9 and August 8. (Thanks to Andrew Paprocki.)
Israel now falls back on the last Sunday of October.
(Thanks to Ephraim Silverberg.)
Changes affecting past time stamps:
Specify Jerusalem's location more precisely; this changes the pre-1880
times by 2 s.
Changing affecting metadata only:
Fix typos in the entries for country codes BQ and SX.
Change-Id: I87f992e4c406d4f254dc274f206536e9484024a2
Elliott Hughes [Mon, 8 Jul 2013 18:17:57 +0000 (18:17 +0000)]
Merge "Make bionic's <netinet/icmp6.h> standalone, like glibc's."
Elliott Hughes [Mon, 8 Jul 2013 18:16:24 +0000 (11:16 -0700)]
Make bionic's <netinet/icmp6.h> standalone, like glibc's.
This removes the need for a bionic-specific hack in external/iproute2.
Bug:
9671560
Change-Id: I9f15be0711d26bca863bd66be9a39606500fb948
Elliott Hughes [Mon, 8 Jul 2013 17:32:17 +0000 (17:32 +0000)]
Merge "Fix IPv6 filtering definitions in netinet/icmp6.h."
Lorenzo Colitti [Wed, 3 Jul 2013 06:42:06 +0000 (15:42 +0900)]
Fix IPv6 filtering definitions in netinet/icmp6.h.
Linux and *BSD kernels use opposite values to indicate pass/block
in ICMPv6 filters, and assign a different value to the
ICMP6_FILTER sockopt.
Bug:
9671560
Bug:
9469682
Change-Id: Ic0f1fcd48891add992acf97632f60aebd172c1d7
Elliott Hughes [Mon, 8 Jul 2013 17:08:52 +0000 (17:08 +0000)]
Merge "Clean up <sys/mount.h>/<linux/fs.h> duplication."
Elliott Hughes [Wed, 3 Jul 2013 21:58:04 +0000 (14:58 -0700)]
Clean up <sys/mount.h>/<linux/fs.h> duplication.
Roll on uapi...
Bug:
6340120
Change-Id: Ic9521905683946e836574e4d768e34853ea777fa
Nick Kralevich [Wed, 3 Jul 2013 21:25:35 +0000 (21:25 +0000)]
Merge "bionic_atomic_arm.h: Remove < ARMv6 support"
Nick Kralevich [Wed, 3 Jul 2013 21:14:06 +0000 (14:14 -0700)]
bionic_atomic_arm.h: Remove < ARMv6 support
This is dead code for most modern Android devices.
Bug:
9674955
Change-Id: Ic63a66b0331a0f07b9183f14a1d5e678c25e4b12
Elliott Hughes [Wed, 3 Jul 2013 20:37:28 +0000 (20:37 +0000)]
Merge changes I01345c23,I3b57517c
* changes:
Include linux/termios.h from sys/ioctl.h.
Update linux/types.h to linux 2.6.20.
Lorenzo Colitti [Wed, 3 Jul 2013 02:57:15 +0000 (11:57 +0900)]
Include linux/termios.h from sys/ioctl.h.
On NetBSD and glibc, including sys/ioctl.h provides some
terminal ioctl data structures such as struct winsize. For
compatibility, provide these via sys/ioctl.h in bionic as well.
bionic does not have its own definitions for these structures, so
get them from the Linux kernel definitions.
Change-Id: I01345c23c0bebd60b0a80fc33668e7c0ad7356c3
Lorenzo Colitti [Wed, 3 Jul 2013 04:21:35 +0000 (13:21 +0900)]
Update linux/types.h to linux 2.6.20.
This picks up the source kernel header change
I984154487c38f6fa827bd78234f7fc2e4e1c383f .
Bug:
9469682
Change-Id: I3b57517cc6442ba4d0b8003d7398617e8226233f
Elliott Hughes [Wed, 3 Jul 2013 17:21:47 +0000 (17:21 +0000)]
Merge "libc/arch-arm/bionic/memcpy.a9.S: memcpy from cortex-strings."
Will Newton [Wed, 3 Jul 2013 08:44:30 +0000 (09:44 +0100)]
libc/arch-arm/bionic/memcpy.a9.S: memcpy from cortex-strings.
This memcpy code uses NEON/VFP to achieve very good performance
on ARMv7-A processors. It is specifically tuned for A15 but should
provide good performance on A9 also. It is equivalent to the code
in cortex-strings rev 116.
This patch is a follow up the existing gerrit change:
I7f6f77995f3ca903ad9c66d14261441667a2a935
This version includes a tweak for performance on misaligned
buffers and splits the header comment into license and
documentation sections.
Change-Id: Ibd2e23c8d8e01357ba0247be1d05192de3ceba69
Signed-off-by: Will Newton <will.newton@linaro.org>
Elliott Hughes [Tue, 2 Jul 2013 23:00:37 +0000 (23:00 +0000)]
Merge "Expose dn_comp and dn_expand to system C code."
Lorenzo Colitti [Tue, 2 Jul 2013 08:44:00 +0000 (17:44 +0900)]
Expose dn_comp and dn_expand to system C code.
This is needed to compile open-source code that wants to
expand/compress domain names itself, such as ping6.
Bug:
9469682
Change-Id: I339c6538936d05c031bc6fb0a8793aaf1429dea4
Elliott Hughes [Tue, 2 Jul 2013 22:42:49 +0000 (22:42 +0000)]
Merge "Fix inttypes.h PRI?PTR and SCN?PTR macros."
Elliott Hughes [Tue, 2 Jul 2013 22:23:38 +0000 (15:23 -0700)]
Fix inttypes.h PRI?PTR and SCN?PTR macros.
Our intptr_t and uintptr_t aren't "long". Add a compilation test so we remember
to fix this to cope with 32- and 64-bit later.
Bug: http://code.google.com/p/android/issues/detail?id=57218
Change-Id: I2f816d339edb4f7d57e4418b818fb4c602093f38
Elliott Hughes [Tue, 2 Jul 2013 16:40:42 +0000 (16:40 +0000)]
Merge "Update icmp6.h to current NetBSD."
Lorenzo Colitti [Mon, 1 Jul 2013 08:07:03 +0000 (17:07 +0900)]
Update icmp6.h to current NetBSD.
This adds a few bits we need such as RFC 6106 support and the
definition of MLD_LISTENER_REDUCTION.
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/netinet/icmp6.h?rev=1.47
Bug:
9469682
Change-Id: I97a4c2f0893012ce315334367c055097d0f8bb10
Christopher Ferris [Mon, 1 Jul 2013 17:29:07 +0000 (17:29 +0000)]
Merge "libc/arch-arm/bionic/memcpy.a9.S: memcpy from cortex-strings."
Nick Kralevich [Mon, 1 Jul 2013 16:57:04 +0000 (16:57 +0000)]
Merge "More FORTIFY_SOURCE functions under clang"
Will Newton [Mon, 1 Jul 2013 10:15:27 +0000 (11:15 +0100)]
libc/arch-arm/bionic/memcpy.a9.S: memcpy from cortex-strings.
This memcpy code uses NEON/VFP to achieve very good performance
on ARMv7-A processors. It is specifically tuned for A15 but should
provide good performance on A9 also. It is equivalent to the code
in cortex-strings rev 116.
This patch is a follow up the existing gerrit change:
I7f6f77995f3ca903ad9c66d14261441667a2a935
But this version includes a tweak for performance on misaligned
buffers.
Change-Id: I285abac0068f8ae29a1cbf7862ea8590aadaf0a7
Signed-off-by: Will Newton <will.newton@linaro.org>
Nick Kralevich [Sat, 29 Jun 2013 15:15:25 +0000 (08:15 -0700)]
More FORTIFY_SOURCE functions under clang
* bzero
* umask
* strlcat
Change-Id: I65065208e0b8b37e10f6a266d5305de8fa9e59fc
Nick Kralevich [Fri, 28 Jun 2013 20:31:11 +0000 (20:31 +0000)]
Merge "resolv_private.h: remove #define b64_ntop and b64_pton"
Nick Kralevich [Fri, 28 Jun 2013 20:18:32 +0000 (13:18 -0700)]
resolv_private.h: remove #define b64_ntop and b64_pton
This was gated off of "#ifndef ADNROID_CHANGES" (note mispelling)
and is unconditionally defined in libc/include/resolv.h
(which this file includes). No need for duplicate definitions.
Change-Id: I00719bcf39eaa26eb96ab4274f171f3d2b5bae61
Nick Kralevich [Fri, 28 Jun 2013 20:05:57 +0000 (20:05 +0000)]
Merge "Reorganize FORTIFY_SOURCE tests."
Nick Kralevich [Fri, 28 Jun 2013 17:34:09 +0000 (10:34 -0700)]
Reorganize FORTIFY_SOURCE tests.
Get rid of a lot of the duplication in the various FORTIFY_SOURCE
tests. Instead, we build 4 separate static libraries, with
4 different compile time options, and link them into the final test
binary.
Change-Id: Idb0b7cccc8dd837adb037bf4ddfe8942ae138230
Nick Kralevich [Thu, 27 Jun 2013 17:13:25 +0000 (17:13 +0000)]
Merge "stdio.h: enable vs?printf clang FORTIFY_SOURCE"
Nick Kralevich [Thu, 27 Jun 2013 15:58:14 +0000 (08:58 -0700)]
stdio.h: enable vs?printf clang FORTIFY_SOURCE
Enable FORTIFY_SOURCE protections under clang for the following
functions:
* vsprintf
* vsnprintf
and add unittests.
Change-Id: I90f8a27f7b202c78b5dd8ebf53050bf9e33496f7
Colin Cross [Wed, 26 Jun 2013 00:03:24 +0000 (00:03 +0000)]
Merge changes Ib496e818,I074204e9
* changes:
bionic: add compatibility mode for properties
bionic: use the size of the file to determine property area size
Colin Cross [Tue, 25 Jun 2013 01:36:39 +0000 (18:36 -0700)]
bionic: add compatibility mode for properties
Allow a new bionic to work with an old init property area by supporting
the old format.
(cherry picked from commit
ad76c85b9ca587084089d086f954158bc0eae905)
Change-Id: Ib496e818a62a5834d40c71eb4745783d998be893
Colin Cross [Tue, 25 Jun 2013 01:42:21 +0000 (18:42 -0700)]
bionic: use the size of the file to determine property area size
On the reader size, don't assume that the property size is PA_SIZE,
read it from the size of the file. Allows init to use a different
property size without recompiling statically linked executables.
(cherry picked from commit
285b42a04cbe8e627a75c9bfb3c7cb3f7b539267)
Change-Id: I074204e9e6591b35faf7c1c58fb11ec162aff7bf
Elliott Hughes [Tue, 25 Jun 2013 22:56:59 +0000 (22:56 +0000)]
Merge "Switch to current upstream getopt_long."
Rom Lemarchand [Tue, 25 Jun 2013 22:25:30 +0000 (22:25 +0000)]
Merge "libc: add swapon and swapoff syscalls"
Elliott Hughes [Tue, 25 Jun 2013 21:48:10 +0000 (14:48 -0700)]
Switch to current upstream getopt_long.
Change-Id: I4c646dcb8be9e88dd54d069a03bbc5fbfd92de03
Elliott Hughes [Tue, 25 Jun 2013 21:20:18 +0000 (21:20 +0000)]
Merge "Update x86 machine/endian.h from upstream"
Pavel Chupin [Fri, 19 Apr 2013 09:09:25 +0000 (13:09 +0400)]
Update x86 machine/endian.h from upstream
After download new version from upstream (OpenBSD 1.17) did the
following:
* changed all u_int* types to uint*
* add #include <sys/types.h>
All these changes are Android-specific and had been done before for
previous version (1.14).
Bug: http://code.google.com/p/android/issues/detail?id=54465
Change-Id: Ieb44e7fce4e794d997bb00ee0dd417fb61521720
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
Rom Lemarchand [Thu, 6 Jun 2013 21:29:40 +0000 (14:29 -0700)]
libc: add swapon and swapoff syscalls
Change-Id: Ie79dc8e3f2ff1cd427dd6d95e3850920c4b407b0
Signed-off-by: Rom Lemarchand <romlem@google.com>
Elliott Hughes [Tue, 25 Jun 2013 20:15:29 +0000 (20:15 +0000)]
Merge "Kernel dso support for 'dl_iterate_phdr' function"
Sergey Melnikov [Fri, 25 Jan 2013 12:40:13 +0000 (16:40 +0400)]
Kernel dso support for 'dl_iterate_phdr' function
Kernel provides virtual DSO for stack unwinding/exception handlind info for
signal usage case. Stack unwinding routines use 'dl_iterate_phdr' function
for additional DWARF info gathering from DSOs. Patch enables virtual DSO
enumeration via dl_iterate_phdr function.
Signed-off-by: Sergey Melnikov <sergey.melnikov@intel.com>
Change-Id: Ic2882b28f40b456a088bc1e63c50cbfda7e4a102
Nick Kralevich [Tue, 25 Jun 2013 17:26:20 +0000 (17:26 +0000)]
Merge "libc: enable FORTIFY_SOURCE snprintf under clang"
Nick Kralevich [Tue, 25 Jun 2013 17:02:35 +0000 (10:02 -0700)]
libc: enable FORTIFY_SOURCE snprintf under clang
Change-Id: I8b8059782a720104722b0841994b38f873ed02aa
Colin Cross [Tue, 25 Jun 2013 00:07:53 +0000 (00:07 +0000)]
Merge changes Ib074192d,I6df3afed,I69070455,Icbe31908,Id3fa4526,I038d451f
* changes:
bionic: store property names as variable-length strings
bionic: prevent root processes from calling __system_property_add
bionic: revert to a single (larger) property area
bionic: reimplement property area as hybrid trie/binary tree
bionic: add missing memory barriers to system properties
bionic: make property area expandable
Greg Hackmann [Fri, 21 Jun 2013 20:02:38 +0000 (13:02 -0700)]
bionic: store property names as variable-length strings
Names are immutable, so the fixed-sized arrays can be replaced with
variable-length ones to save memory (especially on internal tree nodes).
Signed-off-by: Greg Hackmann <ghackmann@google.com>
(cherry picked from commit
492ce95d9f6149137cb5b63c55cf2b3cdbe51e5e)
Change-Id: Ib074192d1b71150233d78c58e9ffcf7ecf688b6b
Colin Cross [Sun, 16 Jun 2013 17:19:16 +0000 (10:19 -0700)]
bionic: prevent root processes from calling __system_property_add
If a root process other than init calls __system_property_add, which
it should never do, it will break the design assumption that there is
only one mutator.
Pass O_EXCL to open() in map_prop_region_rw to ensure that only one
process ever has the property pages open for write.
(cherry picked from commit
fb9b7b436f3ef94385f1b0c55ab81f246f0d96b8)
Change-Id: I6df3afedbfb5d07891b095aa24b78278381a5aaf
Greg Hackmann [Wed, 19 Jun 2013 20:31:21 +0000 (13:31 -0700)]
bionic: revert to a single (larger) property area
d329697 is too complicated. Change the multiple property pages back to
a single 128K property area that's mapped in entirely at initialization
(the memory will not get allocated until the pages are touched).
d329697 has other changes useful for testing (moving property area
initialization inside bionic and adding __system_property_set_filename)
so undo the change manually rather than with git revert.
Signed-off-by: Greg Hackmann <ghackmann@google.com>
(cherry picked from commit
5f05348c18286a2cea46eae8acf94ed5b7932fac)
Change-Id: I690704552afc07a4dd410277893ca9c40bc13e5f
Greg Hackmann [Thu, 20 Jun 2013 18:27:56 +0000 (11:27 -0700)]
bionic: reimplement property area as hybrid trie/binary tree
See the comments for an explanation of how properties are stored.
The trie structure is designed to scale better than the previous
array-based implementation. Searching an array with n properties
required average O(n) string compares of the entire key; searching the
trie requires average O(log n) string compares of each token (substrings
between '.' characters).
Signed-off-by: Greg Hackmann <ghackmann@google.com>
(cherry picked from commit
6ac8e6a46d71a51bec16938efa89f275fa89cf7d)
Change-Id: Icbe31908572f33b4d9b85d5b62ac837cbd0f85e0
Greg Hackmann [Thu, 20 Jun 2013 17:33:28 +0000 (10:33 -0700)]
bionic: add missing memory barriers to system properties
1) Reading the value must finish before checking whether it's intact
2) Setting the serial's dirty bit must visible before modifying the
value
3) The modified value must be visible before clearing the serial's dirty
bit
4) New properties and their TOC entries must be visible before updating
the property count
Signed-off-by: Greg Hackmann <ghackmann@google.com>
(cherry picked from commit
5bfa3ee8b37ef162154559575193018a6235acba)
Change-Id: Id3fa45261fc2df2ae493ab5194bc2b6bff04e966
Greg Hackmann [Wed, 13 Feb 2013 22:41:48 +0000 (14:41 -0800)]
bionic: make property area expandable
The property area is initially one 4K region, automatically expanding as
needed up to 64 regions.
To avoid duplicating code, __system_property_area_init() now allocates
and initializes the first region (previously it was allocated in init's
init_property_area() and initialized in bionic). For testing purposes,
__system_property_set_filename() may be used to override the file used
to map in regions.
Signed-off-by: Greg Hackmann <ghackmann@google.com>
(cherry picked from commit
d32969701be070c0161c2643ee3c3df16066bbb8)
Change-Id: I038d451fe8849b0c4863663eec6f57f6521bf4a7
Nick Kralevich [Mon, 24 Jun 2013 22:15:12 +0000 (22:15 +0000)]
Merge "libc: enable sprintf FORTIFY_SOURCE under clang"