summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/powermac
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@c-s.fr>2019-04-26 16:23:33 +0000
committerMichael Ellerman <mpe@ellerman.id.au>2019-05-03 01:20:26 +1000
commitf072015c7b742c42aa5649d22f43163cd0eb7024 (patch)
treec4d95b90f992cf837ae87193d6944244de9c4f4a /arch/powerpc/platforms/powermac
parentb4abe38fd698ace6942edeeb79a5b8a60a7af4fa (diff)
downloadblackbird-op-linux-f072015c7b742c42aa5649d22f43163cd0eb7024.tar.gz
blackbird-op-linux-f072015c7b742c42aa5649d22f43163cd0eb7024.zip
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>
Diffstat (limited to 'arch/powerpc/platforms/powermac')
-rw-r--r--arch/powerpc/platforms/powermac/Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/powermac/Makefile b/arch/powerpc/platforms/powermac/Makefile
index 20ebf35d7913..f4247ade71ca 100644
--- a/arch/powerpc/platforms/powermac/Makefile
+++ b/arch/powerpc/platforms/powermac/Makefile
@@ -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)
OpenPOWER on IntegriCloud