lib: add kasan test module
[firefly-linux-kernel-4.4.55.git] / lib / Kconfig.kasan
index 0052b1b9aadd8e3b46a325238e4cfce11fbf61f3..4d47d874335ce9d1b6c8dad94e45b4abb0515fc8 100644 (file)
@@ -5,6 +5,7 @@ if HAVE_ARCH_KASAN
 
 config KASAN
        bool "KASan: runtime memory debugger"
+       depends on SLUB_DEBUG
        help
          Enables kernel address sanitizer - runtime memory debugger,
          designed to find out-of-bounds accesses and use-after-free bugs.
@@ -41,4 +42,12 @@ config KASAN_INLINE
 
 endchoice
 
+config TEST_KASAN
+       tristate "Module for testing kasan for bug detection"
+       depends on m && KASAN
+       help
+         This is a test module doing various nasty things like
+         out of bounds accesses, use after free. It is useful for testing
+         kernel debugging features like kernel address sanitizer.
+
 endif