This patch adds support for the newly-introduced io-uring system calls
in kernel 5.1, for description with io-uring, see:
https://lwn.net/ml/linux-fsdevel/[email protected]/

Plus I created a PR on github too, and I'll respond to it quicker:
https://github.com/seccomp/libseccomp/pull/157

Signed-off-by: Stephen Coleman <[email protected]>

-- 
You received this message because you are subscribed to the Google Groups 
"libseccomp" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/libseccomp/5b518c13-e4b2-4e0b-8539-dd7ff7d9d742%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
>From 906f9edb478658d3f1696874e7a29af0b0c09e14 Mon Sep 17 00:00:00 2001
From: youcai <[email protected]>
Date: Sat, 22 Jun 2019 15:51:39 +0800
Subject: [PATCH] add support for io-uring related system calls in kernel 5.1

This patch adds support for the newly-introduced io-uring system calls
in kernel 5.1, for description with io-uring, see:
https://lwn.net/ml/linux-fsdevel/[email protected]/

Signed-off-by: Stephen Coleman <[email protected]>

---
 src/arch-aarch64-syscalls.c   | 3 +++
 src/arch-arm-syscalls.c       | 3 +++
 src/arch-mips-syscalls.c      | 3 +++
 src/arch-mips64-syscalls.c    | 3 +++
 src/arch-mips64n32-syscalls.c | 3 +++
 src/arch-parisc-syscalls.c    | 3 +++
 src/arch-ppc-syscalls.c       | 3 +++
 src/arch-ppc64-syscalls.c     | 3 +++
 src/arch-s390-syscalls.c      | 3 +++
 src/arch-s390x-syscalls.c     | 3 +++
 src/arch-x32-syscalls.c       | 3 +++
 src/arch-x86-syscalls.c       | 3 +++
 src/arch-x86_64-syscalls.c    | 3 +++
 13 files changed, 39 insertions(+)

