Commit graph

29698 commits

Author SHA1 Message Date
Vic Yang
25b6ea7e25 Merge "linker: Set VMA name for bss sections"
am: a40a1442a8

Change-Id: I0f4c3458f6e8d76311b3e691581755191011822b
2019-08-14 18:04:40 -07:00
Treehugger Robot
a40a1442a8 Merge "linker: Set VMA name for bss sections" 2019-08-15 00:50:49 +00:00
Vic Yang
1bf62b24ab linker: Set VMA name for bss sections
The linker currently sets VMA name ".bss" for bss sections in DSOs
loaded by the linker.  With this change, the linker now also sets VMA
name for bss sections in the linker itself and the main executable, so
that they don't get left out in various accounting.

Test: Run 'dd' and check its /proc/<pid>/maps.
Change-Id: I62d9996ab256f46e2d82cac581c17fa94836a228
2019-08-14 13:52:48 -07:00
Xin Li
9ae510c09b DO NOT MERGE - Skip qt-dev-plus-aosp-without-vendor (5713463) in stage-aosp-master
Bug: 134405016
Change-Id: I5835c5202ea1793c7f31792a75919408b2fbcfe2
2019-08-14 11:35:07 -07:00
Kiyoung Kim
7660ec25aa Merge "Use generated linker config"
am: 6b0d1cd3ac

Change-Id: If716bee32b1d9ee244e190bc540e4689f57d0340
2019-08-14 02:47:14 -07:00
Kiyoung Kim
6b0d1cd3ac Merge "Use generated linker config" 2019-08-14 09:28:23 +00:00
Josh Gao
6f844f936f Merge "leak_test: use tgkill to check if threads are alive."
am: 80d85f72dd

Change-Id: I2cb534827a3afa286305d093d498a497c688a3c0
2019-08-13 18:48:23 -07:00
Jiyong Park
bba48e1671 Merge "Don't create anonymous namespace"
am: d82eb35c76

Change-Id: Id231ccaf509cfb56d1265fba32b117d0430d18c5
2019-08-13 18:41:34 -07:00
Josh Gao
80d85f72dd Merge "leak_test: use tgkill to check if threads are alive." 2019-08-14 01:30:51 +00:00
Jiyong Park
d82eb35c76 Merge "Don't create anonymous namespace" 2019-08-14 01:21:30 +00:00
Josh Gao
253ef12f50 leak_test: use tgkill to check if threads are alive.
If one of our threads exits and a new process shows up with the same
tid, we would previously loop until that process exits, leading to
flakiness in tests.

Also fix use of uninitialized memory that happens when threads_count !=
kThreadCount.

Bug: http://b/139315254
Test: /data/nativetest/bionic-unit-tests/bionic-unit-tests --gtest_filter="pthread_leak.detach" on cuttlefish
Change-Id: I2aad7f3f105aeba87c3929bfce53ef08e1484b2d
2019-08-13 16:13:39 -07:00
Tom Cherry
77da70ef5b Merge "Fix timespec.h documentation"
am: 6864fc8d06

Change-Id: I8761ad4678ba7d59c0f5500d50ded116c30cd1ff
2019-08-13 09:25:14 -07:00
Tom Cherry
6864fc8d06 Merge "Fix timespec.h documentation" 2019-08-13 15:56:06 +00:00
Tom Cherry
a960142fe3 Fix timespec.h documentation
There are 1,000,000,000 nanoseconds in a second.

Test: n/a
Change-Id: I8ce622ce3c60d7d5b06a056cfd0e6bea976b5aab
2019-08-12 13:34:03 -07:00
Pete Gillin
993434994e Merge "Revert "fdsan: make fatal by default.""
am: c6c17ac1e8

Change-Id: I8f5bc30ea2077318e1196cef81bff85bd42a06a2
2019-08-09 04:50:03 -07:00
Pete Gillin
c6c17ac1e8 Merge "Revert "fdsan: make fatal by default."" 2019-08-09 11:29:36 +00:00
Pete Gillin
76351e3e3f Revert "fdsan: make fatal by default."
This reverts commit 66b5e3ca19.

Reason for revert: Causes installd_dexopt_test to fail. Presumably there is an existing issue which this change is turning into a hard fail, so that needs to be fixed before this can be rolled forwards. See b/139092341.

