llvm-project/llvm/test/Instrumentation/HWAddressSanitizer
Peter Collingbourne c336557f02 hwasan: Compatibility fixes for short granules.
We can't use short granules with stack instrumentation when targeting older
API levels because the rest of the system won't understand the short granule
tags stored in shadow memory.

Moreover, we need to be able to let old binaries (which won't understand
short granule tags) run on a new system that supports short granule
tags. Such binaries will call the __hwasan_tag_mismatch function when their
outlined checks fail. We can compensate for the binary's lack of support
for short granules by implementing the short granule part of the check in
the __hwasan_tag_mismatch function. Unfortunately we can't do anything about
inline checks, but I don't believe that we can generate these by default on
aarch64, nor did we do so when the ABI was fixed.

A new function, __hwasan_tag_mismatch_v2, is introduced that lets code
targeting the new runtime avoid redoing the short granule check. Because tag
mismatches are rare this isn't important from a performance perspective; the
main benefit is that it introduces a symbol dependency that prevents binaries
targeting the new runtime from running on older (i.e. incompatible) runtimes.

Differential Revision: https://reviews.llvm.org/D68059

llvm-svn: 373035
2019-09-27 01:02:10 +00:00
..
X86
alloca-array.ll hwasan: Pad arrays with non-1 size correctly. 2019-07-16 03:25:50 +00:00
alloca-compat.ll hwasan: Compatibility fixes for short granules. 2019-09-27 01:02:10 +00:00
alloca-with-calls.ll hwasan: Pad arrays with non-1 size correctly. 2019-07-16 03:25:50 +00:00
alloca.ll hwasan: Compatibility fixes for short granules. 2019-09-27 01:02:10 +00:00
atomic.ll hwasan: Move memory access checks into small outlined functions on aarch64. 2019-01-23 02:20:10 +00:00
basic-compat.ll hwasan: Compatibility fixes for short granules. 2019-09-27 01:02:10 +00:00
basic.ll hwasan: Compatibility fixes for short granules. 2019-09-27 01:02:10 +00:00
dbg-declare-tag-offset.ll hwasan: Use bits [3..11) of the ring buffer entry address as the base stack tag. 2019-06-17 23:39:51 +00:00
globals.ll hwasan: Instrument globals. 2019-08-06 22:07:29 +00:00
kernel-alloca.ll Added address-space mangling for stack related intrinsics 2019-07-22 12:42:48 +00:00
kernel-inline.ll
kernel.ll hwasan: Move memory access checks into small outlined functions on aarch64. 2019-01-23 02:20:10 +00:00
landingpad.ll hwasan: Untag unwound stack frames by wrapping personality functions. 2019-08-23 01:28:44 +00:00
lazy-thread-init.ll hwasan: Enable -hwasan-allow-ifunc by default. 2019-04-09 00:25:59 +00:00
mem-intrinsics.ll [HWASAN] Instrument memorty intrinsics by default 2018-12-24 16:02:48 +00:00
personality.ll hwasan: Untag unwound stack frames by wrapping personality functions. 2019-08-23 01:28:44 +00:00
prologue.ll hwasan: Use llvm.read_register intrinsic to read the PC on aarch64 instead of taking the function's address. 2019-06-27 23:24:07 +00:00
with-calls.ll hwasan: Remove the old frame descriptor mechanism. 2019-06-28 17:53:26 +00:00