]> git.ipfire.org Git - thirdparty/linux.git/blobdiff - kernel/sched/core.c
Merge tag 'sched-core-2020-06-02' of git://git.kernel.org/pub/scm/linux/kernel/git...
[thirdparty/linux.git] / kernel / sched / core.c
index 43ba2d4a8ecadd3c8732f982d469c78dedcb0a41..d7669027aede358cfac25b729dfe8e50207c4b37 100644 (file)
@@ -11,6 +11,7 @@
 #include <linux/nospec.h>
 
 #include <linux/kcov.h>
+#include <linux/scs.h>
 
 #include <asm/switch_to.h>
 #include <asm/tlb.h>
@@ -3940,6 +3941,9 @@ static inline void schedule_debug(struct task_struct *prev, bool preempt)
 #ifdef CONFIG_SCHED_STACK_END_CHECK
        if (task_stack_end_corrupted(prev))
                panic("corrupted stack end detected inside scheduler\n");
+
+       if (task_scs_end_corrupted(prev))
+               panic("corrupted shadow stack detected inside scheduler\n");
 #endif
 
 #ifdef CONFIG_DEBUG_ATOMIC_SLEEP
@@ -6110,6 +6114,7 @@ void init_idle(struct task_struct *idle, int cpu)
        idle->se.exec_start = sched_clock();
        idle->flags |= PF_IDLE;
 
+       scs_task_reset(idle);
        kasan_unpoison_task_stack(idle);
 
 #ifdef CONFIG_SMP