mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 6/9] x86: initialize stack canary in secondary start
@ 2010-02-13  1:40 Pan, Jacob jun
  2010-02-20  1:28 ` [tip:x86/mrst] x86: Initialize " tip-bot for Jacob Pan
  0 siblings, 1 reply; 4+ messages in thread
From: Pan, Jacob jun @ 2010-02-13  1:40 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ingo Molnar, Thomas Gleixner, Arjan van de Ven, Barnes, Jesse,
	Du, Alek, Tang, Feng, H. Peter Anvin

>From 0d84c04b845a36cf43aaa14c175ef10ff5e50480 Mon Sep 17 00:00:00 2001
From: Jacob Pan <jacob.jun.pan@intel.com>
Date: Thu, 17 Sep 2009 07:36:43 -0700
Subject: [PATCH 6/9] x86: initialize stack canary in secondary start

some secondary clockevent setup code needs to call request_irq, which will
cause fake stack check failure in schedule() if voluntary preemption
model is chosen, it is safe to have stack canary initialized here early,
since start_secondary() does not return.

Signed-off-by: Jacob Pan <jacob.jun.pan@intel.com>
---
 arch/x86/kernel/smpboot.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 678d0b8..56ce974 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -48,6 +48,7 @@
 #include <linux/err.h>
 #include <linux/nmi.h>
 #include <linux/tboot.h>
+#include <linux/stackprotector.h>
 
 #include <asm/acpi.h>
 #include <asm/desc.h>
@@ -324,6 +325,9 @@ notrace static void __cpuinit start_secondary(void *unused)
 	/* enable local interrupts */
 	local_irq_enable();
 
+	/* to prevent fake stack check failure in clock setup */
+	boot_init_stack_canary();
+
 	x86_cpuinit.setup_percpu_clockev();
 
 	wmb();
-- 
1.6.5.3


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-02-22 18:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-13  1:40 [PATCH 6/9] x86: initialize stack canary in secondary start Pan, Jacob jun
2010-02-20  1:28 ` [tip:x86/mrst] x86: Initialize " tip-bot for Jacob Pan
2010-02-20  8:04   ` Thomas Gleixner
2010-02-22 18:24     ` Pan, Jacob jun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome