public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* VMI fix for stack protector
@ 2009-08-04 22:34 Alok Kataria
  2009-08-05  9:57 ` [tip:x86/urgent] x86: Fix VMI && " tip-bot for Alok Kataria
  0 siblings, 1 reply; 2+ messages in thread
From: Alok Kataria @ 2009-08-04 22:34 UTC (permalink / raw)
  To: H. Peter Anvin, Ingo Molnar; +Cc: the arch/x86 maintainers, LKML, stable


With CONFIG_STACK_PROTECTOR turned on, VMI doesn't boot with more than one
processor. The problem is with the gs value not being initialized correctly
when registering the secondary processor for VMI's case. 

The patch below initializes the gs value for the AP to __KERNEL_STACK_CANARY.
Without this the secondary processor keeps on taking a GP on every gs access.

Needs to go in for 2.6.30.x too, since STACK_PROTECTOR for 32bit was
introduced in 2.6.30.

Patch on top of 2.6.31-rc5.

Signed-off-by: Alok N Kataria <akataria@vmware.com>
Cc: stable@kernel.org

Index: linux-2.6/arch/x86/kernel/vmi_32.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/vmi_32.c	2009-08-03 13:55:41.000000000 -0700
+++ linux-2.6/arch/x86/kernel/vmi_32.c	2009-08-04 14:13:22.000000000 -0700
@@ -442,7 +442,7 @@ vmi_startup_ipi_hook(int phys_apicid, un
 	ap.ds = __USER_DS;
 	ap.es = __USER_DS;
 	ap.fs = __KERNEL_PERCPU;
-	ap.gs = 0;
+	ap.gs = __KERNEL_STACK_CANARY;
 
 	ap.eflags = 0;
 



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

end of thread, other threads:[~2009-08-05  9:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-04 22:34 VMI fix for stack protector Alok Kataria
2009-08-05  9:57 ` [tip:x86/urgent] x86: Fix VMI && " tip-bot for Alok Kataria

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