summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2019-08-03 00:48:54 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2019-08-03 10:02:00 -0400
commitebb6d35a74ce21ce1673b8f404c1039d5a1e7e2d (patch)
tree2a777b400779b4d25eef0137ecd65faf270b48ab
parent670105a25608affe01cb0ccdc2a1f4bd2327172b (diff)
kasan: remove clang version check for KASAN_STACK
asan-stack mode still uses dangerously large kernel stacks of tens of kilobytes in some drivers, and it does not seem that anyone is working on the clang bug. Turn it off for all clang versions to prevent users from accidentally enabling it once they update to clang-9, and to help automated build testing with clang-9. Link: https://bugs.llvm.org/show_bug.cgi?id=38809 Link: http://lkml.kernel.org/r/20190719200347.2596375-1-arnd@arndb.de Fixes: 6baec880d7a5 ("kasan: turn off asan-stack for clang-8 and earlier") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Nick Desaulniers <ndesaulniers@google.com> Reviewed-by: Mark Brown <broonie@kernel.org> Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com> Cc: Qian Cai <cai@lca.pw> Cc: Andrey Konovalov <andreyknvl@google.com> Cc: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--lib/Kconfig.kasan11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/Kconfig.kasan b/lib/Kconfig.kasan
index 4fafba1a923b..7fa97a8b5717 100644
--- a/lib/Kconfig.kasan
+++ b/lib/Kconfig.kasan
@@ -106,7 +106,6 @@ endchoice
106 106
107config KASAN_STACK_ENABLE 107config KASAN_STACK_ENABLE
108 bool "Enable stack instrumentation (unsafe)" if CC_IS_CLANG && !COMPILE_TEST 108 bool "Enable stack instrumentation (unsafe)" if CC_IS_CLANG && !COMPILE_TEST
109 default !(CLANG_VERSION < 90000)
110 depends on KASAN 109 depends on KASAN
111 help 110 help
112 The LLVM stack address sanitizer has a know problem that 111 The LLVM stack address sanitizer has a know problem that
@@ -115,11 +114,11 @@ config KASAN_STACK_ENABLE
115 Disabling asan-stack makes it safe to run kernels build 114 Disabling asan-stack makes it safe to run kernels build
116 with clang-8 with KASAN enabled, though it loses some of 115 with clang-8 with KASAN enabled, though it loses some of
117 the functionality. 116 the functionality.
118 This feature is always disabled when compile-testing with clang-8 117 This feature is always disabled when compile-testing with clang
119 or earlier to avoid cluttering the output in stack overflow 118 to avoid cluttering the output in stack overflow warnings,
120 warnings, but clang-8 users can still enable it for builds without 119 but clang users can still enable it for builds without
121 CONFIG_COMPILE_TEST. On gcc and later clang versions it is 120 CONFIG_COMPILE_TEST. On gcc it is assumed to always be safe
122 assumed to always be safe to use and enabled by default. 121 to use and enabled by default.
123 122
124config KASAN_STACK 123config KASAN_STACK
125 int 124 int