OSDN Git Service

ARM MTE stack sanitizer.
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Mon, 15 Jul 2019 20:02:23 +0000 (20:02 +0000)
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Mon, 15 Jul 2019 20:02:23 +0000 (20:02 +0000)
commit8060f843435145ff151ecc9e5f1521c7966cffaf
tree4c9fc4284f33a04813eac51a6f95bdbf8a91fa47
parent46513b57db3aa613ac4c0935cef9bff18eee716e
ARM MTE stack sanitizer.

Add "memtag" sanitizer that detects and mitigates stack memory issues
using armv8.5 Memory Tagging Extension.

It is similar in principle to HWASan, which is a software implementation
of the same idea, but there are enough differencies to warrant a new
sanitizer type IMHO. It is also expected to have very different
performance properties.

The new sanitizer does not have a runtime library (it may grow one
later, along with a "debugging" mode). Similar to SafeStack and
StackProtector, the instrumentation pass (in a follow up change) will be
inserted in all cases, but will only affect functions marked with the
new sanitize_memtag attribute.

Reviewers: pcc, hctim, vitalybuka, ostannard

Subscribers: srhines, mehdi_amini, javed.absar, kristof.beyls, hiraditya, cryptoad, steven_wu, dexonsmith, cfe-commits, llvm-commits

Tags: #clang, #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366123 91177308-0d34-0410-b5e6-96231b3b80d8
16 files changed:
docs/BitCodeFormat.rst
docs/LangRef.rst
include/llvm/Bitcode/LLVMBitCodes.h
include/llvm/IR/Attributes.td
lib/AsmParser/LLLexer.cpp
lib/AsmParser/LLParser.cpp
lib/AsmParser/LLToken.h
lib/Bitcode/Reader/BitcodeReader.cpp
lib/Bitcode/Writer/BitcodeWriter.cpp
lib/IR/Attributes.cpp
lib/IR/Verifier.cpp
lib/Transforms/IPO/ForceFunctionAttrs.cpp
lib/Transforms/Utils/CodeExtractor.cpp
test/Bitcode/attributes.ll
test/Transforms/Inline/attributes.ll
utils/emacs/llvm-mode.el