aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/system.h
diff options
context:
space:
mode:
authorBrian Gerst <brgerst@gmail.com>2009-01-18 22:21:28 -0500
committerTejun Heo <tj@kernel.org>2009-01-19 22:29:20 -0500
commit947e76cdc34c782fc947313d4331380686eebbad (patch)
treede5d424c4760269fd7800bc745e48b060c725300 /arch/x86/include/asm/system.h
parent8c7e58e690ae60ab4215b025f433ed4af261e103 (diff)
x86: move stack_canary into irq_stack
Impact: x86_64 percpu area layout change, irq_stack now at the beginning Now that the PDA is empty except for the stack canary, it can be removed. The irqstack is moved to the start of the per-cpu section. If the stack protector is enabled, the canary overlaps the bottom 48 bytes of the irqstack. tj: * updated subject * dropped asm relocation of irq_stack_ptr * updated comments a bit * rebased on top of stack canary changes Signed-off-by: Brian Gerst <brgerst@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'arch/x86/include/asm/system.h')
-rw-r--r--arch/x86/include/asm/system.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/include/asm/system.h b/arch/x86/include/asm/system.h
index b77bd8bd3cc2..52eb748a68af 100644
--- a/arch/x86/include/asm/system.h
+++ b/arch/x86/include/asm/system.h
@@ -89,10 +89,10 @@ do { \
89#ifdef CONFIG_CC_STACKPROTECTOR 89#ifdef CONFIG_CC_STACKPROTECTOR
90#define __switch_canary \ 90#define __switch_canary \
91 "movq %P[task_canary](%%rsi),%%r8\n\t" \ 91 "movq %P[task_canary](%%rsi),%%r8\n\t" \
92 "movq %%r8,%%gs:%P[pda_canary]\n\t" 92 "movq %%r8,%%gs:%P[gs_canary]\n\t"
93#define __switch_canary_param \ 93#define __switch_canary_param \
94 , [task_canary] "i" (offsetof(struct task_struct, stack_canary)) \ 94 , [task_canary] "i" (offsetof(struct task_struct, stack_canary)) \
95 , [pda_canary] "i" (offsetof(struct x8664_pda, stack_canary)) 95 , [gs_canary] "i" (offsetof(union irq_stack_union, stack_canary))
96#else /* CC_STACKPROTECTOR */ 96#else /* CC_STACKPROTECTOR */
97#define __switch_canary 97#define __switch_canary
98#define __switch_canary_param 98#define __switch_canary_param