Bug: 139092341
Bug: 137788030
Change-Id: I1beccddff64c86541bc003b9b009f4046ec9cbf1
2019-08-09 11:18:39 +00:00
Roland Levillain
10541de1fa Merge "Fix some typos in the linker configuration file format documentation."
am: 639ad55176

Change-Id: I0f694b4dd0d39bf96d0c45e691aa2bab6d2a4170
2019-08-08 06:21:39 -07:00
Roland Levillain
639ad55176 Merge "Fix some typos in the linker configuration file format documentation." 2019-08-08 12:55:57 +00:00
Jiyong Park
25bedfd3dd Don't create anonymous namespace
Anonymous namespace is not created separately. When a regular namespace
is created with ANDROID_NAMESPACE_TYPE_ALSO_USED_AS_ANONYMOUS, that
namespace is used as the anonymous namespace.

Bug: 130388701
Test: CtsBionicTestCases
Change-Id: Ie449a59f303487a7a9ff6fff98e6148e9f968fd2
2019-08-08 16:02:15 +09:00
Christopher Ferris
ccb53ac3b8 Merge "Change all references to PSS to RSS."
am: 89a1407255

Change-Id: Ibba53d2d48fdb83d02408a38e21a52935aa1ff30
2019-08-07 21:40:51 -07:00
Christopher Ferris
89a1407255 Merge "Change all references to PSS to RSS." 2019-08-08 04:14:15 +00:00
Tom Cherry
37ba89a702 Merge "Remove now unneeded #undef in __cxa_guard.cpp"
am: 5dea560e4c

Change-Id: Ibcf3c75a084435c05739a2720842961b8094fc85
2019-08-07 16:29:29 -07:00
Tom Cherry
5dea560e4c Merge "Remove now unneeded #undef in __cxa_guard.cpp" 2019-08-07 23:04:50 +00:00
Christopher Ferris
05197f7d03 Change all references to PSS to RSS.
RSS is the real measurement by which an allocator should be measured
since RSS is the real memory consumed by the process. PSS is a shared
value.

For memory_replay, PSS and RSS should be the same, so this didn't really
matter in practice, but it's better to use the correct name of RSS.

Also, add a small section about fragmentation.

Bug: 138394907

Test: NA
Change-Id: Ic6f982f9c4619f452342e7c105818e33b8b85e44
2019-08-07 15:34:11 -07:00
Josh Gao
db7f956bca Merge "fdsan: make fatal by default."
am: 592b5f52fd

Change-Id: I65cfaaee6c892033778255c02e50c0717db751d3
2019-08-07 13:28:50 -07:00
Josh Gao
592b5f52fd Merge "fdsan: make fatal by default." 2019-08-07 19:53:40 +00:00
Josh Gao
66b5e3ca19 fdsan: make fatal by default.
Make fdsan fatal by default on native processes, and Java processes that
target R or later.

Bug: http://b/137788030
Test: manual
Change-Id: I5900efc606fc0d47b69223574ad7dca89afe4eda
2019-08-07 19:53:14 +00:00
Tom Cherry
08baac348c Remove now unneeded #undef in __cxa_guard.cpp
Before aosp/1086558, this was needed, since we would have
_USING_LIBCXX defined, yet <atomic> was not available, so we'd run
into compiler issues.  After that change, we're using
__has_include(<atomic>) so this is no longer an issue.

Test: build
Change-Id: Ia81d343000e7d90f07422120fc1e1eb5becb01aa
2019-08-07 11:10:22 -07:00
Roland Levillain
bd6ccf91fb Fix some typos in the linker configuration file format documentation.
Test: n/a
Change-Id: I17d9f5aaf066d335fd5ba1af77a829d20de2bfd7
2019-08-07 18:45:45 +01:00
Kiyoung Kim
35e3b4b013 Use generated linker config
Linker config now generates ld.config.txt under /dev/linkerconfig from
init. To use this, this change updates linker to pick up
/dev/linkerconfig/ld.config.txt if system property
(sys.linker.use_generated_config) is true.

Bug: 138920271
Test: m -j && tested from cuttlefish
Change-Id: I0f527741ace2d512b45fd72c301aa4cfcfe17a71
2019-08-07 19:24:13 +09:00
Tom Cherry
f2b0491545 Merge "linker: Remove setting _USING_LIBCXX"
am: a08626af27

