aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/stackprotector.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/include/asm/stackprotector.h')
-rw-r--r--arch/x86/include/asm/stackprotector.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/include/asm/stackprotector.h b/arch/x86/include/asm/stackprotector.h
index 2383e5bb475c..36a700acaf2b 100644
--- a/arch/x86/include/asm/stackprotector.h
+++ b/arch/x86/include/asm/stackprotector.h
@@ -2,7 +2,7 @@
2#define _ASM_STACKPROTECTOR_H 1 2#define _ASM_STACKPROTECTOR_H 1
3 3
4#include <asm/tsc.h> 4#include <asm/tsc.h>
5#include <asm/pda.h> 5#include <asm/processor.h>
6 6
7/* 7/*
8 * Initialize the stackprotector canary value. 8 * Initialize the stackprotector canary value.
@@ -19,7 +19,7 @@ static __always_inline void boot_init_stack_canary(void)
19 * Build time only check to make sure the stack_canary is at 19 * Build time only check to make sure the stack_canary is at
20 * offset 40 in the pda; this is a gcc ABI requirement 20 * offset 40 in the pda; this is a gcc ABI requirement
21 */ 21 */
22 BUILD_BUG_ON(offsetof(struct x8664_pda, stack_canary) != 40); 22 BUILD_BUG_ON(offsetof(union irq_stack_union, stack_canary) != 40);
23 23
24 /* 24 /*
25 * We both use the random pool and the current TSC as a source 25 * We both use the random pool and the current TSC as a source
@@ -32,7 +32,7 @@ static __always_inline void boot_init_stack_canary(void)
32 canary += tsc + (tsc << 32UL); 32 canary += tsc + (tsc << 32UL);
33 33
34 current->stack_canary = canary; 34 current->stack_canary = canary;
35 write_pda(stack_canary, canary); 35 percpu_write(irq_stack_union.stack_canary, canary);
36} 36}
37 37
38#endif 38#endif