Commit graph

31023 commits

Author SHA1 Message Date
Automerger Merge Worker
87a632bd75 Merge "[GWP-ASan] Remove log line from init." am: 679d8e19cf
Change-Id: Ifd86e6b0bf766b05832bb5d4d5670ecba2bc854e
2020-02-19 01:28:02 +00:00
Mitch Phillips
679d8e19cf Merge "[GWP-ASan] Remove log line from init." 2020-02-19 01:24:49 +00:00
Automerger Merge Worker
d975d10334 Merge "Remove unused declarations." am: 1c2efaaa11
Change-Id: I6f5723efcb0a5835e88b626cfce940dae5822b83
2020-02-19 01:20:40 +00:00
Mitch Phillips
4d62ffc5b1 [GWP-ASan] Remove log line from init.
The notification that GWP-ASan is enabled causes ART tests to break.
Remove the log for now.

Bug: 135634846
Bug: 149790891
Test: (Attempt to fix the ART tests).
Change-Id: I8a7751a838a64f160b3b7b9f07752bb64644b9db
2020-02-18 17:16:23 -08:00
Elliott Hughes
1c2efaaa11 Merge "Remove unused declarations." 2020-02-19 01:01:51 +00:00
Automerger Merge Worker
21cfe020c7 Merge "Allow nested usage of ScopedDisableMTE." am: 6ed60cc1ab
Change-Id: Ifc9c20b5beb5a700da3474e770bad8cce503e4fd
2020-02-18 22:55:22 +00:00
Peter Collingbourne
6ed60cc1ab Merge "Allow nested usage of ScopedDisableMTE." 2020-02-18 22:41:17 +00:00
Automerger Merge Worker
ff55587dfe Merge "[GWP-ASan] Enable GWP-ASan w/ process sampling ~1%." am: f73778abae
Change-Id: I710f41574f96724589d9de7271b341e09342b9c2
2020-02-18 22:06:31 +00:00
Mitch Phillips
f73778abae Merge "[GWP-ASan] Enable GWP-ASan w/ process sampling ~1%." 2020-02-18 21:47:48 +00:00
Elliott Hughes
36359f47a2 Remove unused declarations.
Test: treehugger
Change-Id: Ia96dc01df0d26e2e3023bebab23de82ca8e389f7
2020-02-18 13:25:22 -08:00
Peter Collingbourne
c8cef93f24 Allow nested usage of ScopedDisableMTE.
An upcoming change to scudo will cause us to start calling
android_unsafe_frame_pointer_chase() from within the allocator. Since this
function uses ScopedDisableMTE, this would otherwise make it unsafe to use
the allocator from within ScopedDisableMTE. This seems like an unreasonable
restriction, so make ScopedDisableMTE save the PSTATE.TCO state in the
constructor and restore it in the destructor.

Bug: 135772972
Change-Id: I47e18d5fb2929efd5a58676488180cd85731007b
2020-02-18 13:13:57 -08:00
Mitch Phillips
ec930f26ec Merge "[GWP-ASan] [heapprofd] Use ephemeral dispatch table when death prof." am: 3d74451cf1
Change-Id: I120458cb22ac2bf0b23372351ee1580b72b2b662
2020-02-18 20:53:12 +00:00
Mitch Phillips
3d74451cf1 Merge "[GWP-ASan] [heapprofd] Use ephemeral dispatch table when death prof." 2020-02-18 20:13:11 +00:00
Mitch Phillips
0083b0fcb4 [GWP-ASan] Enable GWP-ASan w/ process sampling ~1%.
This patch enables GWP-ASan with process sampling.

**Note**: If you are visiting this patch because this broke a test or
otherwise is causing failures, please contact mitchp@ directly (or
respond to this patchset). GWP-ASan is designed to cause heap-based
memory safety bugs to manifest in SEGV on a sampled basis.

Bug: 135634846
Test: atest bionic-unit-tests gwp_asan_unittest
Change-Id: I58ca9373def105fdd718cf283482b3220b770698
2020-02-18 09:18:15 -08:00
Kiyoung Kim
3eb326b269 Merge "Deprecate sys.linker.use_generated_config property" am: 47ddeb1ae4
Change-Id: Ie34bbb8b70270dfa128554eaf0041d58f816c3d1
2020-02-18 01:01:34 +00:00
Kiyoung Kim
47ddeb1ae4 Merge "Deprecate sys.linker.use_generated_config property" 2020-02-18 00:52:59 +00:00
Mitch Phillips
c03856c58e [GWP-ASan] [heapprofd] Use ephemeral dispatch table when death prof.
GWP-ASan + heapprofd don't currently play nice together in some
circumstances. heapprofd thinks it's still an only child, and refuses to
accept the existence of its little brother, GWP-ASan.

