summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2009-02-09 16:17:39 +0300
committerIngo Molnar <mingo@elte.hu>2009-02-10 02:41:29 +0300
commit76397f72fb9f4c9a96dfe05462887811c81b0e17 (patch)
tree764a20005ed1efeb7b459ae030495c7e709bc3da
parent6cd61c0baa8bce32271226198b46c67a7a05d108 (diff)
downloadlinux-76397f72fb9f4c9a96dfe05462887811c81b0e17.tar.xz
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: Tejun Heo <tj@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--arch/x86/include/asm/stackprotector.h7
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 @@
#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 */