[PATCH 4.9 071/104] kasan: do not sanitize kexec purgatory

From: Greg Kroah-Hartman
Date: Fri Oct 06 2017 - 04:56:34 EST


4.9-stable review patch. If anyone has any objections, please let me know.

------------------

From: Mike Galbraith <efault@xxxxxx>


[ Upstream commit 13a6798e4a03096b11bf402a063786a7be55d426 ]

Fixes this:

kexec: Undefined symbol: __asan_load8_noabort
kexec-bzImage64: Loading purgatory failed

Link: http://lkml.kernel.org/r/1489672155.4458.7.camel@xxxxxx
Signed-off-by: Mike Galbraith <efault@xxxxxx>
Cc: Alexander Potapenko <glider@xxxxxxxxxx>
Cc: Andrey Ryabinin <aryabinin@xxxxxxxxxxxxx>
Cc: Dmitry Vyukov <dvyukov@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Sasha Levin <alexander.levin@xxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
arch/x86/purgatory/Makefile | 1 +
1 file changed, 1 insertion(+)

--- a/arch/x86/purgatory/Makefile
+++ b/arch/x86/purgatory/Makefile
@@ -8,6 +8,7 @@ PURGATORY_OBJS = $(addprefix $(obj)/,$(p
LDFLAGS_purgatory.ro := -e purgatory_start -r --no-undefined -nostdlib -z nodefaultlib
targets += purgatory.ro

+KASAN_SANITIZE := n
KCOV_INSTRUMENT := n

# Default KBUILD_CFLAGS can have -pg option set when FTRACE is enabled. That