]> git.ipfire.org Git - thirdparty/kernel/linux.git/blame - lib/Kconfig.ubsan
Merge tag 'drm-fixes-2019-03-29' of git://anongit.freedesktop.org/drm/drm
[thirdparty/kernel/linux.git] / lib / Kconfig.ubsan
CommitLineData
c6d30853
AR
1config ARCH_HAS_UBSAN_SANITIZE_ALL
2 bool
3
4config UBSAN
5 bool "Undefined behaviour sanity checker"
6 help
7 This option enables undefined behaviour sanity checker
8 Compile-time instrumentation is used to detect various undefined
9 behaviours in runtime. Various types of checks may be enabled
04625547
AP
10 via boot parameter ubsan_handle
11 (see: Documentation/dev-tools/ubsan.rst).
c6d30853
AR
12
13config UBSAN_SANITIZE_ALL
14 bool "Enable instrumentation for the entire kernel"
15 depends on UBSAN
16 depends on ARCH_HAS_UBSAN_SANITIZE_ALL
dde5cf39
AR
17
18 # We build with -Wno-maybe-uninitilzed, but we still want to
19 # use -Wmaybe-uninitilized in allmodconfig builds.
20 # So dependsy bellow used to disable this option in allmodconfig
21 depends on !COMPILE_TEST
c6d30853
AR
22 default y
23 help
24 This option activates instrumentation for the entire kernel.
25 If you don't enable this option, you have to explicitly specify
26 UBSAN_SANITIZE := y for the files/directories you want to check for UB.
7707535a
YS
27 Enabling this option will get kernel image size increased
28 significantly.
c6d30853 29
1a6a1dbe
AR
30config UBSAN_NO_ALIGNMENT
31 bool "Disable checking of pointers alignment"
c6d30853 32 depends on UBSAN
1a6a1dbe 33 default y if HAVE_EFFICIENT_UNALIGNED_ACCESS
c6d30853 34 help
1a6a1dbe
AR
35 This option disables the check of unaligned memory accesses.
36 This option should be used when building allmodconfig.
37 Disabling this option on architectures that support unaligned
c6d30853 38 accesses may produce a lot of false positives.
725c4d22 39
1a6a1dbe
AR
40config UBSAN_ALIGNMENT
41 def_bool !UBSAN_NO_ALIGNMENT
42
854686f4
JP
43config TEST_UBSAN
44 tristate "Module for testing for undefined behavior detection"
45 depends on m && UBSAN
46 help
47 This is a test module for UBSAN.
48 It triggers various undefined behavior, and detect it.