Commit graph

31625 commits

Author SHA1 Message Date
Josh Gao
12a0eb6c6d Add fdtrack docs.
Test: none
Change-Id: I035be350cfd40cdbff1e95332f96841001922454
2020-08-31 19:12:46 -07:00
Evgeny Eltsin
95dbcfaf04 Merge "Fix __clone_for_fork attributes" 2020-08-03 18:28:25 +00:00
Treehugger Robot
0f4bdb04fb Merge "linker: Cleanup for Android's inclusive language guidance" 2020-08-02 14:48:01 +00:00
Evgeny Eltsin
61be80182c Fix __clone_for_fork attributes
Avoid name mangling and ensure no export.

Bug: 162625883
Test: bionic-unit-tests
Change-Id: If7700772e0a8c7a52be890d55ecdac33185f6b78
2020-08-01 13:33:01 +02:00
Ryan Prichard
89f907cfe4 Merge "Remove debug.ld.greylist_disabled property" 2020-07-31 23:56:10 +00:00
Elliott Hughes
907e0aebd2 Merge "Sync with upstream OpenBSD." 2020-07-31 23:47:05 +00:00
Treehugger Robot
0cfe54966b Merge "Sync with upstream NetBSD." 2020-07-31 21:14:34 +00:00
Elliott Hughes
26b06073f6 Sync with upstream OpenBSD.
Test: treehugger
Change-Id: I1fc649ba5d79a3d95242c6b2240dbb05c85d30e9
2020-07-31 13:01:38 -07:00
Elliott Hughes
79c91ae43b Sync with upstream NetBSD.
Test: treehugger
Change-Id: Ia88698f032c017fabc8d24bab12f33ed0b55e65e
2020-07-31 12:59:48 -07:00
Treehugger Robot
cde09224eb Merge "More cleanup for #inclusivefixit." 2020-07-31 19:09:57 +00:00
Elliott Hughes
cf346532fc More cleanup for #inclusivefixit.
Found manually with grep, since the script seems to miss stuff.

Test: treehugger
Change-Id: I5933cbade9792801d4a0bec1ccb077efa6ad8fbc
2020-07-31 10:35:03 -07:00
Luke Huang
30f2f053f2 linker: Cleanup for Android's inclusive language guidance
1. Cleanup for #inclusivefixit. (whitelisted -> allowed_libs)
2. Support the old term for backwards compatibility. (Also update test.)
3. Fix the formatting errors found by clang-format.

See https://source.android.com/setup/contribute/respectful-code
for reference.

Bug: 161896447
Test: atest linker-unit-tests linker-benchmarks
Change-Id: I19dbed27a6d874ac0049cb7b67d2cb0f75369c1b
2020-07-31 11:37:28 +08:00
Ryan Prichard
238609328f Remove debug.ld.greylist_disabled property
This property provided a way to disable the greylist, for testing
whether an app targeting < 24 still works. Instead of turning off the
greylist, though, an app developer should simply target a newer API.

(If app developers really need this property for testing, they can
still use it on versions of Android between N and R, inclusive.)

Update language to comply with Android's inclusive language guidance

See https://source.android.com/setup/contribute/respectful-code for reference

#inclusivefixit

Bug: http://b/162536543
Test: bionic-unit-tests
Change-Id: Id1eb2807fbb7436dc9ed7fe47e15b7d165a26789
2020-07-30 19:29:17 -07:00
Treehugger Robot
b1d27cab96 Merge "Cleanup for #inclusivefixit." 2020-07-30 22:47:23 +00:00
Elliott Hughes
c2c9b420bd Cleanup for #inclusivefixit.
Not sure how this one got missed earlier.

Test: treehugger
Change-Id: Ia4e6f62a3d33d3ac01e3d7db836caadeed0ff63b
Bug: 161896447
2020-07-30 21:19:45 +00:00
Christopher Ferris
3025f128f3 Merge "Add support for new scudo mallopt options." 2020-07-29 16:38:06 +00:00
Christopher Parsons
5b2e331211 Merge "Move prebuilt library dependencies of bionic-unit-tests to Blueprint" 2020-07-29 15:37:15 +00:00
Chris Parsons
cab794c22f Move prebuilt library dependencies of bionic-unit-tests to Blueprint
Test: atest CtsBionicTestCases
Test: m bionic-unit-tests && adb sync data && \
  adb shell /data/nativetest[64]/bionic-unit-tests/bionic-unit-tests
