mips: Enable KCSAN
authorNemanja Rakovic <nemanja.rakovic@syrmia.com>
Mon, 31 Jan 2022 10:17:09 +0000 (11:17 +0100)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Mon, 7 Feb 2022 17:31:57 +0000 (18:31 +0100)
This patch enables KCSAN for the 64-bit version. Updated rules
for the incompatible compilation units (vdso, boot/compressed).

Signed-off-by: Nemanja Rakovic <nemanja.rakovic@syrmia.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/Kconfig
arch/mips/boot/compressed/Makefile
arch/mips/vdso/Makefile

index da6b3e0501a79278347c9c9df87248bc310f370a..c6672547ac5e580bbd4de782c3f04ce1fe07c334 100644 (file)
@@ -101,6 +101,7 @@ config MIPS
        select TRACE_IRQFLAGS_SUPPORT
        select VIRT_TO_BUS
        select ARCH_HAS_ELFCORE_COMPAT
+       select HAVE_ARCH_KCSAN if 64BIT
 
 config MIPS_FIXUP_BIGPHYS_ADDR
        bool
index 5a15d51e888416fbe58cdf5d4bd411f0edbf6722..a35f78212ea9f1d77034d452855a5029fe2295f7 100644 (file)
@@ -38,6 +38,7 @@ KBUILD_AFLAGS := $(KBUILD_AFLAGS) -D__ASSEMBLY__ \
 KCOV_INSTRUMENT                := n
 GCOV_PROFILE := n
 UBSAN_SANITIZE := n
+KASAN_SANITIZE                 := n
 
 # decompressor objects (linked with vmlinuz)
 vmlinuzobjs-y := $(obj)/head.o $(obj)/decompress.o $(obj)/string.o $(obj)/bswapsi.o
index d65f55f67e19bcaa3f3649d5a1f162cfdcb3d1bd..f72658b3a53f71e2cf7dfd132be4a2442d88497f 100644 (file)
@@ -1,6 +1,9 @@
 # SPDX-License-Identifier: GPL-2.0
 # Objects to go into the VDSO.
 
+# Sanitizer runtimes are unavailable and cannot be linked here.
+ KCSAN_SANITIZE                        := n
+
 # Absolute relocation type $(ARCH_REL_TYPE_ABS) needs to be defined before
 # the inclusion of generic Makefile.
 ARCH_REL_TYPE_ABS := R_MIPS_JUMP_SLOT|R_MIPS_GLOB_DAT