mirror of
https://github.com/torvalds/linux.git
synced 2024-12-11 21:52:04 +00:00
c648c4bb7d
__virt_to_phys function is called very early in the boot process (ie
kasan_early_init) so it should not be instrumented by KASAN otherwise it
bugs.
Fix this by declaring phys_addr.c as non-kasan instrumentable.
Signed-off-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
Fixes: 8ad8b72721
(riscv: Add KASAN support)
Cc: stable@vger.kernel.org
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
33 lines
711 B
Makefile
33 lines
711 B
Makefile
# SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
CFLAGS_init.o := -mcmodel=medany
|
|
ifdef CONFIG_FTRACE
|
|
CFLAGS_REMOVE_init.o = $(CC_FLAGS_FTRACE)
|
|
CFLAGS_REMOVE_cacheflush.o = $(CC_FLAGS_FTRACE)
|
|
endif
|
|
|
|
KCOV_INSTRUMENT_init.o := n
|
|
|
|
obj-y += init.o
|
|
obj-y += extable.o
|
|
obj-$(CONFIG_MMU) += fault.o pageattr.o
|
|
obj-y += cacheflush.o
|
|
obj-y += context.o
|
|
|
|
ifeq ($(CONFIG_MMU),y)
|
|
obj-$(CONFIG_SMP) += tlbflush.o
|
|
endif
|
|
obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
|
|
obj-$(CONFIG_PTDUMP_CORE) += ptdump.o
|
|
obj-$(CONFIG_KASAN) += kasan_init.o
|
|
|
|
ifdef CONFIG_KASAN
|
|
KASAN_SANITIZE_kasan_init.o := n
|
|
KASAN_SANITIZE_init.o := n
|
|
ifdef CONFIG_DEBUG_VIRTUAL
|
|
KASAN_SANITIZE_physaddr.o := n
|
|
endif
|
|
endif
|
|
|
|
obj-$(CONFIG_DEBUG_VIRTUAL) += physaddr.o
|