If GWP-ASan is installed before heapprofd, then heapprofd is *required*
to respect that libc has a favourite child. If an allocation/free is passed
to heapprofd, then heapprofd *must* (eventually) pass that allocation/free to
GWP-ASan. If heapprofd doesn't do this, then a free() of a GWP-ASan
allocation can be passed to the system allocator.

This can happen in two places right now:
 1. The heapprofd hooks simply clobber any trace of what was
 previously in the default_dispatch_table when enabled through the
 heapprofd signal.
 2. Heapprofd can die when the system is under significant pressure.
 Some pipes can timeout, which ends up in the client calling ShutdownLazy()
 -> mallopt(M_RESET_HOOKS) -> DispatchReset(). This also clobbers any
 trace of the previous default_dispatch_table.

To fix both these problems, we fix heapprofd to restore the previous
default_dispatch_table whenever either circumstance happens. We do some
tricky copying to avoid race conditions on the malloc_dispatch_table in
fixing #1.

Bug: 135634846
Test: Run HeapprofdEndToEnd.NativeProfilingActiveAtProcessExit/ForkMode
a significant number of times with large amounts of system pressure (I
just run bionic-unit-tests-scudo in parallel). You will see some test
failures where heapprofd died due to system pressure, but never a death
from the allocator. Tests should never fail when the system isn't under
immense pressure.

Change-Id: I20ab340d4bdc35d6d1012da5ee1a25634428d097
2020-02-17 15:29:33 -08:00
Kiyoung Kim
1878690fdd Deprecate sys.linker.use_generated_config property
sys.linker.use_generated_config property was introduced at the beginning
of linkerconfig development to skip this generated configuration if it
does not work properly during dev. However, linkerconfig development is
now completed and is working properly from most of devices, so this
property is no longer in use. Therefore deprecating this property as
this would not be used.

Bug: 149335054
Test: m -j passed
Test: No linking error from Cuttlefish and Crosshatch
Change-Id: I0a1b3f36b69872862196b1613718a75d482e0a92
2020-02-15 04:35:37 +09:00
Elliott Hughes
0378750263 Merge "Remove dead code." am: 3597b0676b
Change-Id: Ic55c90e4a3e8e4405ea53f481ea2a7e1468e0dac
2020-02-14 17:33:03 +00:00
Elliott Hughes
3597b0676b Merge "Remove dead code." 2020-02-14 17:18:39 +00:00
Ivan Lozano
91d599d1e1 Merge "Remove XOM properties." am: c65b55cded
Change-Id: Ie3b459c942294847c3b5dc63eeaa22eee29a8cd5
2020-02-14 14:56:52 +00:00
Ivan Lozano
c65b55cded Merge "Remove XOM properties." 2020-02-14 14:42:49 +00:00
Elliott Hughes
56a9fda610 Remove dead code.
We haven't built any of this for years.

Test: treehugger
Change-Id: I3f8a85e9530af68587f47931d850eb60631a9481
2020-02-13 22:25:02 -08:00
Elliott Hughes
222b40d1a3 Merge "Clean up mips references in the headers." am: fb28c278b7
Change-Id: If8b64c6ca78d96cdffb6f82902cf775de3be6135
2020-02-14 05:11:21 +00:00
Elliott Hughes
fb28c278b7 Merge "Clean up mips references in the headers." 2020-02-14 04:57:31 +00:00
Elliott Hughes
5ac438e5da Clean up mips references in the headers.
Test: treehugger
Change-Id: I1997af980b9e46c7c530f9e6cb1aa407b2d63d76
2020-02-13 18:00:16 -08:00
Treehugger Robot
02a231a5f6 Merge "Remove unused mips/mips64 code from the linker." am: 477ebe3c29
Change-Id: Id1b41d4b93628c3ed13a5c6c9776458b749ef746
2020-02-14 01:56:05 +00:00
Treehugger Robot
477ebe3c29 Merge "Remove unused mips/mips64 code from the linker." 2020-02-14 01:33:44 +00:00
Elliott Hughes
d5bb1f1069 Merge "Clean up syscall stub/seccomp filter generation." am: 293ce2aa61
Change-Id: Ib839087882152794a6ca39ddd3c7af4f9cacbd2f
2020-02-14 01:06:50 +00:00
Elliott Hughes
293ce2aa61 Merge "Clean up syscall stub/seccomp filter generation." 2020-02-14 00:53:56 +00:00
Elliott Hughes
14798930ec Remove unused mips/mips64 code from the linker.
Test: treehugger
Change-Id: I42f1e4c492ac644cf78e7c1196ba9b3518f9c8f8
2020-02-13 15:58:48 -08:00
Elliott Hughes
2b499046f1 Clean up syscall stub/seccomp filter generation.
Test: treehugger
Change-Id: Iceb1c22d82b4d402166c3712b5b8b48a30937c6d
2020-02-13 14:21:55 -08:00
Elliott Hughes
d5b1005c4a Merge "Remove mips test workarounds." am: 7482e240cf
Change-Id: I649c384f24c0522a350883cce64876d965d810fa
2020-02-13 22:12:29 +00:00
Elliott Hughes
7482e240cf Merge "Remove mips test workarounds." 2020-02-13 21:58:55 +00:00
Ivan Lozano
3e928edc77 Remove XOM properties.
XOM is no longer supported by the build system, so remove these
properties.

