summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorChristian Borntraeger <borntraeger@de.ibm.com>2016-09-12 14:37:19 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2016-09-20 14:26:08 +0200
commit725c4d22bbc4fcac5779963e0ff9cdf232afbb90 (patch)
treeaa31d4784fc88800c8c26d18ecf90efa59480ee2 /scripts
parents390/crashdump: use list_first_entry_or_null (diff)
downloadlinux-725c4d22bbc4fcac5779963e0ff9cdf232afbb90.tar.xz
linux-725c4d22bbc4fcac5779963e0ff9cdf232afbb90.zip
ubsan: allow to disable the null sanitizer
Some architectures use a hardware defined structure at address zero. Checking for a null pointer will result in many ubsan reports. Allow users to disable the null sanitizer. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Acked-by: Andrey Ryabinin <aryabinin@virtuozzo.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.ubsan5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/Makefile.ubsan b/scripts/Makefile.ubsan
index 8ab68679cfb5..dd779c40c8e6 100644
--- a/scripts/Makefile.ubsan
+++ b/scripts/Makefile.ubsan
@@ -3,7 +3,6 @@ ifdef CONFIG_UBSAN
CFLAGS_UBSAN += $(call cc-option, -fsanitize=integer-divide-by-zero)
CFLAGS_UBSAN += $(call cc-option, -fsanitize=unreachable)
CFLAGS_UBSAN += $(call cc-option, -fsanitize=vla-bound)
- CFLAGS_UBSAN += $(call cc-option, -fsanitize=null)
CFLAGS_UBSAN += $(call cc-option, -fsanitize=signed-integer-overflow)
CFLAGS_UBSAN += $(call cc-option, -fsanitize=bounds)
CFLAGS_UBSAN += $(call cc-option, -fsanitize=object-size)
@@ -14,4 +13,8 @@ ifdef CONFIG_UBSAN
ifdef CONFIG_UBSAN_ALIGNMENT
CFLAGS_UBSAN += $(call cc-option, -fsanitize=alignment)
endif
+
+ifdef CONFIG_UBSAN_NULL
+ CFLAGS_UBSAN += $(call cc-option, -fsanitize=null)
+endif
endif