linux-edac.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2 27/41] x86/mce: Remove stack protector from mce/core.c
       [not found] <20210926150838.197719-1-jiangshanlai@gmail.com>
@ 2021-09-26 15:08 ` Lai Jiangshan
  0 siblings, 0 replies; only message in thread
From: Lai Jiangshan @ 2021-09-26 15:08 UTC (permalink / raw)
  To: linux-kernel
  Cc: Lai Jiangshan, Tony Luck, Borislav Petkov, Thomas Gleixner,
	Ingo Molnar, x86, H. Peter Anvin, linux-edac

From: Lai Jiangshan <laijs@linux.alibaba.com>

mce/core.c is going to contain __entry_code which can not be instrumented
by stack protector.

Signed-off-by: Lai Jiangshan <laijs@linux.alibaba.com>
---
 arch/x86/kernel/cpu/mce/Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/x86/kernel/cpu/mce/Makefile b/arch/x86/kernel/cpu/mce/Makefile
index 015856abdbb1..ce192c5344fc 100644
--- a/arch/x86/kernel/cpu/mce/Makefile
+++ b/arch/x86/kernel/cpu/mce/Makefile
@@ -1,4 +1,8 @@
 # SPDX-License-Identifier: GPL-2.0
+
+CFLAGS_REMOVE_core.o		= -fstack-protector -fstack-protector-strong
+CFLAGS_core.o			+= -fno-stack-protector
+
 obj-y				=  core.o severity.o genpool.o
 
 obj-$(CONFIG_X86_ANCIENT_MCE)	+= winchip.o p5.o
-- 
2.19.1.6.gb485710b


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-09-26 15:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20210926150838.197719-1-jiangshanlai@gmail.com>
2021-09-26 15:08 ` [PATCH V2 27/41] x86/mce: Remove stack protector from mce/core.c Lai Jiangshan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).