Эх сурвалжийг харах

seccomp: Use PR_SPEC_FORCE_DISABLE

Use PR_SPEC_FORCE_DISABLE in seccomp() because seccomp does not allow to
widen restrictions.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Thomas Gleixner 7 жил өмнө
parent
commit
b849a812f7

+ 1 - 1
kernel/seccomp.c

@@ -239,7 +239,7 @@ static inline void spec_mitigate(struct task_struct *task,
 	int state = arch_prctl_spec_ctrl_get(task, which);
 	int state = arch_prctl_spec_ctrl_get(task, which);
 
 
 	if (state > 0 && (state & PR_SPEC_PRCTL))
 	if (state > 0 && (state & PR_SPEC_PRCTL))
-		arch_prctl_spec_ctrl_set(task, which, PR_SPEC_DISABLE);
+		arch_prctl_spec_ctrl_set(task, which, PR_SPEC_FORCE_DISABLE);
 }
 }
 
 
 static inline void seccomp_assign_mode(struct task_struct *task,
 static inline void seccomp_assign_mode(struct task_struct *task,