Lines Matching +full:mem +full:- +full:array
1 # SPDX-License-Identifier: GPL-2.0-only
10 Compile-time instrumentation is used to detect various undefined
12 Documentation/dev-tools/ubsan.rst
28 trade-off.
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
58 bool "Perform array index bounds checking"
63 array accesses, where the array size is known at compile time.
64 Note that this does not protect array overflows via bad calls
65 to the {str,mem}*cpy() family of functions (that is addressed
77 Clang's array bounds sanitizer. This option is used to select
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
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)
132 (wrap-around) mitigation: signed-integer-overflow, unsigned-integer-overflow,
133 implicit-signed-integer-truncation, and implicit-unsigned-integer-truncation.
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)