diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-02-14 09:44:08 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2008-05-26 16:15:32 +0200 |
commit | 420594296838fdc9a674470d710cda7d1487f9f4 (patch) | |
tree | 2596b86ce8dcdfe3679964536efce45014bc6cf2 | |
parent | 18aa8bb12dcb10adc3d7c9d69714d53667c0ab7f (diff) | |
download | op-kernel-dev-420594296838fdc9a674470d710cda7d1487f9f4.zip op-kernel-dev-420594296838fdc9a674470d710cda7d1487f9f4.tar.gz |
x86: fix the stackprotector canary of the boot CPU
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | arch/x86/kernel/process_64.c | 1 | ||||
-rw-r--r-- | include/linux/stackprotector.h | 4 | ||||
-rw-r--r-- | init/main.c | 6 |
3 files changed, 11 insertions, 0 deletions
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index 5107cb2..cce47f7 100644 --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c @@ -16,6 +16,7 @@ #include <stdarg.h> +#include <linux/stackprotector.h> #include <linux/cpu.h> #include <linux/errno.h> #include <linux/sched.h> diff --git a/include/linux/stackprotector.h b/include/linux/stackprotector.h index 422e71a..6f3e54c 100644 --- a/include/linux/stackprotector.h +++ b/include/linux/stackprotector.h @@ -1,6 +1,10 @@ #ifndef _LINUX_STACKPROTECTOR_H #define _LINUX_STACKPROTECTOR_H 1 +#include <linux/compiler.h> +#include <linux/sched.h> +#include <linux/random.h> + #ifdef CONFIG_CC_STACKPROTECTOR # include <asm/stackprotector.h> #else diff --git a/init/main.c b/init/main.c index a84322c..b44e4eb 100644 --- a/init/main.c +++ b/init/main.c @@ -546,6 +546,12 @@ asmlinkage void __init start_kernel(void) unwind_init(); lockdep_init(); debug_objects_early_init(); + + /* + * Set up the the initial canary ASAP: + */ + boot_init_stack_canary(); + cgroup_init_early(); local_irq_disable(); |