File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 3434#include <linux/topology.h>
3535#include <linux/profile.h>
3636#include <linux/processor.h>
37+ #include <linux/random.h>
3738
3839#include <asm/ptrace.h>
3940#include <linux/atomic.h>
@@ -810,9 +811,16 @@ static void cpu_idle_thread_init(unsigned int cpu, struct task_struct *idle)
810811{
811812 struct thread_info * ti = task_thread_info (idle );
812813
814+ #ifdef CONFIG_STACKPROTECTOR
815+ idle -> stack_canary = get_random_canary ();
816+ #endif
817+
813818#ifdef CONFIG_PPC64
814819 paca_ptrs [cpu ]-> __current = idle ;
815820 paca_ptrs [cpu ]-> kstack = (unsigned long )ti + THREAD_SIZE - STACK_FRAME_OVERHEAD ;
821+ #ifdef CONFIG_STACKPROTECTOR
822+ paca_ptrs [cpu ]-> canary = idle -> stack_canary ;
823+ #endif
816824#endif
817825 ti -> cpu = cpu ;
818826 secondary_ti = current_set [cpu ] = ti ;
You can’t perform that action at this time.
0 commit comments