diff options
author | Alexander Potapenko <glider@google.com> | 2015-06-19 12:19:07 +0000 |
---|---|---|
committer | Alexander Potapenko <glider@google.com> | 2015-06-19 12:19:07 +0000 |
commit | 6dba74e779166213742b49ab8bc3b0198b8b99da (patch) | |
tree | 3fbc533ff9d202416ade1d66203c274606a9b67f /include/clang/Basic/Sanitizers.def | |
parent | 9d37b395c7e750e5de0bf23fb4bc2755125d3d21 (diff) |
[ASan] Initial support for Kernel AddressSanitizer
This patch adds initial support for the -fsanitize=kernel-address flag to Clang.
Right now it's quite restricted: only out-of-line instrumentation is supported, globals are not instrumented, some GCC kasan flags are not supported.
Using this patch I am able to build and boot the KASan tree with LLVMLinux patches from github.com/ramosian-glider/kasan/tree/kasan_llvmlinux.
To disable KASan instrumentation for a certain function attribute((no_sanitize("kernel-address"))) can be used.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240131 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/Sanitizers.def')
-rw-r--r-- | include/clang/Basic/Sanitizers.def | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/clang/Basic/Sanitizers.def b/include/clang/Basic/Sanitizers.def index 9e341ae55d..1b528c8d6f 100644 --- a/include/clang/Basic/Sanitizers.def +++ b/include/clang/Basic/Sanitizers.def @@ -41,6 +41,9 @@ // AddressSanitizer SANITIZER("address", Address) +// Kernel AddressSanitizer (KASan) +SANITIZER("kernel-address", KernelAddress) + // MemorySanitizer SANITIZER("memory", Memory) |