summaryrefslogtreecommitdiff
path: root/tools/testing
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2020-06-16 01:42:46 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-08-19 09:26:12 +0300
commit51ef07ca87be36941e869f34896b95e15729b706 (patch)
treeac91da90a921dd58df38c73872e1b10a685fa74d /tools/testing
parentd2d09105657dc3bf3b1ace05ac9eb05b435642ab (diff)
downloadlinux-51ef07ca87be36941e869f34896b95e15729b706.tar.xz
seccomp: Fix ioctl number for SECCOMP_IOCTL_NOTIF_ID_VALID
[ Upstream commit 47e33c05f9f07cac3de833e531bcac9ae052c7ca ] When SECCOMP_IOCTL_NOTIF_ID_VALID was first introduced it had the wrong direction flag set. While this isn't a big deal as nothing currently enforces these bits in the kernel, it should be defined correctly. Fix the define and provide support for the old command until it is no longer needed for backward compatibility. Fixes: 6a21cc50f0c7 ("seccomp: add a return code to trap to userspace") Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools/testing')
-rw-r--r--tools/testing/selftests/seccomp/seccomp_bpf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/seccomp/seccomp_bpf.c b/tools/testing/selftests/seccomp/seccomp_bpf.c
index 252140a52553..ccf276e13882 100644
--- a/tools/testing/selftests/seccomp/seccomp_bpf.c
+++ b/tools/testing/selftests/seccomp/seccomp_bpf.c
@@ -180,7 +180,7 @@ struct seccomp_metadata {
#define SECCOMP_IOCTL_NOTIF_RECV SECCOMP_IOWR(0, struct seccomp_notif)
#define SECCOMP_IOCTL_NOTIF_SEND SECCOMP_IOWR(1, \
struct seccomp_notif_resp)
-#define SECCOMP_IOCTL_NOTIF_ID_VALID SECCOMP_IOR(2, __u64)
+#define SECCOMP_IOCTL_NOTIF_ID_VALID SECCOMP_IOW(2, __u64)
struct seccomp_notif {
__u64 id;