am e421bd71: am 02002443: Merge "bionic: fix deleting property arrays in property benchmark"

* commit 'e421bd71c32e35b8f39f2e51f2d534d2f21f139f':
  bionic: fix deleting property arrays in property benchmark
am 45ef218b: am 6807af77: Merge "Make LD_PRELOAD failures just warnings."

* commit '45ef218bde353df455062aa3c9a9f84ffed769fc':
  Make LD_PRELOAD failures just warnings.
am 3bf62790: am dd0880fe: Merge "libc: add limited FORTIFY_SOURCE support for clang"

* commit '3bf6279034e6a92c3550fae31c5c136bec61344a':
  libc: add limited FORTIFY_SOURCE support for clang
am d98d35c5: am 0846109c: Merge "libc: Rename fortify error functions."

* commit 'd98d35c5380ce398038d3062d40bc4fe082dce80':
  libc: Rename fortify error functions.
am 13e23302: am c656d732: Merge "Always use v1 for MIPS TLS access."

* commit '13e23302c93fdd8b52c606277f32dec0627ddbbd':
  Always use v1 for MIPS TLS access.
Merge "Fix remove_uidiface_info failing on first entry"
bionic: add __system_property_foreach

find_nth() will be inefficient on a trie.  Since find_nth() is only used
internally and only for enumerating properties, we can add a foreach()
function to do this directly.

Change-Id: I66bde9926c193073d74b244cce9fffd52108fff8
Signed-off-by: Greg Hackmann <ghackmann@google.com>
merge in klp-release history after reset to master
am f4250508: am 3225f498: Merge "bionic: add __system_property_foreach"

* commit 'f4250508d5de415e200888ffdf143f870dc0f829':
  bionic: add __system_property_foreach
am 1d174a9c: am 02ca0e31: Merge "Fix FORTIFY_SOURCE unittests."

* commit '1d174a9c17f645a27d766a66e7477d797f955e90':
  Fix FORTIFY_SOURCE unittests.
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.

Change-Id: Ibe00ef52464bfa590953c4699a6d98383b0142b1
Signed-off-by: Greg Hackmann <ghackmann@google.com>
am 33df38a0: am 4eed6509: Merge "stdint.h header is not fully compatible with C99(ISO9899:1999)"

* commit '33df38a04c31de0fca431c549469edb6d2de75e2':
  stdint.h header is not fully compatible with C99(ISO9899:1999)
am 5fed0eea: am 0ce28d20: Merge "libc: enable FORTIFY_SOURCE clang strlcpy"

* commit '5fed0eeabd88bfe241c416f2c2f44a14b6e447fa':
  libc: enable FORTIFY_SOURCE clang strlcpy
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

Change-Id: I26c680ec025fdb72362d5f618ec0d2b93d381233
Signed-off-by: Greg Hackmann <ghackmann@google.com>
am cb25359a: am 68197731: Merge "libc_logging: don\'t keep file descriptors open forever"

* commit 'cb25359a2e20489a3a9f65795a2079abc8fe0b65':
  libc_logging: don't keep file descriptors open forever
am 100d6784: am 53ddcc90: Merge "linker: Emit a warning on text relocations"

* commit '100d678438f222ad6ef8f3dc0646911b218c50a9':
  linker: Emit a warning on text relocations
merge in klp-release history after reset to master
Merge "bionic: add missing memory barriers to system properties"
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).

Change-Id: I491305bc7aca59609abcd871a5f33d97f89ce714
Signed-off-by: Greg Hackmann <ghackmann@google.com>
bionic: add hierarchical properties test

Deliberately put items several levels deep in the trie hierarchy to test
the trie traversal

Change-Id: Id3cbd2e7d3500216b1ac8025eac70c0939622903
Signed-off-by: Greg Hackmann <ghackmann@google.com>