Lines Matching +full:in +full:- +full:and +full:- +full:around
1 # SPDX-License-Identifier: GPL-2.0-only
10 Compile-time instrumentation is used to detect various undefined
12 Documentation/dev-tools/ubsan.rst
21 the kernel size by around 5%, due to adding all the debugging
28 trade-off.
32 when a UBSAN violation occurs. (Except on arm64 and x86, which
39 def_bool $(cc-option,-fsanitize=bounds-strict)
41 The -fsanitize=bounds-strict option is only available on GCC,
44 -fsanitize=bounds.
47 def_bool $(cc-option,-fsanitize=array-bounds)
49 Under Clang, the -fsanitize=bounds option is actually composed
50 of two more specific options, -fsanitize=array-bounds and
51 -fsanitize=local-bounds. However, -fsanitize=local-bounds can
53 CONFIG_LOCAL_BOUNDS.) Explicitly check for -fsanitize=array-bounds
72 correct options in Makefile.ubsan.
78 the correct options in Makefile.ubsan.
83 This option enables Clang's -fsanitize=local-bounds which traps
85 of a statically-known size, where an added offset (which may not
86 be known statically) is out-of-bounds. Since this option is
87 trap-only, it depends on CONFIG_UBSAN_TRAP.
90 bool "Perform checking for bit-shift overflows"
91 depends on $(cc-option,-fsanitize=shift)
93 This option enables -fsanitize=shift which checks for bit-shift
98 bool "Perform checking for integer divide-by-zero"
99 depends on $(cc-option,-fsanitize=integer-divide-by-zero)
101 # https://github.com/llvm/llvm-project/issues/56289
104 This option enables -fsanitize=integer-divide-by-zero which checks
111 # objtool already handles unreachable checking and gets angry about
112 # seeing UBSan instrumentation located in unreachable places.
114 depends on $(cc-option,-fsanitize=unreachable)
116 This option enables -fsanitize=unreachable which checks for control
117 flow reaching an expected-to-be-unreachable position.
120 bool "Perform checking for integer arithmetic wrap-around"
124 depends on $(cc-option,-fsanitize-undefined-ignore-overflow-pattern=all)
125 depends on $(cc-option,-fsanitize=signed-integer-overflow)
126 depends on $(cc-option,-fsanitize=unsigned-integer-overflow)
127 depends on $(cc-option,-fsanitize=implicit-signed-integer-truncation)
128 depends on $(cc-option,-fsanitize=implicit-unsigned-integer-truncation)
129 depends on $(cc-option,-fsanitize-ignorelist=/dev/null)
131 This option enables all of the sanitizers involved in integer overflow
132 (wrap-around) mitigation: signed-integer-overflow, unsigned-integer-overflow,
133 implicit-signed-integer-truncation, and implicit-unsigned-integer-truncation.
134 This is currently limited only to the size_t type while testing and
138 bool "Perform checking for non-boolean values used as boolean"
140 depends on $(cc-option,-fsanitize=bool)
142 This option enables -fsanitize=bool which checks for boolean values being
148 depends on $(cc-option,-fsanitize=enum)
150 This option enables -fsanitize=enum which checks for values being loaded
157 depends on $(cc-option,-fsanitize=alignment)
168 It triggers various undefined behavior, and detect it.
174 Enable UBSAN when running on ARM64 with KVM in a split mode
175 (nvhe/hvhe/protected) for the hypervisor code running in EL2.
176 In this mode, any UBSAN violation in EL2 would panic the kernel
177 and information similar to UBSAN_TRAP would be printed.