llvm-project/compiler-rt/lib
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
..
BlocksRuntime [compiler-rt] Test commit: remove some trailing white spaces. 2017-08-25 19:36:30 +00:00
asan [compiler-rt] Fix lint check failure on comments 2019-09-22 15:31:03 +00:00
builtins Fix int to bool errors exposed due to r372612. 2019-09-24 02:59:02 +00:00
cfi Improve error message when '=' is missing in {ASAN,...}_OPTIONS. 2019-06-15 01:37:14 +00:00
crt [compiler-rt][crt] make test case nontrivial in check_cxx_section_exists 2019-09-16 21:47:47 +00:00
dfsan [compiler-rt] Remove some cpplint filters 2019-09-12 02:20:36 +00:00
fuzzer [libFuzzer] [NFC] Fix grammar error with "it's" 2019-09-26 00:54:30 +00:00
gwp_asan Add GWP-ASan fuzz target to compiler-rt/tools. 2019-08-27 18:28:07 +00:00
hwasan hwasan: Compatibility fixes for short granules. 2019-09-27 01:02:10 +00:00
interception [compiler-rt] Remove some cpplint filters 2019-09-12 02:20:36 +00:00
lsan [compiler-rt] Fix lint check failure on comments 2019-09-22 15:31:03 +00:00
msan [compiler-rt] Remove some cpplint filters 2019-09-12 02:20:36 +00:00
profile Revert "clang-misexpect: Profile Guided Validation of Performance Annotations in LLVM" 2019-09-11 09:16:17 +00:00
safestack compiler-rt: Rename .cc file in lib/{interception/tests,safestack} to .cpp 2019-08-01 13:56:52 +00:00
sanitizer_common sanitizer_common: fix freebsd build error 2019-09-24 08:27:51 +00:00
scudo Remove NOLINTs from compiler-rt 2019-09-11 23:19:48 +00:00
stats compiler-rt: Rename .cc file in lib/{dfsan,stats,ubsan_minimal} to .cpp 2019-08-01 12:41:23 +00:00
tsan [TSAN] Add read/write range interface functions with PC 2019-09-24 11:19:02 +00:00
ubsan Remove NOLINTs from compiler-rt 2019-09-11 23:19:48 +00:00
ubsan_minimal compiler-rt: Rename .cc file in lib/{dfsan,stats,ubsan_minimal} to .cpp 2019-08-01 12:41:23 +00:00
xray Re-land "[compiler-rt] Migrate llvm::make_unique to std::make_unique" 2019-08-15 14:57:44 +00:00
CMakeLists.txt Reland "[compiler-rt] Simple crtbegin.o and crtend.o implementation" 2019-04-30 18:13:22 +00:00