diff --git a/src/arch-aarch64-syscalls.c b/src/arch-aarch64-syscalls.c
index 351143c..90de283 100644
--- a/src/arch-aarch64-syscalls.c
+++ b/src/arch-aarch64-syscalls.c
@@ -171,6 +171,9 @@ const struct arch_syscall_def aarch64_syscall_table[] = { \
 	{ "io_pgetevents", 292 },
 	{ "io_setup", 0 },
 	{ "io_submit", 2 },
+	{ "io_uring_setup", 425 },
+	{ "io_uring_enter", 426 },
+	{ "io_uring_register", 427 },
 	{ "ioctl", 29 },
 	{ "ioperm", __PNR_ioperm },
 	{ "iopl", __PNR_iopl },
diff --git a/src/arch-arm-syscalls.c b/src/arch-arm-syscalls.c
index f543f65..a0dbd60 100644
--- a/src/arch-arm-syscalls.c
+++ b/src/arch-arm-syscalls.c
@@ -183,6 +183,9 @@ const struct arch_syscall_def arm_syscall_table[] = { \
 	{ "io_pgetevents", (__SCMP_NR_BASE + 399) },
 	{ "io_setup", (__SCMP_NR_BASE + 243) },
 	{ "io_submit", (__SCMP_NR_BASE + 246) },
+	{ "io_uring_setup", (__SCMP_NR_BASE + 425) },
+	{ "io_uring_enter", (__SCMP_NR_BASE + 426) },
+	{ "io_uring_register", (__SCMP_NR_BASE + 427) },
 	{ "ioctl", (__SCMP_NR_BASE + 54) },
 	{ "ioperm", __PNR_ioperm },
 	{ "iopl", __PNR_iopl },
diff --git a/src/arch-mips-syscalls.c b/src/arch-mips-syscalls.c
index 670b92a..8706ae5 100644
--- a/src/arch-mips-syscalls.c
+++ b/src/arch-mips-syscalls.c
@@ -175,6 +175,9 @@ const struct arch_syscall_def mips_syscall_table[] = { \
 	{ "io_pgetevents", (__SCMP_NR_BASE + 368) },
 	{ "io_setup", (__SCMP_NR_BASE + 241) },
 	{ "io_submit", (__SCMP_NR_BASE + 244) },
+	{ "io_uring_setup", (__SCMP_NR_BASE + 425) },
+	{ "io_uring_enter", (__SCMP_NR_BASE + 426) },
+	{ "io_uring_register", (__SCMP_NR_BASE + 427) },
 	{ "ioctl", (__SCMP_NR_BASE + 54) },
 	{ "ioperm", (__SCMP_NR_BASE + 101) },
 	{ "iopl", (__SCMP_NR_BASE + 110) },
diff --git a/src/arch-mips64-syscalls.c b/src/arch-mips64-syscalls.c
index 454c681..b267072 100644
--- a/src/arch-mips64-syscalls.c
+++ b/src/arch-mips64-syscalls.c
@@ -175,6 +175,9 @@ const struct arch_syscall_def mips64_syscall_table[] = { \
 	{ "io_pgetevents", (__SCMP_NR_BASE + 328) },
 	{ "io_setup", (__SCMP_NR_BASE + 200) },
 	{ "io_submit", (__SCMP_NR_BASE + 203) },
+	{ "io_uring_setup", (__SCMP_NR_BASE + 425) },
+	{ "io_uring_enter", (__SCMP_NR_BASE + 426) },
+	{ "io_uring_register", (__SCMP_NR_BASE + 427) },
 	{ "ioctl", (__SCMP_NR_BASE + 15) },
 	{ "ioperm", __PNR_ioperm },
 	{ "iopl", __PNR_iopl },
diff --git a/src/arch-mips64n32-syscalls.c b/src/arch-mips64n32-syscalls.c
index f5053fc..8af6b3e 100644
--- a/src/arch-mips64n32-syscalls.c
+++ b/src/arch-mips64n32-syscalls.c
@@ -175,6 +175,9 @@ const struct arch_syscall_def mips64n32_syscall_table[] = { \
 	{ "io_pgetevents", (__SCMP_NR_BASE + 332) },
 	{ "io_setup", (__SCMP_NR_BASE + 200) },
 	{ "io_submit", (__SCMP_NR_BASE + 203) },
+	{ "io_uring_setup", (__SCMP_NR_BASE + 425) },
+	{ "io_uring_enter", (__SCMP_NR_BASE + 426) },
+	{ "io_uring_register", (__SCMP_NR_BASE + 427) },
 	{ "ioctl", (__SCMP_NR_BASE + 15) },
 	{ "ioperm", __PNR_ioperm },
 	{ "iopl", __PNR_iopl },
diff --git a/src/arch-parisc-syscalls.c b/src/arch-parisc-syscalls.c
index 0c7ef42..8f19a03 100644
--- a/src/arch-parisc-syscalls.c
+++ b/src/arch-parisc-syscalls.c
@@ -155,6 +155,9 @@ const struct arch_syscall_def parisc_syscall_table[] = { \
 	{ "io_pgetevents", __PNR_io_pgetevents },
 	{ "io_setup",	215 },
 	{ "io_submit",	218 },
+	{ "io_uring_setup", 425 },
+	{ "io_uring_enter", 426 },
+	{ "io_uring_register", 427 },
 	{ "ioctl",	54 },
 	{ "ioperm",	__PNR_ioperm },
 	{ "iopl",	__PNR_iopl },
diff --git a/src/arch-ppc-syscalls.c b/src/arch-ppc-syscalls.c
index 7272a63..8275b38 100644
--- a/src/arch-ppc-syscalls.c
+++ b/src/arch-ppc-syscalls.c
@@ -172,6 +172,9 @@ const struct arch_syscall_def ppc_syscall_table[] = { \
 	{ "io_pgetevents", 388 },
 	{ "io_setup", 227 },
 	{ "io_submit", 230 },
+	{ "io_uring_setup", 425 },
+	{ "io_uring_enter", 426 },
+	{ "io_uring_register", 427 },
 	{ "ioctl", 54 },
 	{ "ioperm", 101 },
 	{ "iopl", 110 },
diff --git a/src/arch-ppc64-syscalls.c b/src/arch-ppc64-syscalls.c
index c7ff0a1..2a8f387 100644
--- a/src/arch-ppc64-syscalls.c
+++ b/src/arch-ppc64-syscalls.c
@@ -172,6 +172,9 @@ const struct arch_syscall_def ppc64_syscall_table[] = { \
 	{ "io_pgetevents", 388 },
 	{ "io_setup", 227 },
 	{ "io_submit", 230 },
+	{ "io_uring_setup", 425 },
+	{ "io_uring_enter", 426 },
+	{ "io_uring_register", 427 },
 	{ "ioctl", 54 },
 	{ "ioperm", 101 },
 	{ "iopl", 110 },
diff --git a/src/arch-s390-syscalls.c b/src/arch-s390-syscalls.c
index a1403be..c2e3439 100644
--- a/src/arch-s390-syscalls.c
+++ b/src/arch-s390-syscalls.c
@@ -155,6 +155,9 @@ const struct arch_syscall_def s390_syscall_table[] = { \
 	{ "io_pgetevents", 382 },
 	{ "io_setup", 243 },
 	{ "io_submit", 246 },
+	{ "io_uring_setup", 425 },
+	{ "io_uring_enter", 426 },
+	{ "io_uring_register", 427 },
 	{ "ioctl", 54 },
 	{ "ioperm", 101 },
 	{ "iopl", __PNR_iopl },
diff --git a/src/arch-s390x-syscalls.c b/src/arch-s390x-syscalls.c
index e22ccae..e0a39f1 100644
--- a/src/arch-s390x-syscalls.c
+++ b/src/arch-s390x-syscalls.c
@@ -155,6 +155,9 @@ const struct arch_syscall_def s390x_syscall_table[] = { \
 	{ "io_pgetevents", 382 },
 	{ "io_setup", 243 },
 	{ "io_submit", 246 },
+	{ "io_uring_setup", 425 },
+	{ "io_uring_enter", 426 },
+	{ "io_uring_register", 427 },
 	{ "ioctl", 54 },
 	{ "ioperm", __PNR_ioperm},
 	{ "iopl", __PNR_iopl },
diff --git a/src/arch-x32-syscalls.c b/src/arch-x32-syscalls.c
index 65f6418..f6b941b 100644
--- a/src/arch-x32-syscalls.c
+++ b/src/arch-x32-syscalls.c
@@ -171,6 +171,9 @@ const struct arch_syscall_def x32_syscall_table[] = { \
 	{ "io_pgetevents", (X32_SYSCALL_BIT + 333) },
 	{ "io_setup", (X32_SYSCALL_BIT + 543) },
 	{ "io_submit", (X32_SYSCALL_BIT + 544) },
+	{ "io_uring_setup", (X32_SYSCALL_BIT + 425) },
+	{ "io_uring_enter", (X32_SYSCALL_BIT + 426) },
+	{ "io_uring_register", (X32_SYSCALL_BIT + 427) },
 	{ "ioctl", (X32_SYSCALL_BIT + 514) },
 	{ "ioperm", (X32_SYSCALL_BIT + 173) },
 	{ "iopl", (X32_SYSCALL_BIT + 172) },
diff --git a/src/arch-x86-syscalls.c b/src/arch-x86-syscalls.c
index 1f4573b..5bd0ca2 100644
--- a/src/arch-x86-syscalls.c
+++ b/src/arch-x86-syscalls.c
@@ -171,6 +171,9 @@ const struct arch_syscall_def x86_syscall_table[] = { \
 	{ "io_pgetevents", 385 },
 	{ "io_setup", 245 },
 	{ "io_submit", 248 },
+	{ "io_uring_setup", 425 },
+	{ "io_uring_enter", 426 },
+	{ "io_uring_register", 427 },
 	{ "ioctl", 54 },
 	{ "ioperm", 101 },
 	{ "iopl", 110 },
diff --git a/src/arch-x86_64-syscalls.c b/src/arch-x86_64-syscalls.c
index b07700d..f7c8ce6 100644
--- a/src/arch-x86_64-syscalls.c
+++ b/src/arch-x86_64-syscalls.c
@@ -171,6 +171,9 @@ const struct arch_syscall_def x86_64_syscall_table[] = { \
 	{ "io_pgetevents", 333 },
 	{ "io_setup", 206 },
 	{ "io_submit", 209 },
+	{ "io_uring_setup", 425 },
+	{ "io_uring_enter", 426 },
+	{ "io_uring_register", 427 },
 	{ "ioctl", 16 },
 	{ "ioperm", 173 },
 	{ "iopl", 172 },
-- 
2.22.0

Reply via email to