[PATCH] [ASan] Initial support for Kernel AddressSanitizer

Alexander Potapenko glider at google.com
Fri Jun 12 05:05:15 PDT 2015


Hi samsonov, dvyukov,

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.

http://reviews.llvm.org/D10411

Files:
  include/llvm/Transforms/Instrumentation.h
  lib/Transforms/Instrumentation/AddressSanitizer.cpp
  tools/clang/include/clang/Basic/Sanitizers.def
  tools/clang/lib/AST/Decl.cpp
  tools/clang/lib/CodeGen/BackendUtil.cpp
  tools/clang/lib/CodeGen/CGDeclCXX.cpp
  tools/clang/lib/CodeGen/CodeGenFunction.cpp
  tools/clang/lib/CodeGen/CodeGenModule.cpp
  tools/clang/lib/CodeGen/SanitizerMetadata.cpp
  tools/clang/lib/Lex/PPMacroExpansion.cpp

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10411.27571.patch
Type: text/x-patch
Size: 15956 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150612/ca07f5c6/attachment.bin>


More information about the cfe-commits mailing list