Change-Id: I94b1eacfe496375853a476bd6c6702d09cfdbcce
2020-07-28 19:01:00 -07:00
Christopher Ferris
8844879212 Add support for new scudo mallopt options.
Bug: 162092537

Test: Ran new unit tests.
Change-Id: I4b7d17a9e98166c03cd153eb9e9d847693914ea3
2020-07-28 18:20:32 -07:00
Treehugger Robot
72ac49dbd8 Merge "Remove pylintrc." 2020-07-29 01:12:56 +00:00
Treehugger Robot
4d3802baa4 Merge "Cleanup for #inclusivefixit." 2020-07-28 19:38:41 +00:00
Tom Cherry
15786e407f Cleanup for #inclusivefixit.
Test: build
Change-Id: Ib2f264feae69fbbda5fe1e1c315b6116ecf520fa
2020-07-28 10:56:12 -07:00
Dan Albert
9dd11412a6 Remove pylintrc.
Considering none of the files in this directory are pylint clean I
don't think this is being used. They also seem to use a mix of styles
so we need to either unify or split things into subdirectories if we
want to use pylint here.

Test: None
Bug: http://b/161896447
Change-Id: I5bc298bd64d44cc10d3d28121666e7893222ea96
2020-07-27 13:40:28 -07:00
Stephen Hines
9c6d60d073 Merge "Specify sections to merge in segment_gap_outer.lds more precisely" 2020-07-24 22:10:28 +00:00
Stephen Hines
15027e048f Specify sections to merge in segment_gap_outer.lds more precisely
https://reviews.llvm.org/D75225 changed the way that orphan sections are
retained, breaking this test. The test relied on these sections being
merged in an implementation-defined order that no longer holds true. We
can use custom sections to place the symbols we want more precisely.

Bug: http://b/161943302
Test: adb shell /data/nativetest64/bionic-unit-tests/bionic-unit-tests --gtest_filter=dlfcn.segment_gap --no_isolate
Change-Id: I65656080e39be16833191cb92d3d4c41e409b216
2020-07-24 10:57:48 -07:00
Treehugger Robot
a83577ab13 Merge "Cleanup for #inclusivefixit." 2020-07-24 16:51:35 +00:00
Treehugger Robot
613334b302 Merge "Cleanup for #inclusivefixit." 2020-07-24 10:28:07 +00:00
Elliott Hughes
3f3161093b Cleanup for #inclusivefixit.
Test: treehugger
Change-Id: Iec1af942b5dee37f08ad390afe9fbdb79c47c085
2020-07-23 13:43:23 -07:00
Elliott Hughes
cfd8f581fa Cleanup for #inclusivefixit.
The comment and pragma for GCC genuinely don't seem to be needed for
Clang.

Clarify the comment about the two ways in which clang_fortify_tests.cpp
is used.

Test: treehugger
Change-Id: Icb48a5848c005104ab2d2456da3978bbaf7e158c
2020-07-23 13:41:53 -07:00
Elliott Hughes
6ba173a3f6 Merge "Changes for #inclusivefixit." 2020-07-22 19:26:37 +00:00
Neil Fuller
9b7338c6bb Merge "Track name changes in the tzdata format" 2020-07-22 09:50:10 +00:00
Bram Bonné
4378ced55d Merge "Resolve interface flags using SIOCGIFFLAGS ioctl" 2020-07-22 07:45:56 +00:00
Elliott Hughes
68ae6ad12e Changes for #inclusivefixit.
Test: treehugger
Change-Id: I7ff0496c5c2792a41781e74634247f55b0548213
2020-07-21 16:34:58 -07:00
Evgenii Stepanov
c79ea23941 Merge "Remove stack address check in cfi_basic test." 2020-07-21 19:58:18 +00:00
Evgenii Stepanov
67406dced7 Merge "Pagetable-friendly shared library address randomization." 2020-07-21 19:50:55 +00:00
Bram Bonné
8e20ac4413 Resolve interface flags using SIOCGIFFLAGS ioctl
Normally, getifaddrs() gets its information about interface flags from
RTM_NEWLINK messages. With the ability for non-system apps to send
RTM_GETLINK messages going away, resolve these flags by performing a
SIOCGIFFLAGS ioctl call instead.

