platform_system_core/debuggerd
Mitch Phillips 729e08f6ea [MTE] Add a HWASan-style tag dump to tombstones.
We already dump the tags in the regigster dump section by appending the
tag to the memory address. You only get 2 granules before each register
and 13 after.

The HWASan-style tag dump is extremely useful for debugging, as it gives
a pretty comprehensive overview of the memory subsystem. It also
provides enough context bytes (256) to give you a reasonable intuition
about a particular bug.

The tag dump shows up only if PTRACE_PEEKTAGS returns at least one value
in the 256 requested. If the start of end of the region is untagged,
it's omitted. The tag dump looks like this:

Change-Id: Icc33fb97542d9b1fa3ae9e58aba34d524c6ba7b5

---
Memory tags around the fault address (0x60000704414d340), one tag per 16 bytes:
      0x704414d000: 0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
      0x704414d100: 0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
      0x704414d200: 0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
    =>0x704414d300: 0  0  0  0 [2] 2  0  0  0  0  0  0  0  0  0  0
      0x704414d400: 0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
      0x704414d500: 0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
      0x704414d600: 0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
      0x704414d700: 0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
      0x704414d800: 0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
      0x704414d900: 0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
      0x704414da00: 0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
---

Bug: 183992164
Test: atest debuggerd_test on MTE+QEMU and sunfish.

Change-Id: I8d5842e4803ca30b407e866c99eef56f2cb36600
Merged-In: I8d5842e4803ca30b407e866c99eef56f2cb36600
2021-06-29 16:17:58 -07:00
..
client debuggerd: store commandline instead of process name. 2021-03-30 12:15:56 -07:00
common/include Reland protobuf tombstones. 2021-01-26 17:55:17 -08:00
crasher Ignore deliberate free() of non-heap memory 2021-03-16 18:16:15 -07:00
handler Avoid thread cache in unwinder. 2021-06-10 01:24:50 +00:00
include/debuggerd Teach debuggerd to pass the secondary ring buffer to __scudo_get_error_info(). 2021-02-12 12:30:52 -08:00
libdebuggerd [MTE] Add a HWASan-style tag dump to tombstones. 2021-06-29 16:17:58 -07:00
proto [MTE] Add a HWASan-style tag dump to tombstones. 2021-06-29 16:17:58 -07:00
seccomp_policy Allow another prctl call. 2021-04-16 13:35:16 -07:00
tombstoned tombstoned: fix file creation for ANRs. 2021-05-19 17:09:59 -07:00
.clang-format Remove extraneous .clang-format files 2017-03-14 14:06:31 -07:00
Android.bp Re-add backtrace note about unreadable elf. 2021-05-03 15:21:11 -07:00
crash_dump.cpp debuggerd: store commandline instead of process name. 2021-03-30 12:15:56 -07:00
crash_test.cpp Re-add backtrace note about unreadable elf. 2021-05-03 15:21:11 -07:00
debuggerd.cpp debuggerd: add support for Java traces. 2018-06-14 15:40:06 -07:00
debuggerd_benchmark.cpp debuggerd: add pause time benchmark. 2017-12-19 16:36:04 -08:00
debuggerd_test.cpp [MTE] Add a HWASan-style tag dump to tombstones. 2021-06-29 16:17:58 -07:00
MODULE_LICENSE_APACHE2
OWNERS Add OWNERS. 2017-12-07 13:30:03 -08:00
pbtombstone.cpp Reland protobuf tombstones. 2021-01-26 17:55:17 -08:00
protocol.h Teach debuggerd to pass the secondary ring buffer to __scudo_get_error_info(). 2021-02-12 12:30:52 -08:00
util.cpp debuggerd: store commandline instead of process name. 2021-03-30 12:15:56 -07:00
util.h debuggerd: store commandline instead of process name. 2021-03-30 12:15:56 -07:00