[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <99f7d90a4237431bf5988599fb41358e92876eb0.1596544734.git.andreyknvl@google.com>
Date: Tue, 4 Aug 2020 14:41:27 +0200
From: Andrey Konovalov <andreyknvl@...gle.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Andrey Ryabinin <aryabinin@...tuozzo.com>,
Alexander Potapenko <glider@...gle.com>,
Dmitry Vyukov <dvyukov@...gle.com>,
Marco Elver <elver@...gle.com>,
Ard Biesheuvel <ardb@...nel.org>,
Arvind Sankar <nivedita@...m.mit.edu>,
kasan-dev@...glegroups.com, linux-mm@...ck.org,
linux-efi@...r.kernel.org, linux-kernel@...r.kernel.org,
Walter Wu <walter-zh.wu@...iatek.com>,
Elena Petrova <lenaptr@...gle.com>,
Vincenzo Frascino <vincenzo.frascino@....com>,
Catalin Marinas <catalin.marinas@....com>,
Andrey Konovalov <andreyknvl@...gle.com>
Subject: [PATCH v2 4/5] 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@...gle.com>
---
scripts/Makefile.kasan | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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
--
2.28.0.163.g6104cc2f0b6-goog
Powered by blists - more mailing lists