powerpc: disable KASAN instrumentation on early/critical files.
All files containing functions run before kasan_early_init() is called must have KASAN instrumentation disabled. For those file, branch profiling also have to be disabled otherwise each if () generates a call to ftrace_likely_update(). Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:

committed by
Michael Ellerman

parent
b4abe38fd6
commit
f072015c7b
@@ -31,6 +31,18 @@ CFLAGS_REMOVE_btext.o = $(CC_FLAGS_FTRACE)
|
||||
CFLAGS_REMOVE_prom.o = $(CC_FLAGS_FTRACE)
|
||||
endif
|
||||
|
||||
KASAN_SANITIZE_early_32.o := n
|
||||
KASAN_SANITIZE_cputable.o := n
|
||||
KASAN_SANITIZE_prom_init.o := n
|
||||
KASAN_SANITIZE_btext.o := n
|
||||
|
||||
ifdef CONFIG_KASAN
|
||||
CFLAGS_early_32.o += -DDISABLE_BRANCH_PROFILING
|
||||
CFLAGS_cputable.o += -DDISABLE_BRANCH_PROFILING
|
||||
CFLAGS_prom_init.o += -DDISABLE_BRANCH_PROFILING
|
||||
CFLAGS_btext.o += -DDISABLE_BRANCH_PROFILING
|
||||
endif
|
||||
|
||||
obj-y := cputable.o ptrace.o syscalls.o \
|
||||
irq.o align.o signal_32.o pmc.o vdso.o \
|
||||
process.o systbl.o idle.o \
|
||||
|
Reference in New Issue
Block a user