aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-05-11 19:01:35 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-05-11 20:28:45 -0400
commitc9cf87ea6a4725bc586cc5776c3fb6042a264b7d (patch)
tree0421706f27a0e1f2364d204405be93ca32cea867
parent1d1c8e5f0d95c2c97f29122741aed7d0dfb2b391 (diff)
KASAN: prohibit KASAN+STRUCTLEAK combination
Currently STRUCTLEAK inserts initialization out of live scope of variables from KASAN point of view. This leads to KASAN false positive reports. Prohibit this combination for now. Link: http://lkml.kernel.org/r/20180419172451.104700-1-dvyukov@google.com Signed-off-by: Dmitry Vyukov <dvyukov@google.com> Acked-by: Kees Cook <keescook@chromium.org> Cc: Fengguang Wu <fengguang.wu@intel.com> Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> Cc: Andrey Ryabinin <aryabinin@virtuozzo.com> Cc: Dennis Zhou <dennisszhou@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--arch/Kconfig4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/Kconfig b/arch/Kconfig
index 8e0d665c8d53..75dd23acf133 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -464,6 +464,10 @@ config GCC_PLUGIN_LATENT_ENTROPY
464config GCC_PLUGIN_STRUCTLEAK 464config GCC_PLUGIN_STRUCTLEAK
465 bool "Force initialization of variables containing userspace addresses" 465 bool "Force initialization of variables containing userspace addresses"
466 depends on GCC_PLUGINS 466 depends on GCC_PLUGINS
467 # Currently STRUCTLEAK inserts initialization out of live scope of
468 # variables from KASAN point of view. This leads to KASAN false
469 # positive reports. Prohibit this combination for now.
470 depends on !KASAN_EXTRA
467 help 471 help
468 This plugin zero-initializes any structures containing a 472 This plugin zero-initializes any structures containing a
469 __user attribute. This can prevent some classes of information 473 __user attribute. This can prevent some classes of information