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>
This commit is contained in:
parent
f296190e41
commit
725c4d22bb
2 changed files with 15 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue