Skip to content

Commit

Permalink
x86: Fix VMI && stack protector
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Alok N Kataria <akataria@vmware.com>
Cc: <stable@kernel.org> # for v2.6.30.x
LKML-Reference: <1249425262.18955.40.camel@ank32.eng.vmware.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Alok Kataria authored and Ingo Molnar committed Aug 5, 2009
1 parent 90bc1a6 commit 7d5b005
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/kernel/vmi_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ vmi_startup_ipi_hook(int phys_apicid, unsigned long start_eip,
ap.ds = __USER_DS;
ap.es = __USER_DS;
ap.fs = __KERNEL_PERCPU;
ap.gs = 0;
ap.gs = __KERNEL_STACK_CANARY;

ap.eflags = 0;

Expand Down

0 comments on commit 7d5b005

Please sign in to comment.