]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
x86: fix the stackprotector canary of the boot CPU
authorIngo Molnar <mingo@elte.hu>
Thu, 14 Feb 2008 08:44:08 +0000 (09:44 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 26 May 2008 14:15:32 +0000 (16:15 +0200)
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/kernel/process_64.c
include/linux/stackprotector.h
init/main.c

index 5107cb214c7b1840ac6f7681badfdd59fac69996..cce47f7fbf220cd191f7f45c61cc92f4f977575b 100644 (file)
@@ -16,6 +16,7 @@
 
 #include <stdarg.h>
 
+#include <linux/stackprotector.h>
 #include <linux/cpu.h>
 #include <linux/errno.h>
 #include <linux/sched.h>
index 422e71aafd0b513b4f4766922f9e3c2b47ab69d3..6f3e54c704c00257a4180934bee801b488570d59 100644 (file)
@@ -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
index a84322ca64a24aa12390489f36ed9534811525b5..b44e4eb0f5e3d807044358db2ea4130ebeba724a 100644 (file)
@@ -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();