diff options
Diffstat (limited to 'arch/x86_64/kernel/process.c')
-rw-r--r-- | arch/x86_64/kernel/process.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/x86_64/kernel/process.c b/arch/x86_64/kernel/process.c index 9e9a70e50c72..fba8dfeda67c 100644 --- a/arch/x86_64/kernel/process.c +++ b/arch/x86_64/kernel/process.c | |||
@@ -625,6 +625,14 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p) | |||
625 | unlazy_fpu(prev_p); | 625 | unlazy_fpu(prev_p); |
626 | write_pda(kernelstack, | 626 | write_pda(kernelstack, |
627 | task_stack_page(next_p) + THREAD_SIZE - PDA_STACKOFFSET); | 627 | task_stack_page(next_p) + THREAD_SIZE - PDA_STACKOFFSET); |
628 | #ifdef CONFIG_CC_STACKPROTECTOR | ||
629 | write_pda(stack_canary, next_p->stack_canary); | ||
630 | /* | ||
631 | * Build time only check to make sure the stack_canary is at | ||
632 | * offset 40 in the pda; this is a gcc ABI requirement | ||
633 | */ | ||
634 | BUILD_BUG_ON(offsetof(struct x8664_pda, stack_canary) != 40); | ||
635 | #endif | ||
628 | 636 | ||
629 | /* | 637 | /* |
630 | * Now maybe reload the debug registers and handle I/O bitmaps | 638 | * Now maybe reload the debug registers and handle I/O bitmaps |