summaryrefslogtreecommitdiffstats
path: root/kernel/seccomp.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2018-07-14 02:36:49 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-07-25 10:18:27 +0200
commita08c3f484c34df1e3bec3c47818d570483bf67fa (patch)
tree1090045a282107a34c721eef42366fd7bd2b72b5 /kernel/seccomp.c
parent3f9cb20f9126db1edb1fad78a0e94ff8e9ae94e2 (diff)
downloadlinux-stable-a08c3f484c34df1e3bec3c47818d570483bf67fa.tar.gz
linux-stable-a08c3f484c34df1e3bec3c47818d570483bf67fa.tar.bz2
linux-stable-a08c3f484c34df1e3bec3c47818d570483bf67fa.zip
seccomp: Use PR_SPEC_FORCE_DISABLE
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: David Woodhouse <dwmw@amazon.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Srivatsa S. Bhat <srivatsa@csail.mit.edu> Reviewed-by: Matt Helsley (VMware) <matt.helsley@gmail.com> Reviewed-by: Alexey Makhalov <amakhalov@vmware.com> Reviewed-by: Bo Gan <ganb@vmware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/seccomp.c')
-rw-r--r--kernel/seccomp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/seccomp.c b/kernel/seccomp.c
index bfb1ee845ba6..f33539f31bc0 100644
--- a/kernel/seccomp.c
+++ b/kernel/seccomp.c
@@ -226,7 +226,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(struct task_struct *task,