aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/process_64.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-02-14 03:42:02 -0500
committerThomas Gleixner <tglx@linutronix.de>2008-05-26 10:15:32 -0400
commit18aa8bb12dcb10adc3d7c9d69714d53667c0ab7f (patch)
tree2081f51b29106b05867c70ee71641ecc466147da /arch/x86/kernel/process_64.c
parent9b5609fd773e6ac0b1d6d6e1bf68f32cca64e06b (diff)
stackprotector: add boot_init_stack_canary()
add the boot_init_stack_canary() and make the secondary idle threads use it. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/process_64.c')
-rw-r--r--arch/x86/kernel/process_64.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
index d4c7ac7aa430..5107cb214c7b 100644
--- a/arch/x86/kernel/process_64.c
+++ b/arch/x86/kernel/process_64.c
@@ -147,7 +147,6 @@ void cpu_idle(void)
147{ 147{
148 current_thread_info()->status |= TS_POLLING; 148 current_thread_info()->status |= TS_POLLING;
149 149
150#ifdef CONFIG_CC_STACKPROTECTOR
151 /* 150 /*
152 * If we're the non-boot CPU, nothing set the PDA stack 151 * If we're the non-boot CPU, nothing set the PDA stack
153 * canary up for us - and if we are the boot CPU we have 152 * canary up for us - and if we are the boot CPU we have
@@ -156,9 +155,8 @@ void cpu_idle(void)
156 * invalid canaries already on the stack wont ever 155 * invalid canaries already on the stack wont ever
157 * trigger): 156 * trigger):
158 */ 157 */
159 current->stack_canary = get_random_int(); 158 boot_init_stack_canary();
160 write_pda(stack_canary, current->stack_canary); 159
161#endif
162 /* endless idle loop with no priority at all */ 160 /* endless idle loop with no priority at all */
163 while (1) { 161 while (1) {
164 tick_nohz_stop_sched_tick(); 162 tick_nohz_stop_sched_tick();