Merge tag 'linux-kselftest-next-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kerne...
[linux-2.6-microblaze.git] / lib / Kconfig.kasan
index 047b53d..8fb0970 100644 (file)
@@ -54,9 +54,9 @@ config KASAN_GENERIC
          Enables generic KASAN mode.
 
          This mode is supported in both GCC and Clang. With GCC it requires
-         version 8.3.0 or later. With Clang it requires version 7.0.0 or
-         later, but detection of out-of-bounds accesses for global variables
-         is supported only since Clang 11.
+         version 8.3.0 or later. Any supported Clang version is compatible,
+         but detection of out-of-bounds accesses for global variables is
+         supported only since Clang 11.
 
          This mode consumes about 1/8th of available memory at kernel start
          and introduces an overhead of ~x1.5 for the rest of the allocations.
@@ -78,8 +78,7 @@ config KASAN_SW_TAGS
          Enables software tag-based KASAN mode.
 
          This mode requires Top Byte Ignore support by the CPU and therefore
-         is only supported for arm64. This mode requires Clang version 7.0.0
-         or later.
+         is only supported for arm64. This mode requires Clang.
 
          This mode consumes about 1/16th of available memory at kernel start
          and introduces an overhead of ~20% for the rest of the allocations.
@@ -137,15 +136,6 @@ config KASAN_STACK
        default 1 if KASAN_STACK_ENABLE || CC_IS_GCC
        default 0
 
-config KASAN_S390_4_LEVEL_PAGING
-       bool "KASan: use 4-level paging"
-       depends on S390
-       help
-         Compiling the kernel with KASan disables automatic 3-level vs
-         4-level paging selection. 3-level paging is used by default (up
-         to 3TB of RAM with KASan enabled). This options allows to force
-         4-level paging instead.
-
 config KASAN_SW_TAGS_IDENTIFY
        bool "Enable memory corruption identification"
        depends on KASAN_SW_TAGS
@@ -167,12 +157,24 @@ config KASAN_VMALLOC
          for KASAN to detect more sorts of errors (and to support vmapped
          stacks), but at the cost of higher memory usage.
 
-config TEST_KASAN
-       tristate "Module for testing KASAN for bug detection"
-       depends on m
+config KASAN_KUNIT_TEST
+       tristate "KUnit-compatible tests of KASAN bug detection capabilities" if !KUNIT_ALL_TESTS
+       depends on KASAN && KUNIT
+       default KUNIT_ALL_TESTS
        help
-         This is a test module doing various nasty things like
-         out of bounds accesses, use after free. It is useful for testing
+         This is a KUnit test suite doing various nasty things like
+         out of bounds and use after free accesses. It is useful for testing
          kernel debugging features like KASAN.
 
+         For more information on KUnit and unit tests in general, please refer
+         to the KUnit documentation in Documentation/dev-tools/kunit
+
+config TEST_KASAN_MODULE
+       tristate "KUnit-incompatible tests of KASAN bug detection capabilities"
+       depends on m && KASAN
+       help
+         This is a part of the KASAN test suite that is incompatible with
+         KUnit. Currently includes tests that do bad copy_from/to_user
+         accesses.
+
 endif # KASAN