]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
kasan-simplify-and-clarify-makefile-v2
authorAndrey Konovalov <andreyknvl@gmail.com>
Wed, 14 Aug 2024 16:10:52 +0000 (18:10 +0200)
committerAndrew Morton <akpm@linux-foundation.org>
Sat, 17 Aug 2024 00:53:16 +0000 (17:53 -0700)
comments fixes per Miguel

Link: https://lkml.kernel.org/r/20240814161052.10374-1-andrey.konovalov@linux.dev
Signed-off-by: Andrey Konovalov <andreyknvl@gmail.com>
Reviewed-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
scripts/Makefile.kasan

index 04b108f311d24b8d91f5ccb69c9f347381ed496b..aab4154af00a7ed57ac77eaa31f2dcb354ea649b 100644 (file)
@@ -34,13 +34,15 @@ endif
 # First, enable -fsanitize=kernel-address together with providing the shadow
 # mapping offset, as for GCC, -fasan-shadow-offset fails without -fsanitize
 # (GCC accepts the shadow mapping offset via -fasan-shadow-offset instead of
-# a normal --param). Instead of ifdef-checking the compiler, rely on cc-option.
+# a --param like the other KASAN parameters).
+# Instead of ifdef-checking the compiler, rely on cc-option.
 CFLAGS_KASAN := $(call cc-option, -fsanitize=kernel-address \
                -fasan-shadow-offset=$(KASAN_SHADOW_OFFSET), \
                $(call cc-option, -fsanitize=kernel-address \
                -mllvm -asan-mapping-offset=$(KASAN_SHADOW_OFFSET)))
 
-# Now, add other parameters enabled in a similar way with GCC and Clang.
+# Now, add other parameters enabled similarly in both GCC and Clang.
+# As some of them are not supported by older compilers, use cc-param.
 CFLAGS_KASAN += $(call cc-param,asan-instrumentation-with-call-threshold=$(call_threshold)) \
                $(call cc-param,asan-stack=$(stack_enable)) \
                $(call cc-param,asan-instrument-allocas=1) \