Skip to content

Commit cae9dc3

Browse files
xairytorvalds
authored andcommitted
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 <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Cc: Alexander Potapenko <[email protected]> Cc: Andrey Ryabinin <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Dmitry Vyukov <[email protected]> Cc: Elena Petrova <[email protected]> Cc: Marco Elver <[email protected]> Cc: Vincenzo Frascino <[email protected]> Cc: Walter Wu <[email protected]> Cc: Ard Biesheuvel <[email protected]> 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 <[email protected]>
1 parent f9409d5 commit cae9dc3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/Makefile.kasan

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ else
4444
endif
4545

4646
CFLAGS_KASAN := -fsanitize=kernel-hwaddress \
47-
-mllvm -hwasan-instrument-stack=0 \
47+
-mllvm -hwasan-instrument-stack=$(CONFIG_KASAN_STACK) \
48+
-mllvm -hwasan-use-short-granules=0 \
4849
$(instrumentation_flags)
4950

5051
endif # CONFIG_KASAN_SW_TAGS

0 commit comments

Comments
 (0)