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:
Christophe Leroy
2019-04-26 16:23:33 +00:00
committed by Michael Ellerman
父節點 b4abe38fd6
當前提交 f072015c7b
共有 6 個文件被更改,包括 36 次插入0 次删除

查看文件

@@ -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)