seccomp: Use PR_SPEC_FORCE_DISABLE
authorThomas Gleixner <tglx@linutronix.de>
Fri, 4 May 2018 07:40:03 +0000 (09:40 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 3 Oct 2018 03:09:42 +0000 (04:09 +0100)
commit b849a812f7eb92e96d1c8239b06581b2cfd8b275 upstream.

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

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
kernel/seccomp.c

index 816cdfe9b5926516a62cf89a6a02556777adfb0b..a8e3934ad2abe9b35788ea54340c5aee0bb3b1fd 100644 (file)
@@ -217,7 +217,7 @@ static inline void spec_mitigate(struct task_struct *task,
        int state = arch_prctl_spec_ctrl_get(task, which);
 
        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(unsigned long seccomp_mode)