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 signed arithmetic wrap-around"
123 # The no_sanitize attribute was introduced in GCC with version 8.
125 depends on $(cc-option,-fsanitize=signed-integer-overflow)
127 This option enables -fsanitize=signed-integer-overflow which checks
128 for wrap-around of any arithmetic operations with signed integers.
130 kernel's use of -fno-strict-overflow which converts all would-be
131 arithmetic undefined behavior into wrap-around arithmetic. Future
132 sanitizer versions will allow for wrap-around checking (rather than
136 bool "Perform checking for non-boolean values used as boolean"
138 depends on $(cc-option,-fsanitize=bool)
140 This option enables -fsanitize=bool which checks for boolean values being
146 depends on $(cc-option,-fsanitize=enum)
148 This option enables -fsanitize=enum which checks for values being loaded
155 depends on $(cc-option,-fsanitize=alignment)
166 It triggers various undefined behavior, and detect it.