Commit graph

16069 commits

Author SHA1 Message Date
Dan Willemsen
e4f486ca25 Fix Soong mips builds
Change-Id: I6ae8208e077d831969b08e7abd232deaa20ceca1
2016-01-13 23:22:22 -08:00
Christopher Ferris
c3aa3d892b Merge "Add method to run fortified versions of funcs." 2016-01-14 05:16:33 +00:00
Christopher Ferris
13f26a7b2b Add method to run fortified versions of funcs.
Add a way to turn fortify off for the files that test fortify functions.

This method involves simply compiling the same file with fortify off and
changing the test name slightly.

It's not very pretty, and it assumes that only these few files test
functions that can be fortified.

Bug: 15195631
Change-Id: Iba9db1d508b7d28a1d6968019cb70fe08864827b
2016-01-13 17:13:21 -08:00
Dan Willemsen
df2f5fbe6f Merge "Fix Soong x86 builds" 2016-01-13 21:45:14 +00:00
Dan Willemsen
4031cbe9c2 Fix Soong x86 builds
Change-Id: Ida3f3584f832d61caf7200557ea57be799eaf38e
2016-01-13 13:37:01 -08:00
Dimitry Ivanov
126d5ab779 Merge "Revert "Move __system_property* to LIBC_PRIVATE for lp64 libc"" 2016-01-13 20:35:25 +00:00
Dimitry Ivanov
e1078a939a Revert "Move __system_property* to LIBC_PRIVATE for lp64 libc"
This reverts commit ff14fb5a1f.

Bug: http://b/26497521
Change-Id: Id7131b37a31e936db0e72ef9969e1f13d2dd578f
2016-01-13 20:32:12 +00:00
Colin Cross
2487f3e15f Merge "Rearrange build files to support USE_SOONG=true" 2016-01-13 20:32:09 +00:00
Dan Willemsen
5d10e69bea Merge "Fix Soong x86 atom builds" 2016-01-13 20:32:07 +00:00
Colin Cross
c292f57ec7 Merge "Update Android.bp for changes to Android.mk" 2016-01-13 20:31:39 +00:00
Dan Willemsen
701b54533b Fix Soong x86 atom builds
Change-Id: Ie92e605c499f128335a8da7cfefa7e6ae367a223
2016-01-12 19:45:57 -08:00
Elliott Hughes
9817c6c0cf Merge "Fix <sys/sysmacros.h>." 2016-01-12 23:16:00 +00:00
Elliott Hughes
9361ad3f80 Fix <sys/sysmacros.h>.
1. The definitions were wrong.
2. The definitions were inline functions.
3. The definitions were polluting the namespace even for code that doesn't
   want BSD cruft.

Note that everybody will still get these by default, because you still get
all the BSD stuff by default.

Bug: http://b/12706131
Change-Id: I062ecd09feef7a6e8ba1922d465b96a9c4bf4f4e
2016-01-12 14:43:27 -08:00
Colin Cross
c23aeb8414 Rearrange build files to support USE_SOONG=true
Building with USE_SOONG=true will build with an Android.bp file if it is
present in the directory, otherwise an Android.mk file.  Only a few of
the bionic directories compile with soong, so include all of them from
the top level Android.mk file and remove the top level Android.bp file.
Individual subdirectories with Android.bp files will use soong with
USE_SOONG=true.

Change-Id: Idf8d7977ea4668fa646be25b543bf9d3773de615
2016-01-12 13:42:21 -08:00
Elliott Hughes
906e67fdba Merge "Add a getifaddrs(3) debugging tool." 2016-01-12 20:57:48 +00:00
Chih-hung Hsieh
2c7d1e67e0 Merge "Explicit binary op order for both gcc and clang/llvm." 2016-01-12 19:41:46 +00:00
Chih-Hung Hsieh
592c7b4cd7 Explicit binary op order for both gcc and clang/llvm.
* gcc assembler parses (1 << n - 1) as ((1 << n) - 1)
* llvm assembler parses (1 << n - 1) as (1 << (n - 1))

BUG: 26289334
Change-Id: Iaaa3d07f59c0f87cb1b80b9a1c4e765b66846791
2016-01-12 09:48:09 -08:00
Elliott Hughes
5d84373c69 Add a getifaddrs(3) debugging tool.
...disguised as a test, because that's the easiest way to keep an eye on it.

