x86: stackprotector.h misc update
authorTejun Heo <tj@kernel.org>
Mon, 9 Feb 2009 13:17:39 +0000 (22:17 +0900)
committerIngo Molnar <mingo@elte.hu>
Mon, 9 Feb 2009 23:41:29 +0000 (00:41 +0100)
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: Tejun Heo <tj@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/include/asm/stackprotector.h

index 36a700acaf2bd36d15a25eca125e3a3f57115cb2..ee275e9f48ab8fa3f45b4b0cbce6f3f096fe1620 100644 (file)
@@ -1,8 +1,12 @@
 #ifndef _ASM_STACKPROTECTOR_H
 #define _ASM_STACKPROTECTOR_H 1
 
+#ifdef CONFIG_CC_STACKPROTECTOR
+
 #include <asm/tsc.h>
 #include <asm/processor.h>
+#include <asm/percpu.h>
+#include <linux/random.h>
 
 /*
  * Initialize the stackprotector canary value.
@@ -35,4 +39,5 @@ static __always_inline void boot_init_stack_canary(void)
        percpu_write(irq_stack_union.stack_canary, canary);
 }
 
-#endif
+#endif /* CC_STACKPROTECTOR */
+#endif /* _ASM_STACKPROTECTOR_H */