Change-Id: I0bfe6fd5aa5ea42de116e145e48a3c960e53be78
2019-08-06 17:12:28 -07:00
Tom Cherry
a08626af27 Merge "linker: Remove setting _USING_LIBCXX" 2019-08-06 23:14:35 +00:00
Elliott Hughes
15ae87b2fb Merge "Add memfd_create(2) and mlock2(2)."
am: da32ff104b

Change-Id: I2609877a7984e137a785614b6eff01d728472b76
2019-08-06 10:40:22 -07:00
Elliott Hughes
da32ff104b Merge "Add memfd_create(2) and mlock2(2)." 2019-08-06 17:08:13 +00:00
Christopher Ferris
d9b5212964 Merge "Update to kernel headers v5.2.6."
am: 5d3ba4ed9d

Change-Id: I508b9c7be6b4babde787f74cdd4cc016ad0e3ec7
2019-08-05 21:46:24 -07:00
Christopher Ferris
5d3ba4ed9d Merge "Update to kernel headers v5.2.6." 2019-08-06 04:30:52 +00:00
Elliott Hughes
a928758ac3 Merge "Document the "one big library" trick."
am: 10a67b849e

Change-Id: I27681d9d278339351dfc4f423aa8ea457c35e2de
2019-08-05 20:40:17 -07:00
Peter Collingbourne
6239798fae Merge "linker: Add library load and unload hooks for HWASan."
am: 32a628b286

Change-Id: I4dc4e57f71fea9241cb6a3b3ed978370efb7b401
2019-08-05 20:39:52 -07:00
Treehugger Robot
10a67b849e Merge "Document the "one big library" trick." 2019-08-06 03:21:34 +00:00
Treehugger Robot
32a628b286 Merge "linker: Add library load and unload hooks for HWASan." 2019-08-06 03:19:44 +00:00
Tom Cherry
2e9c8cffd8 Merge "Update docs for clockwait/clocklock functions"
am: f8a7ec7cd4

Change-Id: I4c77a44afb2cd44c2ae0f828fa3d529d8e53459a
2019-08-05 18:19:24 -07:00
Treehugger Robot
f8a7ec7cd4 Merge "Update docs for clockwait/clocklock functions" 2019-08-06 00:58:29 +00:00
Peter Collingbourne
6533208aaa linker: Add library load and unload hooks for HWASan.
These hooks notify the HWASan runtime library whenever a library is loaded
or unloaded so that it can update its shadow memory.

Bug: 138159093
Test: walleye_hwasan-userdebug boots with+without https://reviews.llvm.org/D65770
Change-Id: I6caf2a6540ed2c0d94db444e806a3c7ba504cabb
2019-08-05 16:51:01 -07:00
Elliott Hughes
3230b6851b Document the "one big library" trick.
Bug: http://b/133823482
Test: N/A
Change-Id: I3a70fe563f47d6f2311415c84a3c5f9f7b575e54
2019-08-05 16:40:52 -07:00
Elliott Hughes
3d24d2b088 Add memfd_create(2) and mlock2(2).
These are old enough now that the latest devices will have kernels that
support them.

Also add basic doc comments to <sys/mman.h>.

Test: treehugger
Change-Id: I1b5ff5db0b6270f5c374287cac1d6a751a0259f5
2019-08-05 16:31:08 -07:00
Tom Cherry
cd70aa47d2 linker: Remove setting _USING_LIBCXX
As of aosp/1086558, stdatomic.h directly checks for the presence of
<atomic> instead of checking _USING_LIBCXX, so these lines are
obsolete.

Test: build
Change-Id: Icfdb47b3ad109421b3413041f3d3027e2c0b518e
2019-08-05 14:36:46 -07:00
Tom Cherry
f0d9271fe2 Update docs for clockwait/clocklock functions
Test: n/a
Change-Id: Ie4853912c9ed63d29121e62406682896012962ec
2019-08-05 14:13:25 -07:00
Elliott Hughes
50531818ac Merge "Update seccomp whitelist."
am: a5c9c7c565

Change-Id: I472ec60e9a3a9f9a79a8a431f50f7c162950231d
2019-08-05 13:08:53 -07:00
Christopher Ferris
fa59a10bcd Update to kernel headers v5.2.6.
Also, fix a bug in update_all.py when the syscalls file does not change.

Test: Builds and boots on a taimen.
Change-Id: If85b00daef2c176f804a0861894f5bbca9c6d5df
2019-08-05 12:59:58 -07:00