Unverified Commit 1e35918a authored by Hassan Naveed's avatar Hassan Naveed Committed by Paul Burton
Browse files

MIPS: Enable Undefined Behavior Sanitizer UBSAN



Select ARCH_HAS_UBSAN_SANITIZE_ALL in order to allow the user to
enable CONFIG_UBSAN_SANITIZE_ALL and instrument the entire kernel for
ubsan checks.
We exclude the VDSO from this because its build doesn't include the
__ubsan_handle_*() functions that the kernel proper defines in from
lib/ubsan.c, and the VDSO would have no sane way to report errors even
if it had definitions of these functions.

Signed-off-by: default avatarHassan Naveed <hnaveed@wavecomp.com>
Reviewed-by: default avatarPaul Burton <paul.burton@mips.com>
Signed-off-by: default avatarPaul Burton <paul.burton@mips.com>
Patchwork: https://patchwork.linux-mips.org/patch/21179/
Cc: <linux-mips@linux-mips.org>
parent f3ade253
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@ config MIPS
	select ARCH_DISCARD_MEMBLOCK
	select ARCH_HAS_ELF_RANDOMIZE
	select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
	select ARCH_HAS_UBSAN_SANITIZE_ALL
	select ARCH_SUPPORTS_UPROBES
	select ARCH_USE_BUILTIN_BSWAP
	select ARCH_USE_CMPXCHG_LOCKREF if 64BIT
+1 −0
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@ VDSO_LDFLAGS := \
	$(call cc-ldoption, -Wl$(comma)--build-id)

GCOV_PROFILE := n
UBSAN_SANITIZE := n

#
# Shared build commands.