Commit graph

4743 commits

Author SHA1 Message Date
Elliott Hughes
dcd237a897 am 1ba3a2c2: Merge "Update icmp6.h to current NetBSD."
* commit '1ba3a2c26937c68a4a0bd4fdffe95f5162077997':
  Update icmp6.h to current NetBSD.
2013-07-02 12:34:36 -07:00
Elliott Hughes
1ba3a2c269 Merge "Update icmp6.h to current NetBSD." 2013-07-02 16:40:42 +00:00
Lorenzo Colitti
ce7c404dc7 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
2013-07-02 09:38:59 -07:00
Christopher Ferris
269daac2f1 am 7c14d67b: Merge "libc/arch-arm/bionic/memcpy.a9.S: memcpy from cortex-strings."
* commit '7c14d67bc1cc2679365a784e68518bf602b81dc7':
  libc/arch-arm/bionic/memcpy.a9.S: memcpy from cortex-strings.
2013-07-01 10:32:17 -07:00
Christopher Ferris
7c14d67bc1 Merge "libc/arch-arm/bionic/memcpy.a9.S: memcpy from cortex-strings." 2013-07-01 17:29:07 +00:00
Nick Kralevich
28d298a673 am 413eef71: Merge "More FORTIFY_SOURCE functions under clang"
* commit '413eef716f822d5eb4f57618f6780c6af5036460':
  More FORTIFY_SOURCE functions under clang
2013-07-01 10:00:09 -07:00
Nick Kralevich
413eef716f Merge "More FORTIFY_SOURCE functions under clang" 2013-07-01 16:57:05 +00:00
Will Newton
b61103dff4 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>
2013-07-01 11:15:27 +01:00
Nick Kralevich
a6cde39276 More FORTIFY_SOURCE functions under clang
* bzero
* umask
* strlcat

Change-Id: I65065208e0b8b37e10f6a266d5305de8fa9e59fc
2013-06-29 08:16:22 -07:00
Nick Kralevich
a289964bca am 227b47a4: Merge "resolv_private.h: remove #define b64_ntop and b64_pton"
* commit '227b47a461b27d746b373feb66001cdddc9ba1db':
  resolv_private.h: remove #define b64_ntop and b64_pton
2013-06-28 13:32:43 -07:00
Nick Kralevich
227b47a461 Merge "resolv_private.h: remove #define b64_ntop and b64_pton" 2013-06-28 20:31:11 +00:00
Nick Kralevich
ca43d73d23 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
2013-06-28 13:18:32 -07:00
Nick Kralevich
2018cfa85d am 394df35e: Merge "Reorganize FORTIFY_SOURCE tests."
* commit '394df35e641816a3b9f0e065840b673dec9c73e5':
  Reorganize FORTIFY_SOURCE tests.
2013-06-28 13:11:14 -07:00
Nick Kralevich
394df35e64 Merge "Reorganize FORTIFY_SOURCE tests." 2013-06-28 20:05:57 +00:00
Nick Kralevich
5bcf39842e 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
2013-06-28 11:54:29 -07:00
Nick Kralevich
f9ef0106da am 78a7bf99: Merge "stdio.h: enable vs?printf clang FORTIFY_SOURCE"
* commit '78a7bf998d2d29592504984fcf419cd2701c6c54':
  stdio.h: enable vs?printf clang FORTIFY_SOURCE
2013-06-27 10:15:31 -07:00
Nick Kralevich
78a7bf998d Merge "stdio.h: enable vs?printf clang FORTIFY_SOURCE" 2013-06-27 17:13:25 +00:00
Nick Kralevich
c8ae8bd941 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
2013-06-27 09:17:48 -07:00
Colin Cross
146d79c22a am fbec57d4: Merge changes Ib496e818,I074204e9
* commit 'fbec57d46c42460b2381484d1610ff21922d162e':
  bionic: add compatibility mode for properties
  bionic: use the size of the file to determine property area size
2013-06-25 17:08:48 -07:00
Colin Cross
fbec57d46c Merge changes Ib496e818,I074204e9
* changes:
  bionic: add compatibility mode for properties
  bionic: use the size of the file to determine property area size
2013-06-26 00:03:24 +00:00
Colin Cross
5e9a086145 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 ad76c85b9c)

Change-Id: Ib496e818a62a5834d40c71eb4745783d998be893
2013-06-25 16:52:40 -07:00
Colin Cross
1ec20a086c 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 285b42a04c)

Change-Id: I074204e9e6591b35faf7c1c58fb11ec162aff7bf
2013-06-25 16:52:34 -07:00
Elliott Hughes
db6dd600d2 am b116bf76: Merge "Switch to current upstream getopt_long."
* commit 'b116bf76286178a7d552c4d0a72b79212c8c93d1':
  Switch to current upstream getopt_long.
2013-06-25 15:58:53 -07:00
Elliott Hughes
b116bf7628 Merge "Switch to current upstream getopt_long." 2013-06-25 22:56:59 +00:00
Rom Lemarchand
baa61864c5 am 995f17e6: Merge "libc: add swapon and swapoff syscalls"
* commit '995f17e6a9a9903f03f542192da9a83b1cabc684':
  libc: add swapon and swapoff syscalls
2013-06-25 15:28:21 -07:00
Rom Lemarchand
995f17e6a9 Merge "libc: add swapon and swapoff syscalls" 2013-06-25 22:25:31 +00:00
Elliott Hughes
d278b828fe Switch to current upstream getopt_long.
Change-Id: I4c646dcb8be9e88dd54d069a03bbc5fbfd92de03
2013-06-25 14:56:17 -07:00
Elliott Hughes
51371ee0d8 am c76550b3: Merge "Update x86 machine/endian.h from upstream"
* commit 'c76550b3377f50a2bc53536e2713e14edc8dbeac':
  Update x86 machine/endian.h from upstream
2013-06-25 14:22:14 -07:00
Elliott Hughes
c76550b337 Merge "Update x86 machine/endian.h from upstream" 2013-06-25 21:20:18 +00:00
Pavel Chupin
64a4f6adf7 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>
2013-06-25 14:17:58 -07:00
Rom Lemarchand
d206b560e7 libc: add swapon and swapoff syscalls
Change-Id: Ie79dc8e3f2ff1cd427dd6d95e3850920c4b407b0
Signed-off-by: Rom Lemarchand <romlem@google.com>
2013-06-25 13:18:03 -07:00
Elliott Hughes
d31287d601 am 7d624e9a: Merge "Kernel dso support for \'dl_iterate_phdr\' function"
* commit '7d624e9aff4c6addea7f2275fe58ff0815d95c70':
  Kernel dso support for 'dl_iterate_phdr' function
2013-06-25 13:17:37 -07:00
Elliott Hughes
7d624e9aff Merge "Kernel dso support for 'dl_iterate_phdr' function" 2013-06-25 20:15:30 +00:00
Sergey Melnikov
c45087bffa 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
2013-06-25 13:12:39 -07:00
Nick Kralevich
7180213557 am bfacb603: Merge "libc: enable FORTIFY_SOURCE snprintf under clang"
* commit 'bfacb603e417c1e2c25ce8482b5c6e31b4db8c9b':
  libc: enable FORTIFY_SOURCE snprintf under clang
2013-06-25 10:34:20 -07:00
Nick Kralevich
bfacb603e4 Merge "libc: enable FORTIFY_SOURCE snprintf under clang" 2013-06-25 17:26:20 +00:00
Nick Kralevich
621b19dddb libc: enable FORTIFY_SOURCE snprintf under clang
Change-Id: I8b8059782a720104722b0841994b38f873ed02aa
2013-06-25 10:02:35 -07:00
Colin Cross
a99e29e610 am 1642edb5: Merge changes Ib074192d,I6df3afed,I69070455,Icbe31908,Id3fa4526,I038d451f
* commit '1642edb5208fe02ef64d5734fffaf7c4a724fd2f':
  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
2013-06-24 17:10:16 -07:00
Colin Cross
1642edb520 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
2013-06-25 00:07:53 +00:00
Greg Hackmann
836dbf65e4 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 492ce95d9f)

Change-Id: Ib074192d1b71150233d78c58e9ffcf7ecf688b6b
2013-06-24 16:35:46 -07:00
Colin Cross
1d36ee1a6e 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 fb9b7b436f)

Change-Id: I6df3afedbfb5d07891b095aa24b78278381a5aaf
2013-06-24 16:35:41 -07:00
Greg Hackmann
1540f601be 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 5f05348c18)

Change-Id: I690704552afc07a4dd410277893ca9c40bc13e5f
2013-06-24 16:35:37 -07:00
Greg Hackmann
996cdc4b1a 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 6ac8e6a46d)

Change-Id: Icbe31908572f33b4d9b85d5b62ac837cbd0f85e0
2013-06-24 16:35:32 -07:00
Greg Hackmann
f7511e3bc9 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 5bfa3ee8b3)

Change-Id: Id3fa45261fc2df2ae493ab5194bc2b6bff04e966
2013-06-24 16:35:27 -07:00
Greg Hackmann
cb215a7e9e 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 d32969701b)

Change-Id: I038d451fe8849b0c4863663eec6f57f6521bf4a7
2013-06-24 16:35:15 -07:00
Nick Kralevich
954480393f am 0ea1d5c0: Merge "libc: enable sprintf FORTIFY_SOURCE under clang"
* commit '0ea1d5c0ae94ee581c72451b20813c028f51090c':
  libc: enable sprintf FORTIFY_SOURCE under clang
2013-06-24 15:20:39 -07:00
Nick Kralevich
0ea1d5c0ae Merge "libc: enable sprintf FORTIFY_SOURCE under clang" 2013-06-24 22:15:12 +00:00
Nick Kralevich
c6eb985454 libc: enable sprintf FORTIFY_SOURCE under clang
clang doesn't support __builtin_va_arg_pack(), so we have
to use #define instead.

Change-Id: I2ee75e6267d60cdf997fee6b9b0547bf68f062a1
2013-06-24 14:10:29 -07:00
Nick Kralevich
100d678438 am 53ddcc90: Merge "linker: Emit a warning on text relocations"
* commit '53ddcc90701d86c7d809a84cf4710c651066e3c7':
  linker: Emit a warning on text relocations
2013-06-21 15:39:21 -07:00
Nick Kralevich
53ddcc9070 Merge "linker: Emit a warning on text relocations" 2013-06-21 22:36:50 +00:00