File tree 1 file changed +8
-0
lines changed
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 34
34
#include <linux/topology.h>
35
35
#include <linux/profile.h>
36
36
#include <linux/processor.h>
37
+ #include <linux/random.h>
37
38
38
39
#include <asm/ptrace.h>
39
40
#include <linux/atomic.h>
@@ -810,9 +811,16 @@ static void cpu_idle_thread_init(unsigned int cpu, struct task_struct *idle)
810
811
{
811
812
struct thread_info * ti = task_thread_info (idle );
812
813
814
+ #ifdef CONFIG_STACKPROTECTOR
815
+ idle -> stack_canary = get_random_canary ();
816
+ #endif
817
+
813
818
#ifdef CONFIG_PPC64
814
819
paca_ptrs [cpu ]-> __current = idle ;
815
820
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
816
824
#endif
817
825
ti -> cpu = cpu ;
818
826
secondary_ti = current_set [cpu ] = ti ;
You can’t perform that action at this time.
0 commit comments