diff options
author | Andrey Konovalov <andreyknvl@google.com> | 2020-08-06 23:25:08 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-08-07 11:33:28 -0700 |
commit | cae9dc35ed9ff82a99754e51d57ff6c332e1f7e4 (patch) | |
tree | 73cf5312de6615304cf5393ed090812e81efefee /scripts/Makefile.kasan | |
parent | f9409d58e972cada2c524b7f1e54631bb8fa176f (diff) | |
download | linux-cae9dc35ed9ff82a99754e51d57ff6c332e1f7e4.tar.gz linux-cae9dc35ed9ff82a99754e51d57ff6c332e1f7e4.tar.bz2 linux-cae9dc35ed9ff82a99754e51d57ff6c332e1f7e4.zip |
kasan: allow enabling stack tagging for tag-based mode
Use CONFIG_KASAN_STACK to enable stack tagging.
Note, that HWASAN short granules [1] are disabled. Supporting those will
require more kernel changes.
[1] https://clang.llvm.org/docs/HardwareAssistedAddressSanitizerDesign.html
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Alexander Potapenko <glider@google.com>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Elena Petrova <lenaptr@google.com>
Cc: Marco Elver <elver@google.com>
Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
Cc: Walter Wu <walter-zh.wu@mediatek.com>
Cc: Ard Biesheuvel <ardb@kernel.org>
Link: http://lkml.kernel.org/r/e7febb907b539c3730780df587ce0b38dc558c3d.1596199677.git.andreyknvl@google.com
Link: http://lkml.kernel.org/r/99f7d90a4237431bf5988599fb41358e92876eb0.1596544734.git.andreyknvl@google.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts/Makefile.kasan')
-rw-r--r-- | scripts/Makefile.kasan | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/Makefile.kasan b/scripts/Makefile.kasan index 03757cc60e06..f4beee1b0013 100644 --- a/scripts/Makefile.kasan +++ b/scripts/Makefile.kasan @@ -44,7 +44,8 @@ else endif CFLAGS_KASAN := -fsanitize=kernel-hwaddress \ - -mllvm -hwasan-instrument-stack=0 \ + -mllvm -hwasan-instrument-stack=$(CONFIG_KASAN_STACK) \ + -mllvm -hwasan-use-short-granules=0 \ $(instrumentation_flags) endif # CONFIG_KASAN_SW_TAGS |