[PATCH V2 31/41] x86/nmi: Remove stack protector from nmi.c

From: Lai Jiangshan
Date: Sun Sep 26 2021 - 11:12:45 EST


From: Lai Jiangshan <laijs@xxxxxxxxxxxxxxxxx>

nmi.c is going to contain __entry_code which can not be instrumented
by stack protector.

Signed-off-by: Lai Jiangshan <laijs@xxxxxxxxxxxxxxxxx>
---
arch/x86/kernel/Makefile | 2 ++
1 file changed, 2 insertions(+)

diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
index 0e054e2304c6..f56e8088c85d 100644
--- a/arch/x86/kernel/Makefile
+++ b/arch/x86/kernel/Makefile
@@ -50,6 +50,8 @@ CFLAGS_head$(BITS).o += -fno-stack-protector

CFLAGS_REMOVE_traps.o = -fstack-protector -fstack-protector-strong
CFLAGS_traps.o += -fno-stack-protector
+CFLAGS_REMOVE_nmi.o = -fstack-protector -fstack-protector-strong
+CFLAGS_nmi.o += -fno-stack-protector

CFLAGS_irq.o := -I $(srctree)/$(src)/../include/asm/trace

--
2.19.1.6.gb485710b