llvm-project/llvm/test/Instrumentation/HWAddressSanitizer
Peter Collingbourne 3d049bce98 hwasan: Support for outlined checks in the Linux kernel.
Add support for match-all tags and GOT-free runtime calls, which
are both required for the kernel to be able to support outlined
checks. This requires extending the access info to let the backend
know when to enable these features. To make the code easier to maintain
introduce an enum with the bit field positions for the access info.

Allow outlined checks to be enabled with -mllvm
-hwasan-inline-all-checks=0. Kernels that contain runtime support for
outlined checks may pass this flag. Kernels lacking runtime support
will continue to link because they do not pass the flag. Old versions
of LLVM will ignore the flag and continue to use inline checks.

With a separate kernel patch [1] I measured the code size of defconfig
+ tag-based KASAN, as well as boot time (i.e. time to init launch)
on a DragonBoard 845c with an Android arm64 GKI kernel. The results
are below:

         code size    boot time
before    92824064      6.18s
after     38822400      6.65s

[1] https://linux-review.googlesource.com/id/I1a30036c70ab3c3ee78d75ed9b87ef7cdc3fdb76

Depends on D90425

Differential Revision: https://reviews.llvm.org/D90426
2020-10-30 14:25:40 -07:00
..
X86
alloca-array.ll
alloca-compat.ll
alloca-with-calls.ll
alloca.ll
atomic.ll
basic-compat.ll
basic.ll hwasan: Move fixed shadow behind opaque no-op cast as well. 2020-10-30 13:23:52 -07:00
dbg-declare-tag-offset.ll
dbg-value-tag-offset.ll
globals.ll hwasan: Emit the globals note even when globals are uninstrumented. 2020-08-13 16:33:22 -07:00
kernel-alloca.ll
kernel-inline.ll [test][HWAsan] Fix kernel-inline.ll under NPM 2020-09-18 10:56:08 -07:00
kernel.ll hwasan: Support for outlined checks in the Linux kernel. 2020-10-30 14:25:40 -07:00
landingpad.ll
mem-intrinsics.ll
personality.ll
prologue.ll
with-calls.ll