ec8f24b7faaf3 (Thomas Gleixner 2019-05-19 13:07:45 +0100 1) # SPDX-License-Identifier: GPL-2.0-only
2bd926b439b4c (Andrey Konovalov 2018-12-28 00:29:53 -0800 2) # This config refers to the generic KASAN mode.
0b24becc810dc (Andrey Ryabinin 2015-02-13 14:39:17 -0800 3) config HAVE_ARCH_KASAN
0b24becc810dc (Andrey Ryabinin 2015-02-13 14:39:17 -0800 4) bool
0b24becc810dc (Andrey Ryabinin 2015-02-13 14:39:17 -0800 5)
2bd926b439b4c (Andrey Konovalov 2018-12-28 00:29:53 -0800 6) config HAVE_ARCH_KASAN_SW_TAGS
2bd926b439b4c (Andrey Konovalov 2018-12-28 00:29:53 -0800 7) bool
2bd926b439b4c (Andrey Konovalov 2018-12-28 00:29:53 -0800 8)
6a63a63ff1ac2 (Andrey Konovalov 2020-12-22 12:01:20 -0800 9) config HAVE_ARCH_KASAN_HW_TAGS
6a63a63ff1ac2 (Andrey Konovalov 2020-12-22 12:01:20 -0800 10) bool
6a63a63ff1ac2 (Andrey Konovalov 2020-12-22 12:01:20 -0800 11)
6a63a63ff1ac2 (Andrey Konovalov 2020-12-22 12:01:20 -0800 12) config HAVE_ARCH_KASAN_VMALLOC
3c5c3cfb9ef4d (Daniel Axtens 2019-11-30 17:54:50 -0800 13) bool
3c5c3cfb9ef4d (Daniel Axtens 2019-11-30 17:54:50 -0800 14)
2bd926b439b4c (Andrey Konovalov 2018-12-28 00:29:53 -0800 15) config CC_HAS_KASAN_GENERIC
2bd926b439b4c (Andrey Konovalov 2018-12-28 00:29:53 -0800 16) def_bool $(cc-option, -fsanitize=kernel-address)
2bd926b439b4c (Andrey Konovalov 2018-12-28 00:29:53 -0800 17)
2bd926b439b4c (Andrey Konovalov 2018-12-28 00:29:53 -0800 18) config CC_HAS_KASAN_SW_TAGS
2bd926b439b4c (Andrey Konovalov 2018-12-28 00:29:53 -0800 19) def_bool $(cc-option, -fsanitize=kernel-hwaddress)
0b24becc810dc (Andrey Ryabinin 2015-02-13 14:39:17 -0800 20)
6a63a63ff1ac2 (Andrey Konovalov 2020-12-22 12:01:20 -0800 21) # This option is only required for software KASAN modes.
6a63a63ff1ac2 (Andrey Konovalov 2020-12-22 12:01:20 -0800 22) # Old GCC versions don't have proper support for no_sanitize_address.
6a63a63ff1ac2 (Andrey Konovalov 2020-12-22 12:01:20 -0800 23) # See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89124 for details.
7b861a53e46b6 (Marco Elver 2020-06-04 07:58:10 +0200 24) config CC_HAS_WORKING_NOSANITIZE_ADDRESS
acf7b0bf7dcf5 (Marco Elver 2020-06-23 13:24:48 +0200 25) def_bool !CC_IS_GCC || GCC_VERSION >= 80300
7b861a53e46b6 (Marco Elver 2020-06-04 07:58:10 +0200 26)
7a3767f83f173 (Marco Elver 2020-08-06 23:24:28 -0700 27) menuconfig KASAN
2bd926b439b4c (Andrey Konovalov 2018-12-28 00:29:53 -0800 28) bool "KASAN: runtime memory debugger"
6a63a63ff1ac2 (Andrey Konovalov 2020-12-22 12:01:20 -0800 29) depends on (((HAVE_ARCH_KASAN && CC_HAS_KASAN_GENERIC) || \
6a63a63ff1ac2 (Andrey Konovalov 2020-12-22 12:01:20 -0800 30) (HAVE_ARCH_KASAN_SW_TAGS && CC_HAS_KASAN_SW_TAGS)) && \
6a63a63ff1ac2 (Andrey Konovalov 2020-12-22 12:01:20 -0800 31) CC_HAS_WORKING_NOSANITIZE_ADDRESS) || \
6a63a63ff1ac2 (Andrey Konovalov 2020-12-22 12:01:20 -0800 32) HAVE_ARCH_KASAN_HW_TAGS
2bd926b439b4c (Andrey Konovalov 2018-12-28 00:29:53 -0800 33) depends on (SLUB && SYSFS) || (SLAB && !DEBUG_SLAB)
ffcc5cea46c0c (Andrey Konovalov 2020-12-22 12:00:42 -0800 34) select STACKDEPOT
2bd926b439b4c (Andrey Konovalov 2018-12-28 00:29:53 -0800 35) help
2bd926b439b4c (Andrey Konovalov 2018-12-28 00:29:53 -0800 36) Enables KASAN (KernelAddressSANitizer) - runtime memory debugger,
2bd926b439b4c (Andrey Konovalov 2018-12-28 00:29:53 -0800 37) designed to find out-of-bounds accesses and use-after-free bugs.
2bd926b439b4c (Andrey Konovalov 2018-12-28 00:29:53 -0800 38) See Documentation/dev-tools/kasan.rst for details.
2bd926b439b4c (Andrey Konovalov 2018-12-28 00:29:53 -0800 39)
7a3767f83f173 (Marco Elver 2020-08-06 23:24:28 -0700 40) if KASAN
7a3767f83f173 (Marco Elver 2020-08-06 23:24:28 -0700 41)
2bd926b439b4c (Andrey Konovalov 2018-12-28 00:29:53 -0800 42) choice
2bd926b439b4c (Andrey Konovalov 2018-12-28 00:29:53 -0800 43) prompt "KASAN mode"
2bd926b439b4c (Andrey Konovalov 2018-12-28 00:29:53 -0800 44) default KASAN_GENERIC
2bd926b439b4c (Andrey Konovalov 2018-12-28 00:29:53 -0800 45) help
6a63a63ff1ac2 (Andrey Konovalov 2020-12-22 12:01:20 -0800 46) KASAN has three modes:
6a63a63ff1ac2 (Andrey Konovalov 2020-12-22 12:01:20 -0800 47) 1. generic KASAN (similar to userspace ASan,
6a63a63ff1ac2 (Andrey Konovalov 2020-12-22 12:01:20 -0800 48) x86_64/arm64/xtensa, enabled with CONFIG_KASAN_GENERIC),
6a63a63ff1ac2 (Andrey Konovalov 2020-12-22 12:01:20 -0800 49) 2. software tag-based KASAN (arm64 only, based on software
6a63a63ff1ac2 (Andrey Konovalov 2020-12-22 12:01:20 -0800 50) memory tagging (similar to userspace HWASan), enabled with
6a63a63ff1ac2 (Andrey Konovalov 2020-12-22 12:01:20 -0800 51) CONFIG_KASAN_SW_TAGS), and
6a63a63ff1ac2 (Andrey Konovalov 2020-12-22 12:01:20 -0800 52) 3. hardware tag-based KASAN (arm64 only, based on hardware
6a63a63ff1ac2 (Andrey Konovalov 2020-12-22 12:01:20 -0800 53) memory tagging, enabled with CONFIG_KASAN_HW_TAGS).
6a63a63ff1ac2 (Andrey Konovalov 2020-12-22 12:01:20 -0800 54)
6a63a63ff1ac2 (Andrey Konovalov 2020-12-22 12:01:20 -0800 55) All KASAN modes are strictly debugging features.
ac4766be5e2d1 (Marco Elver 2020-08-06 23:24:31 -0700 56)
6a63a63ff1ac2 (Andrey Konovalov 2020-12-22 12:01:20 -0800 57) For better error reports enable CONFIG_STACKTRACE.
2bd926b439b4c (Andrey Konovalov 2018-12-28 00:29:53 -0800 58)
2bd926b439b4c (Andrey Konovalov 2018-12-28 00:29:53 -0800 59) config KASAN_GENERIC
2bd926b439b4c (Andrey Konovalov 2018-12-28 00:29:53 -0800 60) bool "Generic mode"
2bd926b439b4c (Andrey Konovalov 2018-12-28 00:29:53 -0800 61) depends on HAVE_ARCH_KASAN && CC_HAS_KASAN_GENERIC
dd275caf4a0d9 (Jason A. Donenfeld 2018-06-27 23:26:20 -0700 62) select SLUB_DEBUG if SLUB
6a63a63ff1ac2 (Andrey Konovalov 2020-12-22 12:01:20 -0800 63) select CONSTRUCTORS
0b24becc810dc (Andrey Ryabinin 2015-02-13 14:39:17 -0800 64) help
2bd926b439b4c (Andrey Konovalov 2018-12-28 00:29:53 -0800 65) Enables generic KASAN mode.
ac4766be5e2d1 (Marco Elver 2020-08-06 23:24:31 -0700 66)
ac4766be5e2d1 (Marco Elver 2020-08-06 23:24:31 -0700 67) This mode is supported in both GCC and Clang. With GCC it requires
527f6750d92be (Marco Elver 2020-10-13 16:47:51 -0700 68) version 8.3.0 or later. Any supported Clang version is compatible,
527f6750d92be (Marco Elver 2020-10-13 16:47:51 -0700 69) but detection of out-of-bounds accesses for global variables is
527f6750d92be (Marco Elver 2020-10-13 16:47:51 -0700 70) supported only since Clang 11.
ac4766be5e2d1 (Marco Elver 2020-08-06 23:24:31 -0700 71)
2bd926b439b4c (Andrey Konovalov 2018-12-28 00:29:53 -0800 72) This mode consumes about 1/8th of available memory at kernel start
2bd926b439b4c (Andrey Konovalov 2018-12-28 00:29:53 -0800 73) and introduces an overhead of ~x1.5 for the rest of the allocations.
2bd926b439b4c (Andrey Konovalov 2018-12-28 00:29:53 -0800 74) The performance slowdown is ~x3.
ac4766be5e2d1 (Marco Elver 2020-08-06 23:24:31 -0700 75)
2bd926b439b4c (Andrey Konovalov 2018-12-28 00:29:53 -0800 76) Currently CONFIG_KASAN_GENERIC doesn't work with CONFIG_DEBUG_SLAB
7ed2f9e663854 (Alexander Potapenko 2016-03-25 14:21:59 -0700 77) (the resulting kernel does not boot).
0b24becc810dc (Andrey Ryabinin 2015-02-13 14:39:17 -0800 78)
2bd926b439b4c (Andrey Konovalov 2018-12-28 00:29:53 -0800 79) config KASAN_SW_TAGS
2bd926b439b4c (Andrey Konovalov 2018-12-28 00:29:53 -0800 80) bool "Software tag-based mode"
2bd926b439b4c (Andrey Konovalov 2018-12-28 00:29:53 -0800 81) depends on HAVE_ARCH_KASAN_SW_TAGS && CC_HAS_KASAN_SW_TAGS
2bd926b439b4c (Andrey Konovalov 2018-12-28 00:29:53 -0800 82) select SLUB_DEBUG if SLUB
6a63a63ff1ac2 (Andrey Konovalov 2020-12-22 12:01:20 -0800 83) select CONSTRUCTORS
2bd926b439b4c (Andrey Konovalov 2018-12-28 00:29:53 -0800 84) help
2bd926b439b4c (Andrey Konovalov 2018-12-28 00:29:53 -0800 85) Enables software tag-based KASAN mode.
ac4766be5e2d1 (Marco Elver 2020-08-06 23:24:31 -0700 86)
6a63a63ff1ac2 (Andrey Konovalov 2020-12-22 12:01:20 -0800 87) This mode require software memory tagging support in the form of
6a63a63ff1ac2 (Andrey Konovalov 2020-12-22 12:01:20 -0800 88) HWASan-like compiler instrumentation.
6a63a63ff1ac2 (Andrey Konovalov 2020-12-22 12:01:20 -0800 89)
6a63a63ff1ac2 (Andrey Konovalov 2020-12-22 12:01:20 -0800 90) Currently this mode is only implemented for arm64 CPUs and relies on
6a63a63ff1ac2 (Andrey Konovalov 2020-12-22 12:01:20 -0800 91) Top Byte Ignore. This mode requires Clang.
ac4766be5e2d1 (Marco Elver 2020-08-06 23:24:31 -0700 92)
2bd926b439b4c (Andrey Konovalov 2018-12-28 00:29:53 -0800 93) This mode consumes about 1/16th of available memory at kernel start
2bd926b439b4c (Andrey Konovalov 2018-12-28 00:29:53 -0800 94) and introduces an overhead of ~20% for the rest of the allocations.
2bd926b439b4c (Andrey Konovalov 2018-12-28 00:29:53 -0800 95) This mode may potentially introduce problems relating to pointer
2bd926b439b4c (Andrey Konovalov 2018-12-28 00:29:53 -0800 96) casting and comparison, as it embeds tags into the top byte of each
2bd926b439b4c (Andrey Konovalov 2018-12-28 00:29:53 -0800 97) pointer.
ac4766be5e2d1 (Marco Elver 2020-08-06 23:24:31 -0700 98)
2bd926b439b4c (Andrey Konovalov 2018-12-28 00:29:53 -0800 99) Currently CONFIG_KASAN_SW_TAGS doesn't work with CONFIG_DEBUG_SLAB
2bd926b439b4c (Andrey Konovalov 2018-12-28 00:29:53 -0800 100) (the resulting kernel does not boot).
2bd926b439b4c (Andrey Konovalov 2018-12-28 00:29:53 -0800 101)
6a63a63ff1ac2 (Andrey Konovalov 2020-12-22 12:01:20 -0800 102) config KASAN_HW_TAGS
6a63a63ff1ac2 (Andrey Konovalov 2020-12-22 12:01:20 -0800 103) bool "Hardware tag-based mode"
6a63a63ff1ac2 (Andrey Konovalov 2020-12-22 12:01:20 -0800 104) depends on HAVE_ARCH_KASAN_HW_TAGS
6a63a63ff1ac2 (Andrey Konovalov 2020-12-22 12:01:20 -0800 105) depends on SLUB
6a63a63ff1ac2 (Andrey Konovalov 2020-12-22 12:01:20 -0800 106) help
6a63a63ff1ac2 (Andrey Konovalov 2020-12-22 12:01:20 -0800 107) Enables hardware tag-based KASAN mode.
6a63a63ff1ac2 (Andrey Konovalov 2020-12-22 12:01:20 -0800 108)
6a63a63ff1ac2 (Andrey Konovalov 2020-12-22 12:01:20 -0800 109) This mode requires hardware memory tagging support, and can be used
6a63a63ff1ac2 (Andrey Konovalov 2020-12-22 12:01:20 -0800 110) by any architecture that provides it.
6a63a63ff1ac2 (Andrey Konovalov 2020-12-22 12:01:20 -0800 111)
6a63a63ff1ac2 (Andrey Konovalov 2020-12-22 12:01:20 -0800 112) Currently this mode is only implemented for arm64 CPUs starting from
6a63a63ff1ac2 (Andrey Konovalov 2020-12-22 12:01:20 -0800 113) ARMv8.5 and relies on Memory Tagging Extension and Top Byte Ignore.
6a63a63ff1ac2 (Andrey Konovalov 2020-12-22 12:01:20 -0800 114)
2bd926b439b4c (Andrey Konovalov 2018-12-28 00:29:53 -0800 115) endchoice
2bd926b439b4c (Andrey Konovalov 2018-12-28 00:29:53 -0800 116)
0b24becc810dc (Andrey Ryabinin 2015-02-13 14:39:17 -0800 117) choice
0b24becc810dc (Andrey Ryabinin 2015-02-13 14:39:17 -0800 118) prompt "Instrumentation type"
6a63a63ff1ac2 (Andrey Konovalov 2020-12-22 12:01:20 -0800 119) depends on KASAN_GENERIC || KASAN_SW_TAGS
0b24becc810dc (Andrey Ryabinin 2015-02-13 14:39:17 -0800 120) default KASAN_OUTLINE
0b24becc810dc (Andrey Ryabinin 2015-02-13 14:39:17 -0800 121)
0b24becc810dc (Andrey Ryabinin 2015-02-13 14:39:17 -0800 122) config KASAN_OUTLINE
0b24becc810dc (Andrey Ryabinin 2015-02-13 14:39:17 -0800 123) bool "Outline instrumentation"
0b24becc810dc (Andrey Ryabinin 2015-02-13 14:39:17 -0800 124) help
0b24becc810dc (Andrey Ryabinin 2015-02-13 14:39:17 -0800 125) Before every memory access compiler insert function call
0b24becc810dc (Andrey Ryabinin 2015-02-13 14:39:17 -0800 126) __asan_load*/__asan_store*. These functions performs check
0b24becc810dc (Andrey Ryabinin 2015-02-13 14:39:17 -0800 127) of shadow memory. This is slower than inline instrumentation,
0b24becc810dc (Andrey Ryabinin 2015-02-13 14:39:17 -0800 128) however it doesn't bloat size of kernel's .text section so
0b24becc810dc (Andrey Ryabinin 2015-02-13 14:39:17 -0800 129) much as inline does.
0b24becc810dc (Andrey Ryabinin 2015-02-13 14:39:17 -0800 130)
0b24becc810dc (Andrey Ryabinin 2015-02-13 14:39:17 -0800 131) config KASAN_INLINE
0b24becc810dc (Andrey Ryabinin 2015-02-13 14:39:17 -0800 132) bool "Inline instrumentation"
0b24becc810dc (Andrey Ryabinin 2015-02-13 14:39:17 -0800 133) help
0b24becc810dc (Andrey Ryabinin 2015-02-13 14:39:17 -0800 134) Compiler directly inserts code checking shadow memory before
0b24becc810dc (Andrey Ryabinin 2015-02-13 14:39:17 -0800 135) memory accesses. This is faster than outline (in some workloads
0b24becc810dc (Andrey Ryabinin 2015-02-13 14:39:17 -0800 136) it gives about x2 boost over outline instrumentation), but
0b24becc810dc (Andrey Ryabinin 2015-02-13 14:39:17 -0800 137) make kernel's .text size much bigger.
0b24becc810dc (Andrey Ryabinin 2015-02-13 14:39:17 -0800 138)
0b24becc810dc (Andrey Ryabinin 2015-02-13 14:39:17 -0800 139) endchoice
0b24becc810dc (Andrey Ryabinin 2015-02-13 14:39:17 -0800 140)
02c587733c816 (Walter Wu 2021-04-16 15:46:00 -0700 141) config KASAN_STACK
6baec880d7a53 (Arnd Bergmann 2019-02-28 16:21:58 -0800 142) bool "Enable stack instrumentation (unsafe)" if CC_IS_CLANG && !COMPILE_TEST
6a63a63ff1ac2 (Andrey Konovalov 2020-12-22 12:01:20 -0800 143) depends on KASAN_GENERIC || KASAN_SW_TAGS
02c587733c816 (Walter Wu 2021-04-16 15:46:00 -0700 144) default y if CC_IS_GCC
6baec880d7a53 (Arnd Bergmann 2019-02-28 16:21:58 -0800 145) help
6baec880d7a53 (Arnd Bergmann 2019-02-28 16:21:58 -0800 146) The LLVM stack address sanitizer has a know problem that
6baec880d7a53 (Arnd Bergmann 2019-02-28 16:21:58 -0800 147) causes excessive stack usage in a lot of functions, see
6baec880d7a53 (Arnd Bergmann 2019-02-28 16:21:58 -0800 148) https://bugs.llvm.org/show_bug.cgi?id=38809
6baec880d7a53 (Arnd Bergmann 2019-02-28 16:21:58 -0800 149) Disabling asan-stack makes it safe to run kernels build
6baec880d7a53 (Arnd Bergmann 2019-02-28 16:21:58 -0800 150) with clang-8 with KASAN enabled, though it loses some of
6baec880d7a53 (Arnd Bergmann 2019-02-28 16:21:58 -0800 151) the functionality.
ebb6d35a74ce2 (Arnd Bergmann 2019-08-02 21:48:54 -0700 152) This feature is always disabled when compile-testing with clang
ebb6d35a74ce2 (Arnd Bergmann 2019-08-02 21:48:54 -0700 153) to avoid cluttering the output in stack overflow warnings,
ebb6d35a74ce2 (Arnd Bergmann 2019-08-02 21:48:54 -0700 154) but clang users can still enable it for builds without
ebb6d35a74ce2 (Arnd Bergmann 2019-08-02 21:48:54 -0700 155) CONFIG_COMPILE_TEST. On gcc it is assumed to always be safe
ebb6d35a74ce2 (Arnd Bergmann 2019-08-02 21:48:54 -0700 156) to use and enabled by default.
6baec880d7a53 (Arnd Bergmann 2019-02-28 16:21:58 -0800 157)
ae8f06b31a83e (Walter Wu 2019-09-23 15:34:13 -0700 158) config KASAN_SW_TAGS_IDENTIFY
ae8f06b31a83e (Walter Wu 2019-09-23 15:34:13 -0700 159) bool "Enable memory corruption identification"
ae8f06b31a83e (Walter Wu 2019-09-23 15:34:13 -0700 160) depends on KASAN_SW_TAGS
ae8f06b31a83e (Walter Wu 2019-09-23 15:34:13 -0700 161) help
ae8f06b31a83e (Walter Wu 2019-09-23 15:34:13 -0700 162) This option enables best-effort identification of bug type
ae8f06b31a83e (Walter Wu 2019-09-23 15:34:13 -0700 163) (use-after-free or out-of-bounds) at the cost of increased
ae8f06b31a83e (Walter Wu 2019-09-23 15:34:13 -0700 164) memory consumption.
ae8f06b31a83e (Walter Wu 2019-09-23 15:34:13 -0700 165)
3c5c3cfb9ef4d (Daniel Axtens 2019-11-30 17:54:50 -0800 166) config KASAN_VMALLOC
3c5c3cfb9ef4d (Daniel Axtens 2019-11-30 17:54:50 -0800 167) bool "Back mappings in vmalloc space with real shadow memory"
71f6af6d52ceb (Andrey Konovalov 2020-12-22 12:00:10 -0800 168) depends on KASAN_GENERIC && HAVE_ARCH_KASAN_VMALLOC
3c5c3cfb9ef4d (Daniel Axtens 2019-11-30 17:54:50 -0800 169) help
3c5c3cfb9ef4d (Daniel Axtens 2019-11-30 17:54:50 -0800 170) By default, the shadow region for vmalloc space is the read-only
3c5c3cfb9ef4d (Daniel Axtens 2019-11-30 17:54:50 -0800 171) zero page. This means that KASAN cannot detect errors involving
3c5c3cfb9ef4d (Daniel Axtens 2019-11-30 17:54:50 -0800 172) vmalloc space.
3c5c3cfb9ef4d (Daniel Axtens 2019-11-30 17:54:50 -0800 173)
3c5c3cfb9ef4d (Daniel Axtens 2019-11-30 17:54:50 -0800 174) Enabling this option will hook in to vmap/vmalloc and back those
3c5c3cfb9ef4d (Daniel Axtens 2019-11-30 17:54:50 -0800 175) mappings with real shadow memory allocated on demand. This allows
3c5c3cfb9ef4d (Daniel Axtens 2019-11-30 17:54:50 -0800 176) for KASAN to detect more sorts of errors (and to support vmapped
3c5c3cfb9ef4d (Daniel Axtens 2019-11-30 17:54:50 -0800 177) stacks), but at the cost of higher memory usage.
3c5c3cfb9ef4d (Daniel Axtens 2019-11-30 17:54:50 -0800 178)
73228c7ecc5e4 (Patricia Alfonso 2020-10-13 16:55:06 -0700 179) config KASAN_KUNIT_TEST
73228c7ecc5e4 (Patricia Alfonso 2020-10-13 16:55:06 -0700 180) tristate "KUnit-compatible tests of KASAN bug detection capabilities" if !KUNIT_ALL_TESTS
73228c7ecc5e4 (Patricia Alfonso 2020-10-13 16:55:06 -0700 181) depends on KASAN && KUNIT
73228c7ecc5e4 (Patricia Alfonso 2020-10-13 16:55:06 -0700 182) default KUNIT_ALL_TESTS
3f15801cdc237 (Andrey Ryabinin 2015-02-13 14:39:53 -0800 183) help
73228c7ecc5e4 (Patricia Alfonso 2020-10-13 16:55:06 -0700 184) This is a KUnit test suite doing various nasty things like
73228c7ecc5e4 (Patricia Alfonso 2020-10-13 16:55:06 -0700 185) out of bounds and use after free accesses. It is useful for testing
2bd926b439b4c (Andrey Konovalov 2018-12-28 00:29:53 -0800 186) kernel debugging features like KASAN.
7a3767f83f173 (Marco Elver 2020-08-06 23:24:28 -0700 187)
73228c7ecc5e4 (Patricia Alfonso 2020-10-13 16:55:06 -0700 188) For more information on KUnit and unit tests in general, please refer
f05842cfb9ae2 (Andrey Konovalov 2021-02-24 12:05:26 -0800 189) to the KUnit documentation in Documentation/dev-tools/kunit.
73228c7ecc5e4 (Patricia Alfonso 2020-10-13 16:55:06 -0700 190)
5d92bdffd2d53 (Andrey Konovalov 2021-02-24 12:05:29 -0800 191) config KASAN_MODULE_TEST
73228c7ecc5e4 (Patricia Alfonso 2020-10-13 16:55:06 -0700 192) tristate "KUnit-incompatible tests of KASAN bug detection capabilities"
f05842cfb9ae2 (Andrey Konovalov 2021-02-24 12:05:26 -0800 193) depends on m && KASAN && !KASAN_HW_TAGS
73228c7ecc5e4 (Patricia Alfonso 2020-10-13 16:55:06 -0700 194) help
73228c7ecc5e4 (Patricia Alfonso 2020-10-13 16:55:06 -0700 195) This is a part of the KASAN test suite that is incompatible with
73228c7ecc5e4 (Patricia Alfonso 2020-10-13 16:55:06 -0700 196) KUnit. Currently includes tests that do bad copy_from/to_user
73228c7ecc5e4 (Patricia Alfonso 2020-10-13 16:55:06 -0700 197) accesses.
73228c7ecc5e4 (Patricia Alfonso 2020-10-13 16:55:06 -0700 198)
7a3767f83f173 (Marco Elver 2020-08-06 23:24:28 -0700 199) endif # KASAN