aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.ubsan3
-rw-r--r--scripts/integer-wrap-ignore.scl3
2 files changed, 5 insertions, 1 deletions
diff --git a/scripts/Makefile.ubsan b/scripts/Makefile.ubsan
index 233379c193a75..9e35198edbf0d 100644
--- a/scripts/Makefile.ubsan
+++ b/scripts/Makefile.ubsan
@@ -19,5 +19,6 @@ ubsan-integer-wrap-cflags-$(CONFIG_UBSAN_INTEGER_WRAP) += \
-fsanitize=signed-integer-overflow \
-fsanitize=unsigned-integer-overflow \
-fsanitize=implicit-signed-integer-truncation \
- -fsanitize=implicit-unsigned-integer-truncation
+ -fsanitize=implicit-unsigned-integer-truncation \
+ -fsanitize-ignorelist=$(srctree)/scripts/integer-wrap-ignore.scl
export CFLAGS_UBSAN_INTEGER_WRAP := $(ubsan-integer-wrap-cflags-y)
diff --git a/scripts/integer-wrap-ignore.scl b/scripts/integer-wrap-ignore.scl
new file mode 100644
index 0000000000000..431c3053a4a2d
--- /dev/null
+++ b/scripts/integer-wrap-ignore.scl
@@ -0,0 +1,3 @@
+[{unsigned-integer-overflow,signed-integer-overflow,implicit-signed-integer-truncation,implicit-unsigned-integer-truncation}]
+type:*
+type:size_t=sanitize