Skip to content

Commit

Permalink
mips: Enable KCSAN
Browse files Browse the repository at this point in the history
[ Upstream commit e0a8b93 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
nrakovic authored and gregkh committed Apr 8, 2022
1 parent f051deb commit 958b599
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch/mips/Kconfig
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions arch/mips/boot/compressed/Makefile
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions arch/mips/vdso/Makefile
@@ -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
Expand Down

0 comments on commit 958b599

Please sign in to comment.