Change-Id: Iec2531183790d12aec561d27645e5d400f69efbf
2016-01-12 08:45:16 -08:00
Colin Cross
a3f9fca568 Update Android.bp for changes to Android.mk
Change-Id: Ie01e326e2776c699237b156155610d08801c0cd4
2016-01-11 15:34:24 -08:00
Elliott Hughes
6b5139856d Merge "Add basic tests for <net/if.h>." 2016-01-11 21:43:58 +00:00
Elliott Hughes
588213a37d Add basic tests for <net/if.h>.
Bug: http://b/26447711
Change-Id: I9bbcdffc07e99c98e367a63de861ddc7b274d579
2016-01-11 13:18:20 -08:00
Elliott Hughes
8d809f18c7 Merge "Handle AF_PACKET in getifaddr(3)." 2016-01-11 21:16:42 +00:00
Yi Kong
fdb2963e0a Handle AF_PACKET in getifaddr(3).
Also fix a bug where we were mutating the address/broadcast address
of an existing entry rather than the new entry, and use 'const' to
ensure we don't make that mistake again.

Change-Id: I31c127a5d21879b52c85cd0f7ed2e66554a21e39
2016-01-08 19:18:44 -08:00
Elliott Hughes
195b85a80f Merge "Defend against -fstack-protector in libc startup." 2016-01-08 18:54:01 +00:00
Dimitry Ivanov
2afe5af77f Merge "Move __aeabi* symbols to LIBC_N version" 2016-01-08 18:50:13 +00:00
Dimitry Ivanov
6d142bcf34 Move __aeabi* symbols to LIBC_N version
We had these symbols incorrectly versioned as LIBC_PRIVATE
in M release. This change moves __aeabi* symbols from LIBC
to LIBC_N and adds __gnu_Unwind_Find_exidx to the list

Bug: https://github.com/android-ndk/ndk/issues/1
Change-Id: I0b353012adeacb00ae29ea10c63b9d1cf1cadbe7
2016-01-08 10:13:16 -08:00
Elliott Hughes
42d949ff9d Defend against -fstack-protector in libc startup.
Exactly which functions get a stack protector is up to the compiler, so
let's separate the code that sets up the environment stack protection
requires and explicitly build it with -fno-stack-protector.

Bug: http://b/26276517
Change-Id: I8719e23ead1f1e81715c32c1335da868f68369b5
2016-01-06 20:06:08 -08:00
Josh Gao
988e71b2b2 Merge "Kill BOARD_MALLOC_ALIGNMENT." 2016-01-06 22:49:30 +00:00
Josh Gao
63a42070fc Kill BOARD_MALLOC_ALIGNMENT.
Bug: http://b/26403338
Change-Id: Iba4006277fdb7c7ca60542c517634ae86c847b4f
2016-01-06 14:30:26 -08:00
Josh Gao
e1f8c66d0b Merge "Replace MALLOC_IMPL with MALLOC_SVELTE." 2016-01-06 20:08:13 +00:00
Elliott Hughes
32388ba4dc Merge "Temporary hack to avoid stack protector crashes." 2016-01-06 19:52:43 +00:00
Tom Cherry
9353089262 Merge "Revert "system_properties.cpp: special case ro.* properties"" 2016-01-06 19:16:31 +00:00
Tom Cherry
e97ce31fe7 Revert "system_properties.cpp: special case ro.* properties"
This reverts commit c5fd81ab25.

Bug: 26416032

Change-Id: Id2d6761fdf55efa28c0b08b597daaa5cd381d758
2016-01-06 19:13:54 +00:00
Elliott Hughes
2489161ce5 Temporary hack to avoid stack protector crashes.
It'll take me a while to refactor things cleanly, but if we just want
something that boots for testing...

