diff options
-rw-r--r-- | arch/x86/include/asm/stackprotector.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/x86/include/asm/stackprotector.h b/arch/x86/include/asm/stackprotector.h index 36a700acaf2b..ee275e9f48ab 100644 --- a/arch/x86/include/asm/stackprotector.h +++ b/arch/x86/include/asm/stackprotector.h | |||
@@ -1,8 +1,12 @@ | |||
1 | #ifndef _ASM_STACKPROTECTOR_H | 1 | #ifndef _ASM_STACKPROTECTOR_H |
2 | #define _ASM_STACKPROTECTOR_H 1 | 2 | #define _ASM_STACKPROTECTOR_H 1 |
3 | 3 | ||
4 | #ifdef CONFIG_CC_STACKPROTECTOR | ||
5 | |||
4 | #include <asm/tsc.h> | 6 | #include <asm/tsc.h> |
5 | #include <asm/processor.h> | 7 | #include <asm/processor.h> |
8 | #include <asm/percpu.h> | ||
9 | #include <linux/random.h> | ||
6 | 10 | ||
7 | /* | 11 | /* |
8 | * Initialize the stackprotector canary value. | 12 | * Initialize the stackprotector canary value. |
@@ -35,4 +39,5 @@ static __always_inline void boot_init_stack_canary(void) | |||
35 | percpu_write(irq_stack_union.stack_canary, canary); | 39 | percpu_write(irq_stack_union.stack_canary, canary); |
36 | } | 40 | } |
37 | 41 | ||
38 | #endif | 42 | #endif /* CC_STACKPROTECTOR */ |
43 | #endif /* _ASM_STACKPROTECTOR_H */ | ||