1 config ARCH_HAS_UBSAN_SANITIZE_ALL
4 config ARCH_WANTS_UBSAN_NO_NULL
8 bool "Undefined behaviour sanity checker"
10 This option enables undefined behaviour sanity checker
11 Compile-time instrumentation is used to detect various undefined
12 behaviours in runtime. Various types of checks may be enabled
13 via boot parameter ubsan_handle
14 (see: Documentation/dev-tools/ubsan.rst).
16 config UBSAN_SANITIZE_ALL
17 bool "Enable instrumentation for the entire kernel"
19 depends on ARCH_HAS_UBSAN_SANITIZE_ALL
21 # We build with -Wno-maybe-uninitilzed, but we still want to
22 # use -Wmaybe-uninitilized in allmodconfig builds.
23 # So dependsy bellow used to disable this option in allmodconfig
24 depends on !COMPILE_TEST
27 This option activates instrumentation for the entire kernel.
28 If you don't enable this option, you have to explicitly specify
29 UBSAN_SANITIZE := y for the files/directories you want to check for UB.
30 Enabling this option will get kernel image size increased
33 config UBSAN_ALIGNMENT
34 bool "Enable checking of pointers alignment"
36 default y if !HAVE_EFFICIENT_UNALIGNED_ACCESS
38 This option enables detection of unaligned memory accesses.
39 Enabling this option on architectures that support unaligned
40 accesses may produce a lot of false positives.
43 bool "Enable checking of null pointers"
45 default y if !ARCH_WANTS_UBSAN_NO_NULL
47 This option enables detection of memory accesses via a
51 tristate "Module for testing for undefined behavior detection"
54 This is a test module for UBSAN.
55 It triggers various undefined behavior, and detect it.