summaryrefslogtreecommitdiff
path: root/lib/Driver/ToolChains/Linux.cpp
diff options
context:
space:
mode:
authorAndrey Konovalov <andreyknvl@google.com>2018-04-13 18:05:21 +0000
committerAndrey Konovalov <andreyknvl@google.com>2018-04-13 18:05:21 +0000
commit87460c837c1ab39752b549d2bef342018a409677 (patch)
treee1cd3422e0d8e0253eee848c9f173c3c41bb5c2d /lib/Driver/ToolChains/Linux.cpp
parentfb5b5046b3b35c4cd349a239232291082b13f372 (diff)
downloadclang-87460c837c1ab39752b549d2bef342018a409677.tar.gz
hwasan: add -fsanitize=kernel-hwaddress flag
This patch adds -fsanitize=kernel-hwaddress flag, that essentially enables -hwasan-kernel=1 -hwasan-recover=1 -hwasan-match-all-tag=0xff. Differential Revision: https://reviews.llvm.org/D45046 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@330044 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/ToolChains/Linux.cpp')
-rw-r--r--lib/Driver/ToolChains/Linux.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Driver/ToolChains/Linux.cpp b/lib/Driver/ToolChains/Linux.cpp
index c9544a39c2..5473be2c1e 100644
--- a/lib/Driver/ToolChains/Linux.cpp
+++ b/lib/Driver/ToolChains/Linux.cpp
@@ -900,8 +900,10 @@ SanitizerMask Linux::getSupportedSanitizers() const {
Res |= SanitizerKind::Function;
if (IsX86_64 || IsMIPS64 || IsAArch64 || IsX86 || IsMIPS || IsArmArch)
Res |= SanitizerKind::Scudo;
- if (IsX86_64 || IsAArch64)
+ if (IsX86_64 || IsAArch64) {
Res |= SanitizerKind::HWAddress;
+ Res |= SanitizerKind::KernelHWAddress;
+ }
return Res;
}