summaryrefslogtreecommitdiff
path: root/sys/compat/linux/arch/amd64
diff options
context:
space:
mode:
authorryo <ryo@NetBSD.org>2021-12-02 04:39:44 +0000
committerryo <ryo@NetBSD.org>2021-12-02 04:39:44 +0000
commit88bfb20eb191dc67cf1cd06ca1aa1da16ea5cc2c (patch)
tree93b84e3557633f8c386dabd853883d6c891dd32d /sys/compat/linux/arch/amd64
parentd281faeb6da0b9302650c5605e773c0b3d983358 (diff)
regen
Diffstat (limited to 'sys/compat/linux/arch/amd64')
-rw-r--r--sys/compat/linux/arch/amd64/linux_syscall.h5
-rw-r--r--sys/compat/linux/arch/amd64/linux_syscallargs.h12
-rw-r--r--sys/compat/linux/arch/amd64/linux_syscalls.c8
-rw-r--r--sys/compat/linux/arch/amd64/linux_sysent.c10
-rw-r--r--sys/compat/linux/arch/amd64/linux_systrace_args.c36
5 files changed, 60 insertions, 11 deletions
diff --git a/sys/compat/linux/arch/amd64/linux_syscall.h b/sys/compat/linux/arch/amd64/linux_syscall.h
index 64503950ddb..2fa1f1eedaa 100644
--- a/sys/compat/linux/arch/amd64/linux_syscall.h
+++ b/sys/compat/linux/arch/amd64/linux_syscall.h
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_syscall.h,v 1.75 2021/09/20 02:20:30 thorpej Exp $ */
+/* $NetBSD: linux_syscall.h,v 1.76 2021/12/02 04:39:44 ryo Exp $ */
/*
* System call numbers.
@@ -696,6 +696,9 @@
/* syscall: "recvmmsg" ret: "int" args: "int" "struct linux_mmsghdr *" "unsigned int" "unsigned int" "struct timespec *" */
#define LINUX_SYS_recvmmsg 299
+/* syscall: "prlimit64" ret: "int" args: "pid_t" "int" "struct rlimit *" "struct rlimit *" */
+#define LINUX_SYS_prlimit64 302
+
/* syscall: "sendmmsg" ret: "int" args: "int" "struct linux_mmsghdr *" "unsigned int" "unsigned int" */
#define LINUX_SYS_sendmmsg 307
diff --git a/sys/compat/linux/arch/amd64/linux_syscallargs.h b/sys/compat/linux/arch/amd64/linux_syscallargs.h
index 752f51739df..fda513bbc94 100644
--- a/sys/compat/linux/arch/amd64/linux_syscallargs.h
+++ b/sys/compat/linux/arch/amd64/linux_syscallargs.h
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_syscallargs.h,v 1.75 2021/09/20 02:20:30 thorpej Exp $ */
+/* $NetBSD: linux_syscallargs.h,v 1.76 2021/12/02 04:39:44 ryo Exp $ */
/*
* System call argument lists.
@@ -1110,6 +1110,14 @@ struct linux_sys_recvmmsg_args {
};
check_syscall_args(linux_sys_recvmmsg)
+struct linux_sys_prlimit64_args {
+ syscallarg(pid_t) pid;
+ syscallarg(int) which;
+ syscallarg(struct rlimit *) new_rlp;
+ syscallarg(struct rlimit *) old_rlp;
+};
+check_syscall_args(linux_sys_prlimit64)
+
struct linux_sys_sendmmsg_args {
syscallarg(int) s;
syscallarg(struct linux_mmsghdr *) msgvec;
@@ -1583,6 +1591,8 @@ int linux_sys_pwritev(struct lwp *, const struct linux_sys_pwritev_args *, regis
int linux_sys_recvmmsg(struct lwp *, const struct linux_sys_recvmmsg_args *, register_t *);
+int linux_sys_prlimit64(struct lwp *, const struct linux_sys_prlimit64_args *, register_t *);
+
int linux_sys_sendmmsg(struct lwp *, const struct linux_sys_sendmmsg_args *, register_t *);
int linux_sys_nosys(struct lwp *, const void *, register_t *);
diff --git a/sys/compat/linux/arch/amd64/linux_syscalls.c b/sys/compat/linux/arch/amd64/linux_syscalls.c
index b57e912165e..62370bf877c 100644
--- a/sys/compat/linux/arch/amd64/linux_syscalls.c
+++ b/sys/compat/linux/arch/amd64/linux_syscalls.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_syscalls.c,v 1.75 2021/09/20 02:20:30 thorpej Exp $ */
+/* $NetBSD: linux_syscalls.c,v 1.76 2021/12/02 04:39:44 ryo Exp $ */
/*
* System call names.
@@ -8,7 +8,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.75 2021/09/20 02:20:30 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.76 2021/12/02 04:39:44 ryo Exp $");
#if defined(_KERNEL_OPT)
#if defined(_KERNEL_OPT)
@@ -368,7 +368,7 @@ const char *const linux_syscallnames[] = {
/* 299 */ "recvmmsg",
/* 300 */ "#300 (unimplemented fanotify_init)",
/* 301 */ "#301 (unimplemented fanotify_mark)",
- /* 302 */ "#302 (unimplemented prlimit64)",
+ /* 302 */ "prlimit64",
/* 303 */ "#303 (unimplemented name_to_handle_at)",
/* 304 */ "#304 (unimplemented open_by_handle_at)",
/* 305 */ "#305 (unimplemented clock_adjtime)",
@@ -912,7 +912,7 @@ const char *const altlinux_syscallnames[] = {
/* 299 */ NULL, /* recvmmsg */
/* 300 */ NULL, /* unimplemented fanotify_init */
/* 301 */ NULL, /* unimplemented fanotify_mark */
- /* 302 */ NULL, /* unimplemented prlimit64 */
+ /* 302 */ NULL, /* prlimit64 */
/* 303 */ NULL, /* unimplemented name_to_handle_at */
/* 304 */ NULL, /* unimplemented open_by_handle_at */
/* 305 */ NULL, /* unimplemented clock_adjtime */
diff --git a/sys/compat/linux/arch/amd64/linux_sysent.c b/sys/compat/linux/arch/amd64/linux_sysent.c
index 544bc66d9fc..1692518073c 100644
--- a/sys/compat/linux/arch/amd64/linux_sysent.c
+++ b/sys/compat/linux/arch/amd64/linux_sysent.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_sysent.c,v 1.75 2021/09/20 02:20:30 thorpej Exp $ */
+/* $NetBSD: linux_sysent.c,v 1.76 2021/12/02 04:39:44 ryo Exp $ */
/*
* System call switch table.
@@ -8,7 +8,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.75 2021/09/20 02:20:30 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.76 2021/12/02 04:39:44 ryo Exp $");
#if defined(_KERNEL_OPT)
#include "opt_sysv.h"
@@ -1358,8 +1358,10 @@ struct sysent linux_sysent[] = {
.sy_call = linux_sys_nosys,
}, /* 301 = filler */
{
- .sy_call = linux_sys_nosys,
- }, /* 302 = filler */
+ ns(struct linux_sys_prlimit64_args),
+ .sy_flags = SYCALL_ARG_PTR,
+ .sy_call = (sy_call_t *)linux_sys_prlimit64
+ }, /* 302 = prlimit64 */
{
.sy_call = linux_sys_nosys,
}, /* 303 = filler */
diff --git a/sys/compat/linux/arch/amd64/linux_systrace_args.c b/sys/compat/linux/arch/amd64/linux_systrace_args.c
index 34ea54c6863..7fad6fe342d 100644
--- a/sys/compat/linux/arch/amd64/linux_systrace_args.c
+++ b/sys/compat/linux/arch/amd64/linux_systrace_args.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_systrace_args.c,v 1.19 2021/09/20 02:20:30 thorpej Exp $ */
+/* $NetBSD: linux_systrace_args.c,v 1.20 2021/12/02 04:39:44 ryo Exp $ */
/*
* System call argument to DTrace register array conversion.
@@ -1895,6 +1895,16 @@ systrace_args(register_t sysnum, const void *params, uintptr_t *uarg, size_t *n_
*n_args = 5;
break;
}
+ /* linux_sys_prlimit64 */
+ case 302: {
+ const struct linux_sys_prlimit64_args *p = params;
+ iarg[0] = SCARG(p, pid); /* pid_t */
+ iarg[1] = SCARG(p, which); /* int */
+ uarg[2] = (intptr_t) SCARG(p, new_rlp); /* struct rlimit * */
+ uarg[3] = (intptr_t) SCARG(p, old_rlp); /* struct rlimit * */
+ *n_args = 4;
+ break;
+ }
/* linux_sys_sendmmsg */
case 307: {
const struct linux_sys_sendmmsg_args *p = params;
@@ -5070,6 +5080,25 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
break;
};
break;
+ /* linux_sys_prlimit64 */
+ case 302:
+ switch(ndx) {
+ case 0:
+ p = "pid_t";
+ break;
+ case 1:
+ p = "int";
+ break;
+ case 2:
+ p = "struct rlimit *";
+ break;
+ case 3:
+ p = "struct rlimit *";
+ break;
+ default:
+ break;
+ };
+ break;
/* linux_sys_sendmmsg */
case 307:
switch(ndx) {
@@ -6185,6 +6214,11 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
if (ndx == 0 || ndx == 1)
p = "int";
break;
+ /* linux_sys_prlimit64 */
+ case 302:
+ if (ndx == 0 || ndx == 1)
+ p = "int";
+ break;
/* linux_sys_sendmmsg */
case 307:
if (ndx == 0 || ndx == 1)