Commit 76397f72 authored by Tejun Heo's avatar Tejun Heo Committed by Ingo Molnar

x86: stackprotector.h misc update

Impact: misc udpate

* wrap content with CONFIG_CC_STACK_PROTECTOR so that other arch files
  can include it directly

* add missing includes

This will help future changes.
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 6cd61c0b
#ifndef _ASM_STACKPROTECTOR_H #ifndef _ASM_STACKPROTECTOR_H
#define _ASM_STACKPROTECTOR_H 1 #define _ASM_STACKPROTECTOR_H 1
#ifdef CONFIG_CC_STACKPROTECTOR
#include <asm/tsc.h> #include <asm/tsc.h>
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/percpu.h>
#include <linux/random.h>
/* /*
* Initialize the stackprotector canary value. * Initialize the stackprotector canary value.
...@@ -35,4 +39,5 @@ static __always_inline void boot_init_stack_canary(void) ...@@ -35,4 +39,5 @@ static __always_inline void boot_init_stack_canary(void)
percpu_write(irq_stack_union.stack_canary, canary); percpu_write(irq_stack_union.stack_canary, canary);
} }
#endif #endif /* CC_STACKPROTECTOR */
#endif /* _ASM_STACKPROTECTOR_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment