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

父節點
b4abe38fd6
當前提交
f072015c7b
@@ -2,6 +2,12 @@
|
||||
CFLAGS_bootx_init.o += -fPIC
|
||||
CFLAGS_bootx_init.o += $(call cc-option, -fno-stack-protector)
|
||||
|
||||
KASAN_SANITIZE_bootx_init.o := n
|
||||
|
||||
ifdef CONFIG_KASAN
|
||||
CFLAGS_bootx_init.o += -DDISABLE_BRANCH_PROFILING
|
||||
endif
|
||||
|
||||
ifdef CONFIG_FUNCTION_TRACER
|
||||
# Do not trace early boot code
|
||||
CFLAGS_REMOVE_bootx_init.o = $(CC_FLAGS_FTRACE)
|
||||
|
Reference in New Issue
Block a user