This fixes a bug where the flags were erroneously copied over from an
ifaddrmsg's ifa_flags.

Bug: 141455849
Test: atest bionic-unit-tests-static
Test: Connect to wireless network.
Test: Call getifaddrs() from a non-system app targeting API R+, verify
that the interface flags are correct.

Change-Id: I552f3b9d21072f59ee6f0890f47cb1bdf3cfcf20
2020-07-21 19:14:12 +02:00
Evgenii Stepanov
0f6b504e0c Remove stack address check in cfi_basic test.
This is not actually a property that is guaranteed by the bionic
implementation of CFI shadow. Since the gaps between libraries are not
completely inaccessible, it is possible for a stack mapping to sneak in,
which would cause the callback to register in the test library.

This is not a correctness issue in CFI as the actual __cfi_check
callback will reject such address anyway, at a small CPU cost.

Bug: 156218352
Test: CtsBionicTestCases-cfi_test#basic
Change-Id: I8d04fb7132e1eac2a8abfbc48a37c8eac6e25a09
2020-07-20 15:52:06 -07:00
Evgenii Stepanov
e0848bbf89 Pagetable-friendly shared library address randomization.
Add inaccessible gaps between shared libraries to make it harder for the
attackers to defeat ASLR by random probing.

To avoid excessive page table bloat, only do this when a library is
about to cross a huge page boundary, effectively allowing several
smaller libraries to be lumped together.

Bug: 158113540
Test: look at /proc/$$/maps
Change-Id: I39c0100b81f72447e8b3c6faafa561111492bf8c
2020-07-16 13:57:20 -07:00
Tom Cherry
a96099e130 Merge "Don't test pw_shell for old vendor images" 2020-07-10 19:26:23 +00:00
Tom Cherry
b9fa04d805 Don't test pw_shell for old vendor images
R GSI on P product tests fail since pw_shell has changed.  This value
has no practical use on Android, so we ignore testing it for older
vendor images.

Bug: 160937247
Test: this test does/doesn't run appropriately
Change-Id: Ie485bd019b3826e71ad19131effcbb002f888d52
2020-07-10 10:42:16 -07:00
Evgenii Stepanov
b5f301eaaf Merge "Revert "Add randomized padding around shared library mappings."" 2020-07-06 22:18:45 +00:00
Evgenii Stepanov
474f2f5c8b Revert "Add randomized padding around shared library mappings."
This reverts commit a8cf3fef2a.

Reason for revert: memory regression due to the fragmentation of the page tables
Bug: 159810641
Bug: 158113540

Change-Id: I6212c623ff440c7f6889f0a1e82cf7a96200a411
2020-07-06 19:27:55 +00:00
Kiyoung Kim
9963adb975 Merge "Disable warning message for missing linker config in some cases" 2020-07-01 08:03:41 +00:00
Kiyoung Kim
46e731caf5 Disable warning message for missing linker config in some cases
There are some special cases - such as init process - when linker
configuration is not expected to exist. This change disables warning
message that generated linker configuration does not exist in those
cases.

Bug: 158800902
Test: Tested from cuttlefish that warning message is not generated from
init

Change-Id: Ie2fbb5210175cf1e6f2b7e638f57c3b74d395368
2020-06-30 09:21:07 +09:00
Treehugger Robot
29cff99e08 Merge "Improve diagram in malloc_heapprofd." 2020-06-29 20:55:35 +00:00
Florian Mayer
c618960288 Improve diagram in malloc_heapprofd.
Include the functions that cause the state transitions.

Change-Id: I262e74c58e12316996451c418ab222f4512d005c
2020-06-26 14:27:58 +02:00
Treehugger Robot
b76e8e610c Merge "strings.h: undef ffs/ffsl/ffsll." 2020-06-25 19:11:08 +00:00
Elliott Hughes
c9889fdf15 strings.h: undef ffs/ffsl/ffsll.
Protect against software that #defines these, such as mesa3d.

Test: treehugger
Change-Id: I22e937423967676ea332956289419d48bb7c2cd3
2020-06-25 08:46:06 -07:00
Christopher Ferris
d381b26576 Merge "Remove references to libc_scudo." 2020-06-24 03:16:47 +00:00
Treehugger Robot
536b7ec5ac Merge "Revert "Disallow vmsplice(2) for all zygote-spawned processes."" 2020-06-23 19:44:54 +00:00