Bug: http://b/26276517
Change-Id: I24729d3dc546e36e0eff383f0d1d05c3aa1f2e0b
2016-01-06 11:12:06 -08:00
Elliott Hughes
1464f6d8d9 Merge "Remove mktime_tz." 2016-01-06 19:02:19 +00:00
Dimitry Ivanov
4664c14fa4 Merge "Temporary move __udivdi3 back to LIBC for x86" 2016-01-06 18:37:19 +00:00
Dimitry Ivanov
bc02fb964a Temporary move __udivdi3 back to LIBC for x86
Bug: http://b/26289334
Bug: http://b/26413821
Change-Id: Ifb0eb6f16aca54cb4a9184a6394992ee57dd3408
2016-01-06 18:36:40 +00:00
Elliott Hughes
76dfa6e351 Remove mktime_tz.
Bug: http://b/15765976
Change-Id: Ifc8cd19ae621e611d66173ae927ef9a0445965c1
2016-01-06 09:15:02 -08:00
Dimitry Ivanov
74d7aa1c34 Merge "Fix gcc+arm builds" 2016-01-06 04:43:26 +00:00
Dimitry Ivanov
6f72fdede8 Fix gcc+arm builds
gcc requires unique names of symbols for .symver

Bug: http://b/26391427
Change-Id: I6392e34a45a37245fd4e53fb54243be73f443313
2016-01-05 20:41:06 -08:00
Dimitry Ivanov
52fd4ca0a0 Merge "Deprecate bzero" 2016-01-06 02:33:41 +00:00
Dimitry Ivanov
609156e266 Merge "Export public __aeabi* symbols as LIBC_PRIVATE" 2016-01-06 02:19:27 +00:00
Dimitry Ivanov
d90d067312 Export public __aeabi* symbols as LIBC_PRIVATE
But keep LIBC as default version for them

Bug: http://b/26391427
Bug: http://b/26410625
Change-Id: I819e354bbba482d1f983d9be15c23fcce10e5dd9
2016-01-05 18:18:33 -08:00
Elliott Hughes
031dfe198b Merge "Fix a broken link in a comment." 2016-01-06 01:27:09 +00:00
Elliott Hughes
7d27b68ef4 Merge "Tidy up KernelArgumentBlock::getauxval." 2016-01-06 01:24:37 +00:00
Dimitry Ivanov
6134ed8b8f Deprecate bzero
bzero is hashdefined to memset in strings.h and it
was removed from POSIX 2008.

Bug: http://b/26407170
Change-Id: Ia6d54f0e314dc7f5f3fbad0e9b00344f49f77d43
2016-01-05 17:06:45 -08:00
Nick Kralevich
ffa54cd7ba Merge "system_properties.cpp: special case ro.* properties" 2016-01-06 00:43:48 +00:00
Elliott Hughes
40c2bf6cf6 Fix a broken link in a comment.
Bug: https://code.google.com/p/android/issues/detail?id=197784
Change-Id: I2f9e5bc2dd2b8a6992c7c55bc856e4a323c7c8a8
2016-01-05 16:33:33 -08:00
Nick Kralevich
c5fd81ab25 system_properties.cpp: special case ro.* properties
Currently, reads of ro.* properties are treated differently than
writes of ro.* properties. When writing an ro.* property, we ignore
the "ro." portion of the property, and base the security decision
on the label of the remaining portion.

See e7a9e52740/init/property_service.cpp
line 120-126

For example, for writing, the label associated with
"ro.build.fingerprint" comes from the /property_contexts file
entry:

  # ro.build.fingerprint is either set in /system/build.prop, or is
  # set at runtime by system_server.
  build.fingerprint       u:object_r:fingerprint_prop:s0

However, we fail to follow this same special case when sorting
properties into files. Instead, ro.build.fingerprint is assigned
u:object_r:default_prop:s0 instead of u:object_r:fingerprint_prop:s0

Ignore the "ro." portion when sorting properties into files.
This will make reads and writes of properties use the same label.

Bug: 21852512
Change-Id: Ie88ffc6b78b31fc8ddf370ae27c218546fb25a83
2016-01-05 16:30:17 -08:00
Elliott Hughes
63fbb233cb Tidy up KernelArgumentBlock::getauxval.
Correct the comment, and remove the unused functionality. getauxval(3) does
now set errno to let you know it failed to find anything, but since none of
this function's callers care anyway it seems safer to leave errno untouched
until we actually have a demonstrated need for it.

Bug: https://code.google.com/p/android/issues/detail?id=198111
Change-Id: I232a42dc5a02c8faab94c7d69bef610408276c23
2016-01-05 16:29:33 -08:00