Bug: 123034666
Bug: 147300048
Test: Build succeeds.
Change-Id: I77efc98241f45b1a78b1cca5560f64eef5ef22f4
2020-02-13 14:20:44 -05:00
Elliott Hughes
6a65ccdf52 Remove mips test workarounds.
The mips/mips64 targets were never able to pass these tests, and the
supported architectures don't need any of these workarounds.

Test: treehugger
Change-Id: I640a8b7a98ae13d9d9cdb09b0fbef61d31d4c79a
2020-02-13 09:48:14 -08:00
Automerger Merge Worker
7a5602dc10 Merge "Update malloc_info test for scudo." am: 97d053283f
Change-Id: Ie70075d9d0c5811757a0e1bd0046f81a9c0778d2
2020-02-13 15:57:44 +00:00
Christopher Ferris
97d053283f Merge "Update malloc_info test for scudo." 2020-02-13 15:40:28 +00:00
Automerger Merge Worker
7f83747187 Merge "Adjust the documentation of get_ld_config_file_apex_path." am: 38d115c7f0
Change-Id: Ibd335d5de2bc4f525afb85d98ec9c79f3daa0c62
2020-02-13 12:54:06 +00:00
Roland Levillain
38d115c7f0 Merge "Adjust the documentation of get_ld_config_file_apex_path." 2020-02-13 12:40:03 +00:00
Christopher Ferris
cce88c0a03 Update malloc_info test for scudo.
Scudo implemented malloc_info for the primary allocator, so add some
small amount of validation.

Test: Ran the malloc_info tests and verified they pass.
Change-Id: Ib7c609e46cc1ed73fa5c042df92fa9b568880f21
2020-02-12 17:41:01 -08:00
Roland Levillain
57e6b8612a Adjust the documentation of get_ld_config_file_apex_path.
Test: n/a
Bug: 147987608
Change-Id: I479a63a2fa7e0975db80fcfdda78d2ee154c53cb
2020-02-12 17:34:20 +00:00
Automerger Merge Worker
5d1759bb08 Merge "Enable scudo for non-svelte configs." am: 06ea3cf883
Change-Id: I0be8e962cc75617da2762fdabd118d1581323f57
2020-02-12 16:00:36 +00:00
Christopher Ferris
06ea3cf883 Merge "Enable scudo for non-svelte configs." 2020-02-12 15:44:46 +00:00
Automerger Merge Worker
6888c72ee0 Merge "[GWP-ASan] Fix non-reentrant libc_globals init behaviour." am: 260fa1e838
Change-Id: Ib56a913ee8ace3fac562df42c3c49adfeb870529
2020-02-12 04:25:08 +00:00
Treehugger Robot
260fa1e838 Merge "[GWP-ASan] Fix non-reentrant libc_globals init behaviour." 2020-02-12 04:10:33 +00:00
Automerger Merge Worker
85ff79fa9b Merge "[malloc dispatch] Install dispatch over the top of GWP-ASan." am: 18b2891cd2
Change-Id: Idd0e9707448292dc98890220abdf2b92295cc1e2
2020-02-12 03:36:48 +00:00
Treehugger Robot
18b2891cd2 Merge "[malloc dispatch] Install dispatch over the top of GWP-ASan." 2020-02-12 03:23:21 +00:00
Automerger Merge Worker
740ed23141 Merge "[GWP-ASan] [malloc-tests] Scan GWP-ASan regions in maps." am: 549a60aa7d
Change-Id: I8461be7476fd65726241cada466bf4bc0b4b2d15
2020-02-12 03:12:55 +00:00
Treehugger Robot
549a60aa7d Merge "[GWP-ASan] [malloc-tests] Scan GWP-ASan regions in maps." 2020-02-12 02:58:43 +00:00