diff options
| author | ryo <ryo@NetBSD.org> | 2021-12-02 04:39:44 +0000 |
|---|---|---|
| committer | ryo <ryo@NetBSD.org> | 2021-12-02 04:39:44 +0000 |
| commit | 88bfb20eb191dc67cf1cd06ca1aa1da16ea5cc2c (patch) | |
| tree | 93b84e3557633f8c386dabd853883d6c891dd32d | |
| parent | d281faeb6da0b9302650c5605e773c0b3d983358 (diff) | |
regen
46 files changed, 474 insertions, 122 deletions
diff --git a/sys/compat/linux/arch/aarch64/linux_syscall.h b/sys/compat/linux/arch/aarch64/linux_syscall.h index 4c8b3e6d2b9..c2e43276f76 100644 --- a/sys/compat/linux/arch/aarch64/linux_syscall.h +++ b/sys/compat/linux/arch/aarch64/linux_syscall.h @@ -1,4 +1,4 @@ -/* $NetBSD: linux_syscall.h,v 1.3 2021/11/25 02:32:24 ryo Exp $ */ +/* $NetBSD: linux_syscall.h,v 1.4 2021/12/02 04:39:44 ryo Exp $ */ /* * System call numbers. @@ -579,6 +579,9 @@ /* syscall: "wait4" ret: "int" args: "int" "int *" "int" "struct rusage50 *" */ #define LINUX_SYS_wait4 260 +/* syscall: "prlimit64" ret: "int" args: "pid_t" "int" "struct rlimit *" "struct rlimit *" */ +#define LINUX_SYS_prlimit64 261 + /* syscall: "sendmmsg" ret: "int" args: "int" "struct linux_mmsghdr *" "unsigned int" "unsigned int" */ #define LINUX_SYS_sendmmsg 269 diff --git a/sys/compat/linux/arch/aarch64/linux_syscallargs.h b/sys/compat/linux/arch/aarch64/linux_syscallargs.h index 511d519893e..e41e6106bb1 100644 --- a/sys/compat/linux/arch/aarch64/linux_syscallargs.h +++ b/sys/compat/linux/arch/aarch64/linux_syscallargs.h @@ -1,4 +1,4 @@ -/* $NetBSD: linux_syscallargs.h,v 1.3 2021/11/25 02:32:24 ryo Exp $ */ +/* $NetBSD: linux_syscallargs.h,v 1.4 2021/12/02 04:39:44 ryo Exp $ */ /* * System call argument lists. @@ -957,6 +957,14 @@ struct linux_sys_wait4_args { }; check_syscall_args(linux_sys_wait4) +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; @@ -1361,6 +1369,8 @@ int linux_sys_recvmmsg(struct lwp *, const struct linux_sys_recvmmsg_args *, reg int linux_sys_wait4(struct lwp *, const struct linux_sys_wait4_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 sys_getrandom(struct lwp *, const struct sys_getrandom_args *, register_t *); diff --git a/sys/compat/linux/arch/aarch64/linux_syscalls.c b/sys/compat/linux/arch/aarch64/linux_syscalls.c index a1e2d871ea4..62d0cddf37b 100644 --- a/sys/compat/linux/arch/aarch64/linux_syscalls.c +++ b/sys/compat/linux/arch/aarch64/linux_syscalls.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_syscalls.c,v 1.3 2021/11/25 02:32:24 ryo Exp $ */ +/* $NetBSD: linux_syscalls.c,v 1.4 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.3 2021/11/25 02:32:24 ryo Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.4 2021/12/02 04:39:44 ryo Exp $"); #if defined(_KERNEL_OPT) #if defined(_KERNEL_OPT) @@ -322,7 +322,7 @@ const char *const linux_syscallnames[] = { /* 258 */ "#258 (unimplemented)", /* 259 */ "#259 (unimplemented)", /* 260 */ "wait4", - /* 261 */ "#261 (unimplemented prlimit64)", + /* 261 */ "prlimit64", /* 262 */ "#262 (unimplemented fanotify_init)", /* 263 */ "#263 (unimplemented fanotify_mark)", /* 264 */ "#264 (unimplemented name_to_handle_at)", @@ -860,7 +860,7 @@ const char *const altlinux_syscallnames[] = { /* 258 */ NULL, /* unimplemented */ /* 259 */ NULL, /* unimplemented */ /* 260 */ NULL, /* wait4 */ - /* 261 */ NULL, /* unimplemented prlimit64 */ + /* 261 */ NULL, /* prlimit64 */ /* 262 */ NULL, /* unimplemented fanotify_init */ /* 263 */ NULL, /* unimplemented fanotify_mark */ /* 264 */ NULL, /* unimplemented name_to_handle_at */ diff --git a/sys/compat/linux/arch/aarch64/linux_sysent.c b/sys/compat/linux/arch/aarch64/linux_sysent.c index 397b12bb458..4efd8d478d1 100644 --- a/sys/compat/linux/arch/aarch64/linux_sysent.c +++ b/sys/compat/linux/arch/aarch64/linux_sysent.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_sysent.c,v 1.3 2021/11/25 02:32:24 ryo Exp $ */ +/* $NetBSD: linux_sysent.c,v 1.4 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.3 2021/11/25 02:32:24 ryo Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.4 2021/12/02 04:39:44 ryo Exp $"); #if defined(_KERNEL_OPT) #include "opt_sysv.h" @@ -1170,8 +1170,10 @@ struct sysent linux_sysent[] = { .sy_call = (sy_call_t *)linux_sys_wait4 }, /* 260 = wait4 */ { - .sy_call = linux_sys_nosys, - }, /* 261 = filler */ + ns(struct linux_sys_prlimit64_args), + .sy_flags = SYCALL_ARG_PTR, + .sy_call = (sy_call_t *)linux_sys_prlimit64 + }, /* 261 = prlimit64 */ { .sy_call = linux_sys_nosys, }, /* 262 = filler */ diff --git a/sys/compat/linux/arch/aarch64/linux_systrace_args.c b/sys/compat/linux/arch/aarch64/linux_systrace_args.c index 2c28f5b9319..268893c15ab 100644 --- a/sys/compat/linux/arch/aarch64/linux_systrace_args.c +++ b/sys/compat/linux/arch/aarch64/linux_systrace_args.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_systrace_args.c,v 1.3 2021/11/25 02:32:24 ryo Exp $ */ +/* $NetBSD: linux_systrace_args.c,v 1.4 2021/12/02 04:39:44 ryo Exp $ */ /* * System call argument to DTrace register array conversion. @@ -1601,6 +1601,16 @@ systrace_args(register_t sysnum, const void *params, uintptr_t *uarg, size_t *n_ *n_args = 4; break; } + /* linux_sys_prlimit64 */ + case 261: { + 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 269: { const struct linux_sys_sendmmsg_args *p = params; @@ -4337,6 +4347,25 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; }; break; + /* linux_sys_prlimit64 */ + case 261: + 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 269: switch(ndx) { @@ -5311,6 +5340,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 261: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_sys_sendmmsg */ case 269: if (ndx == 0 || ndx == 1) diff --git a/sys/compat/linux/arch/alpha/linux_syscall.h b/sys/compat/linux/arch/alpha/linux_syscall.h index ac96d1ce2b9..2e0c08a9e08 100644 --- a/sys/compat/linux/arch/alpha/linux_syscall.h +++ b/sys/compat/linux/arch/alpha/linux_syscall.h @@ -1,4 +1,4 @@ -/* $NetBSD: linux_syscall.h,v 1.114 2021/09/20 02:20:30 thorpej Exp $ */ +/* $NetBSD: linux_syscall.h,v 1.115 2021/12/02 04:39:44 ryo Exp $ */ /* * System call numbers. @@ -747,6 +747,9 @@ /* syscall: "pwritev" ret: "int" args: "int" "const struct iovcnt *" "int" "unsigned long" "unsigned long" */ #define LINUX_SYS_pwritev 491 +/* syscall: "prlimit64" ret: "int" args: "pid_t" "int" "struct rlimit *" "struct rlimit *" */ +#define LINUX_SYS_prlimit64 496 + /* syscall: "accept4" ret: "int" args: "int" "struct osockaddr *" "int *" "int" */ #define LINUX_SYS_accept4 502 diff --git a/sys/compat/linux/arch/alpha/linux_syscallargs.h b/sys/compat/linux/arch/alpha/linux_syscallargs.h index d63dff545cd..26e23fc6ca1 100644 --- a/sys/compat/linux/arch/alpha/linux_syscallargs.h +++ b/sys/compat/linux/arch/alpha/linux_syscallargs.h @@ -1,4 +1,4 @@ -/* $NetBSD: linux_syscallargs.h,v 1.113 2021/09/20 02:20:30 thorpej Exp $ */ +/* $NetBSD: linux_syscallargs.h,v 1.114 2021/12/02 04:39:44 ryo Exp $ */ /* * System call argument lists. @@ -1212,6 +1212,14 @@ struct linux_sys_pwritev_args { }; check_syscall_args(linux_sys_pwritev) +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_accept4_args { syscallarg(int) s; syscallarg(struct osockaddr *) name; @@ -1726,6 +1734,8 @@ int linux_sys_preadv(struct lwp *, const struct linux_sys_preadv_args *, registe int linux_sys_pwritev(struct lwp *, const struct linux_sys_pwritev_args *, register_t *); +int linux_sys_prlimit64(struct lwp *, const struct linux_sys_prlimit64_args *, register_t *); + int linux_sys_accept4(struct lwp *, const struct linux_sys_accept4_args *, register_t *); int linux_sys_sendmmsg(struct lwp *, const struct linux_sys_sendmmsg_args *, register_t *); diff --git a/sys/compat/linux/arch/alpha/linux_syscalls.c b/sys/compat/linux/arch/alpha/linux_syscalls.c index 009f1ad6b43..023b13dbe4c 100644 --- a/sys/compat/linux/arch/alpha/linux_syscalls.c +++ b/sys/compat/linux/arch/alpha/linux_syscalls.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_syscalls.c,v 1.115 2021/09/20 02:20:30 thorpej Exp $ */ +/* $NetBSD: linux_syscalls.c,v 1.116 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.115 2021/09/20 02:20:30 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.116 2021/12/02 04:39:44 ryo Exp $"); #if defined(_KERNEL_OPT) #if defined(_KERNEL_OPT) @@ -555,7 +555,7 @@ const char *const linux_syscallnames[] = { /* 493 */ "#493 (unimplemented perf_counter_open)", /* 494 */ "#494 (unimplemented fanotify_init)", /* 495 */ "#495 (unimplemented fanotify_mark)", - /* 496 */ "#496 (unimplemented prlimit64)", + /* 496 */ "prlimit64", /* 497 */ "#497 (unimplemented name_to_handle_at)", /* 498 */ "#498 (unimplemented open_by_handle_at)", /* 499 */ "#499 (unimplemented clock_adjtime)", @@ -1096,7 +1096,7 @@ const char *const altlinux_syscallnames[] = { /* 493 */ NULL, /* unimplemented perf_counter_open */ /* 494 */ NULL, /* unimplemented fanotify_init */ /* 495 */ NULL, /* unimplemented fanotify_mark */ - /* 496 */ NULL, /* unimplemented prlimit64 */ + /* 496 */ NULL, /* prlimit64 */ /* 497 */ NULL, /* unimplemented name_to_handle_at */ /* 498 */ NULL, /* unimplemented open_by_handle_at */ /* 499 */ NULL, /* unimplemented clock_adjtime */ diff --git a/sys/compat/linux/arch/alpha/linux_sysent.c b/sys/compat/linux/arch/alpha/linux_sysent.c index b5987d2d3da..83be48da6bb 100644 --- a/sys/compat/linux/arch/alpha/linux_sysent.c +++ b/sys/compat/linux/arch/alpha/linux_sysent.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_sysent.c,v 1.114 2021/09/20 02:20:30 thorpej Exp $ */ +/* $NetBSD: linux_sysent.c,v 1.115 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.114 2021/09/20 02:20:30 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.115 2021/12/02 04:39:44 ryo Exp $"); #if defined(_KERNEL_OPT) #include "opt_sysv.h" @@ -1976,8 +1976,10 @@ struct sysent linux_sysent[] = { .sy_call = linux_sys_nosys, }, /* 495 = filler */ { - .sy_call = linux_sys_nosys, - }, /* 496 = filler */ + ns(struct linux_sys_prlimit64_args), + .sy_flags = SYCALL_ARG_PTR, + .sy_call = (sy_call_t *)linux_sys_prlimit64 + }, /* 496 = prlimit64 */ { .sy_call = linux_sys_nosys, }, /* 497 = filler */ 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) diff --git a/sys/compat/linux/arch/arm/linux_syscall.h b/sys/compat/linux/arch/arm/linux_syscall.h index 48eb495b685..77a399ad2b1 100644 --- a/sys/compat/linux/arch/arm/linux_syscall.h +++ b/sys/compat/linux/arch/arm/linux_syscall.h @@ -1,10 +1,10 @@ -/* $NetBSD: linux_syscall.h,v 1.87 2021/11/24 18:57:24 ryo Exp $ */ +/* $NetBSD: linux_syscall.h,v 1.88 2021/12/02 04:39:45 ryo Exp $ */ /* * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.73 2021/09/20 02:20:02 thorpej Exp + * created from NetBSD: syscalls.master,v 1.74 2021/11/24 18:52:13 ryo Exp */ #ifndef _LINUX_SYS_SYSCALL_H_ @@ -754,6 +754,9 @@ /* syscall: "accept4" ret: "int" args: "int" "struct osockaddr *" "int *" "int" */ #define LINUX_SYS_accept4 366 +/* syscall: "prlimit64" ret: "int" args: "pid_t" "int" "struct rlimit *" "struct rlimit *" */ +#define LINUX_SYS_prlimit64 369 + /* syscall: "sendmmsg" ret: "int" args: "int" "struct linux_mmsghdr *" "unsigned int" "unsigned int" */ #define LINUX_SYS_sendmmsg 374 diff --git a/sys/compat/linux/arch/arm/linux_syscallargs.h b/sys/compat/linux/arch/arm/linux_syscallargs.h index 0d0338383e4..8a434a6c0a1 100644 --- a/sys/compat/linux/arch/arm/linux_syscallargs.h +++ b/sys/compat/linux/arch/arm/linux_syscallargs.h @@ -1,10 +1,10 @@ -/* $NetBSD: linux_syscallargs.h,v 1.87 2021/11/24 18:57:24 ryo Exp $ */ +/* $NetBSD: linux_syscallargs.h,v 1.88 2021/12/02 04:39:45 ryo Exp $ */ /* * System call argument lists. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.73 2021/09/20 02:20:02 thorpej Exp + * created from NetBSD: syscalls.master,v 1.74 2021/11/24 18:52:13 ryo Exp */ #ifndef _LINUX_SYS_SYSCALLARGS_H_ @@ -1184,6 +1184,14 @@ struct linux_sys_accept4_args { }; check_syscall_args(linux_sys_accept4) +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; @@ -1680,6 +1688,8 @@ int linux_sys_recvmmsg(struct lwp *, const struct linux_sys_recvmmsg_args *, reg int linux_sys_accept4(struct lwp *, const struct linux_sys_accept4_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_breakpoint(struct lwp *, const void *, register_t *); diff --git a/sys/compat/linux/arch/arm/linux_syscalls.c b/sys/compat/linux/arch/arm/linux_syscalls.c index a8f0595d18d..142c31b92a7 100644 --- a/sys/compat/linux/arch/arm/linux_syscalls.c +++ b/sys/compat/linux/arch/arm/linux_syscalls.c @@ -1,14 +1,14 @@ -/* $NetBSD: linux_syscalls.c,v 1.87 2021/11/24 18:57:24 ryo Exp $ */ +/* $NetBSD: linux_syscalls.c,v 1.88 2021/12/02 04:39:45 ryo Exp $ */ /* * System call names. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.73 2021/09/20 02:20:02 thorpej Exp + * created from NetBSD: syscalls.master,v 1.74 2021/11/24 18:52:13 ryo Exp */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.87 2021/11/24 18:57:24 ryo Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.88 2021/12/02 04:39:45 ryo Exp $"); #if defined(_KERNEL_OPT) #include <sys/param.h> @@ -404,7 +404,7 @@ const char *const linux_syscallnames[] = { /* 366 */ "accept4", /* 367 */ "#367 (unimplemented fanotify_init)", /* 368 */ "#368 (unimplemented fanotify_mark)", - /* 369 */ "#369 (unimplemented prlimit64)", + /* 369 */ "prlimit64", /* 370 */ "#370 (unimplemented name_to_handle_at)", /* 371 */ "#371 (unimplemented open_by_handle_at)", /* 372 */ "#372 (unimplemented clock_adjtime)", @@ -926,7 +926,7 @@ const char *const altlinux_syscallnames[] = { /* 366 */ NULL, /* accept4 */ /* 367 */ NULL, /* unimplemented fanotify_init */ /* 368 */ NULL, /* unimplemented fanotify_mark */ - /* 369 */ NULL, /* unimplemented prlimit64 */ + /* 369 */ NULL, /* prlimit64 */ /* 370 */ NULL, /* unimplemented name_to_handle_at */ /* 371 */ NULL, /* unimplemented open_by_handle_at */ /* 372 */ NULL, /* unimplemented clock_adjtime */ diff --git a/sys/compat/linux/arch/arm/linux_sysent.c b/sys/compat/linux/arch/arm/linux_sysent.c index 31c8fc8a012..9dfd0fda8e5 100644 --- a/sys/compat/linux/arch/arm/linux_sysent.c +++ b/sys/compat/linux/arch/arm/linux_sysent.c @@ -1,14 +1,14 @@ -/* $NetBSD: linux_sysent.c,v 1.87 2021/11/24 18:57:24 ryo Exp $ */ +/* $NetBSD: linux_sysent.c,v 1.88 2021/12/02 04:39:45 ryo Exp $ */ /* * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.73 2021/09/20 02:20:02 thorpej Exp + * created from NetBSD: syscalls.master,v 1.74 2021/11/24 18:52:13 ryo Exp */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.87 2021/11/24 18:57:24 ryo Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.88 2021/12/02 04:39:45 ryo Exp $"); #include <sys/param.h> #include <sys/poll.h> @@ -1531,8 +1531,10 @@ struct sysent linux_sysent[] = { .sy_call = linux_sys_nosys, }, /* 368 = filler */ { - .sy_call = linux_sys_nosys, - }, /* 369 = filler */ + ns(struct linux_sys_prlimit64_args), + .sy_flags = SYCALL_ARG_PTR, + .sy_call = (sy_call_t *)linux_sys_prlimit64 + }, /* 369 = prlimit64 */ { .sy_call = linux_sys_nosys, }, /* 370 = filler */ diff --git a/sys/compat/linux/arch/arm/linux_systrace_args.c b/sys/compat/linux/arch/arm/linux_systrace_args.c index 10c11a7e104..8a34991110d 100644 --- a/sys/compat/linux/arch/arm/linux_systrace_args.c +++ b/sys/compat/linux/arch/arm/linux_systrace_args.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_systrace_args.c,v 1.20 2021/11/24 18:57:24 ryo Exp $ */ +/* $NetBSD: linux_systrace_args.c,v 1.21 2021/12/02 04:39:45 ryo Exp $ */ /* * System call argument to DTrace register array conversion. @@ -1994,6 +1994,16 @@ systrace_args(register_t sysnum, const void *params, uintptr_t *uarg, size_t *n_ *n_args = 4; break; } + /* linux_sys_prlimit64 */ + case 369: { + 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 374: { const struct linux_sys_sendmmsg_args *p = params; @@ -5290,6 +5300,25 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; }; break; + /* linux_sys_prlimit64 */ + case 369: + 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 374: switch(ndx) { @@ -6500,6 +6529,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 369: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_sys_sendmmsg */ case 374: if (ndx == 0 || ndx == 1) diff --git a/sys/compat/linux/arch/i386/linux_syscall.h b/sys/compat/linux/arch/i386/linux_syscall.h index 8449c346e84..2cf2307b52a 100644 --- a/sys/compat/linux/arch/i386/linux_syscall.h +++ b/sys/compat/linux/arch/i386/linux_syscall.h @@ -1,4 +1,4 @@ -/* $NetBSD: linux_syscall.h,v 1.120 2021/09/20 02:20:30 thorpej Exp $ */ +/* $NetBSD: linux_syscall.h,v 1.121 2021/12/02 04:39:45 ryo Exp $ */ /* * System call numbers. @@ -770,6 +770,9 @@ /* syscall: "pwritev" ret: "int" args: "int" "const struct iovcnt *" "int" "unsigned long" "unsigned long" */ #define LINUX_SYS_pwritev 334 +/* syscall: "prlimit64" ret: "int" args: "pid_t" "int" "struct rlimit *" "struct rlimit *" */ +#define LINUX_SYS_prlimit64 340 + #define LINUX_SYS_MAXSYSCALL 351 #define LINUX_SYS_NSYSENT 512 #endif /* _LINUX_SYS_SYSCALL_H_ */ diff --git a/sys/compat/linux/arch/i386/linux_syscallargs.h b/sys/compat/linux/arch/i386/linux_syscallargs.h index c25e052437c..caa4048984c 100644 --- a/sys/compat/linux/arch/i386/linux_syscallargs.h +++ b/sys/compat/linux/arch/i386/linux_syscallargs.h @@ -1,4 +1,4 @@ -/* $NetBSD: linux_syscallargs.h,v 1.120 2021/09/20 02:20:30 thorpej Exp $ */ +/* $NetBSD: linux_syscallargs.h,v 1.121 2021/12/02 04:39:45 ryo Exp $ */ /* * System call argument lists. @@ -1214,6 +1214,14 @@ struct linux_sys_pwritev_args { }; check_syscall_args(linux_sys_pwritev) +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) + /* * System call prototypes. */ @@ -1702,4 +1710,6 @@ int linux_sys_preadv(struct lwp *, const struct linux_sys_preadv_args *, registe int linux_sys_pwritev(struct lwp *, const struct linux_sys_pwritev_args *, register_t *); +int linux_sys_prlimit64(struct lwp *, const struct linux_sys_prlimit64_args *, register_t *); + #endif /* _LINUX_SYS_SYSCALLARGS_H_ */ diff --git a/sys/compat/linux/arch/i386/linux_syscalls.c b/sys/compat/linux/arch/i386/linux_syscalls.c index 59d196a0484..053dc26eee1 100644 --- a/sys/compat/linux/arch/i386/linux_syscalls.c +++ b/sys/compat/linux/arch/i386/linux_syscalls.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_syscalls.c,v 1.121 2021/09/20 02:20:31 thorpej Exp $ */ +/* $NetBSD: linux_syscalls.c,v 1.122 2021/12/02 04:39:45 ryo Exp $ */ /* * System call names. @@ -8,7 +8,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.121 2021/09/20 02:20:31 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.122 2021/12/02 04:39:45 ryo Exp $"); #if defined(_KERNEL_OPT) #include <sys/param.h> @@ -374,7 +374,7 @@ const char *const linux_syscallnames[] = { /* 337 */ "#337 (unimplemented recvmmsg)", /* 338 */ "#338 (unimplemented fanotify_init)", /* 339 */ "#339 (unimplemented fanotify_mark)", - /* 340 */ "#340 (unimplemented prlimit64)", + /* 340 */ "prlimit64", /* 341 */ "#341 (unimplemented name_to_handle_at)", /* 342 */ "#342 (unimplemented open_by_handle_at)", /* 343 */ "#343 (unimplemented clock_adjtime)", @@ -896,7 +896,7 @@ const char *const altlinux_syscallnames[] = { /* 337 */ NULL, /* unimplemented recvmmsg */ /* 338 */ NULL, /* unimplemented fanotify_init */ /* 339 */ NULL, /* unimplemented fanotify_mark */ - /* 340 */ NULL, /* unimplemented prlimit64 */ + /* 340 */ NULL, /* prlimit64 */ /* 341 */ NULL, /* unimplemented name_to_handle_at */ /* 342 */ NULL, /* unimplemented open_by_handle_at */ /* 343 */ NULL, /* unimplemented clock_adjtime */ diff --git a/sys/compat/linux/arch/i386/linux_sysent.c b/sys/compat/linux/arch/i386/linux_sysent.c index 680b050839b..1c4da6cda09 100644 --- a/sys/compat/linux/arch/i386/linux_sysent.c +++ b/sys/compat/linux/arch/i386/linux_sysent.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_sysent.c,v 1.120 2021/09/20 02:20:31 thorpej Exp $ */ +/* $NetBSD: linux_sysent.c,v 1.121 2021/12/02 04:39:45 ryo Exp $ */ /* * System call switch table. @@ -8,7 +8,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.120 2021/09/20 02:20:31 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.121 2021/12/02 04:39:45 ryo Exp $"); #include <sys/param.h> #include <sys/poll.h> @@ -1453,8 +1453,10 @@ struct sysent linux_sysent[] = { .sy_call = linux_sys_nosys, }, /* 339 = filler */ { - .sy_call = linux_sys_nosys, - }, /* 340 = filler */ + ns(struct linux_sys_prlimit64_args), + .sy_flags = SYCALL_ARG_PTR, + .sy_call = (sy_call_t *)linux_sys_prlimit64 + }, /* 340 = prlimit64 */ { .sy_call = linux_sys_nosys, }, /* 341 = filler */ diff --git a/sys/compat/linux/arch/i386/linux_systrace_args.c b/sys/compat/linux/arch/i386/linux_systrace_args.c index 148357776cf..1fbfd86402d 100644 --- a/sys/compat/linux/arch/i386/linux_systrace_args.c +++ b/sys/compat/linux/arch/i386/linux_systrace_args.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_systrace_args.c,v 1.15 2021/09/20 02:20:31 thorpej Exp $ */ +/* $NetBSD: linux_systrace_args.c,v 1.16 2021/12/02 04:39:45 ryo Exp $ */ /* * System call argument to DTrace register array conversion. @@ -2036,6 +2036,16 @@ systrace_args(register_t sysnum, const void *params, uintptr_t *uarg, size_t *n_ *n_args = 5; break; } + /* linux_sys_prlimit64 */ + case 340: { + 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; + } default: *n_args = 0; break; @@ -5361,6 +5371,25 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; }; break; + /* linux_sys_prlimit64 */ + case 340: + 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; default: break; }; @@ -6553,6 +6582,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 340: + if (ndx == 0 || ndx == 1) + p = "int"; + break; default: break; }; diff --git a/sys/compat/linux/arch/m68k/linux_syscall.h b/sys/compat/linux/arch/m68k/linux_syscall.h index f2b4d241da5..88286b3f823 100644 --- a/sys/compat/linux/arch/m68k/linux_syscall.h +++ b/sys/compat/linux/arch/m68k/linux_syscall.h @@ -1,10 +1,10 @@ -/* $NetBSD: linux_syscall.h,v 1.113 2021/11/24 18:57:25 ryo Exp $ */ +/* $NetBSD: linux_syscall.h,v 1.114 2021/12/02 04:39:45 ryo Exp $ */ /* * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.99 2021/09/20 02:20:02 thorpej Exp + * created from NetBSD: syscalls.master,v 1.100 2021/11/24 18:52:13 ryo Exp */ #ifndef _LINUX_SYS_SYSCALL_H_ @@ -759,6 +759,9 @@ /* syscall: "pwritev" ret: "int" args: "int" "const struct iovcnt *" "int" "unsigned long" "unsigned long" */ #define LINUX_SYS_pwritev 330 +/* syscall: "prlimit64" ret: "int" args: "pid_t" "int" "struct rlimit *" "struct rlimit *" */ +#define LINUX_SYS_prlimit64 339 + /* syscall: "getrandom" ret: "ssize_t" args: "void *" "size_t" "unsigned int" */ #define LINUX_SYS_getrandom 352 diff --git a/sys/compat/linux/arch/m68k/linux_syscallargs.h b/sys/compat/linux/arch/m68k/linux_syscallargs.h index 50dc6012ec0..e4a73634557 100644 --- a/sys/compat/linux/arch/m68k/linux_syscallargs.h +++ b/sys/compat/linux/arch/m68k/linux_syscallargs.h @@ -1,10 +1,10 @@ -/* $NetBSD: linux_syscallargs.h,v 1.112 2021/11/24 18:57:25 ryo Exp $ */ +/* $NetBSD: linux_syscallargs.h,v 1.113 2021/12/02 04:39:45 ryo Exp $ */ /* * System call argument lists. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.99 2021/09/20 02:20:02 thorpej Exp + * created from NetBSD: syscalls.master,v 1.100 2021/11/24 18:52:13 ryo Exp */ #ifndef _LINUX_SYS_SYSCALLARGS_H_ @@ -1175,6 +1175,14 @@ struct linux_sys_pwritev_args { }; check_syscall_args(linux_sys_pwritev) +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 sys_getrandom_args; struct linux_sys_accept4_args { @@ -1686,6 +1694,8 @@ int linux_sys_preadv(struct lwp *, const struct linux_sys_preadv_args *, registe int linux_sys_pwritev(struct lwp *, const struct linux_sys_pwritev_args *, register_t *); +int linux_sys_prlimit64(struct lwp *, const struct linux_sys_prlimit64_args *, register_t *); + int sys_getrandom(struct lwp *, const struct sys_getrandom_args *, register_t *); int linux_sys_accept4(struct lwp *, const struct linux_sys_accept4_args *, register_t *); diff --git a/sys/compat/linux/arch/m68k/linux_syscalls.c b/sys/compat/linux/arch/m68k/linux_syscalls.c index 6a1e8b011a2..5e3ec75436f 100644 --- a/sys/compat/linux/arch/m68k/linux_syscalls.c +++ b/sys/compat/linux/arch/m68k/linux_syscalls.c @@ -1,14 +1,14 @@ -/* $NetBSD: linux_syscalls.c,v 1.113 2021/11/24 18:57:25 ryo Exp $ */ +/* $NetBSD: linux_syscalls.c,v 1.114 2021/12/02 04:39:45 ryo Exp $ */ /* * System call names. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.99 2021/09/20 02:20:02 thorpej Exp + * created from NetBSD: syscalls.master,v 1.100 2021/11/24 18:52:13 ryo Exp */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.113 2021/11/24 18:57:25 ryo Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.114 2021/12/02 04:39:45 ryo Exp $"); #if defined(_KERNEL_OPT) #if defined(_KERNEL_OPT) @@ -393,7 +393,7 @@ const char *const linux_syscallnames[] = { /* 336 */ "#336 (unimplemented atomic_barrier)", /* 337 */ "#337 (unimplemented fanotify_init)", /* 338 */ "#338 (unimplemented fanotify_mark)", - /* 339 */ "#339 (unimplemented prlimit64)", + /* 339 */ "prlimit64", /* 340 */ "#340 (unimplemented name_to_handle_at)", /* 341 */ "#341 (unimplemented open_by_handle_at)", /* 342 */ "#342 (unimplemented clock_adjtime)", @@ -931,7 +931,7 @@ const char *const altlinux_syscallnames[] = { /* 336 */ NULL, /* unimplemented atomic_barrier */ /* 337 */ NULL, /* unimplemented fanotify_init */ /* 338 */ NULL, /* unimplemented fanotify_mark */ - /* 339 */ NULL, /* unimplemented prlimit64 */ + /* 339 */ NULL, /* prlimit64 */ /* 340 */ NULL, /* unimplemented name_to_handle_at */ /* 341 */ NULL, /* unimplemented open_by_handle_at */ /* 342 */ NULL, /* unimplemented clock_adjtime */ diff --git a/sys/compat/linux/arch/m68k/linux_sysent.c b/sys/compat/linux/arch/m68k/linux_sysent.c index 30e6e37b015..7858507cb99 100644 --- a/sys/compat/linux/arch/m68k/linux_sysent.c +++ b/sys/compat/linux/arch/m68k/linux_sysent.c @@ -1,14 +1,14 @@ -/* $NetBSD: linux_sysent.c,v 1.113 2021/11/24 18:57:25 ryo Exp $ */ +/* $NetBSD: linux_sysent.c,v 1.114 2021/12/02 04:39:45 ryo Exp $ */ /* * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.99 2021/09/20 02:20:02 thorpej Exp + * created from NetBSD: syscalls.master,v 1.100 2021/11/24 18:52:13 ryo Exp */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.113 2021/11/24 18:57:25 ryo Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.114 2021/12/02 04:39:45 ryo Exp $"); #if defined(_KERNEL_OPT) #include "opt_compat_netbsd.h" @@ -1460,8 +1460,10 @@ struct sysent linux_sysent[] = { .sy_call = linux_sys_nosys, }, /* 338 = filler */ { - .sy_call = linux_sys_nosys, - }, /* 339 = filler */ + ns(struct linux_sys_prlimit64_args), + .sy_flags = SYCALL_ARG_PTR, + .sy_call = (sy_call_t *)linux_sys_prlimit64 + }, /* 339 = prlimit64 */ { .sy_call = linux_sys_nosys, }, /* 340 = filler */ diff --git a/sys/compat/linux/arch/mips/linux_syscall.h b/sys/compat/linux/arch/mips/linux_syscall.h index 93bca2a5243..0a6315e0856 100644 --- a/sys/compat/linux/arch/mips/linux_syscall.h +++ b/sys/compat/linux/arch/mips/linux_syscall.h @@ -1,10 +1,10 @@ -/* $NetBSD: linux_syscall.h,v 1.85 2021/11/24 18:57:25 ryo Exp $ */ +/* $NetBSD: linux_syscall.h,v 1.86 2021/12/02 04:39:45 ryo Exp $ */ /* * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.72 2021/09/20 02:20:02 thorpej Exp + * created from NetBSD: syscalls.master,v 1.73 2021/11/24 18:52:13 ryo Exp */ #ifndef _LINUX_SYS_SYSCALL_H_ @@ -733,6 +733,9 @@ /* syscall: "recvmmsg" ret: "int" args: "int" "struct linux_mmsghdr *" "unsigned int" "unsigned int" "struct timespec *" */ #define LINUX_SYS_recvmmsg 335 +/* syscall: "prlimit64" ret: "int" args: "pid_t" "int" "struct rlimit *" "struct rlimit *" */ +#define LINUX_SYS_prlimit64 339 + /* syscall: "sendmmsg" ret: "int" args: "int" "struct linux_mmsghdr *" "unsigned int" "unsigned int" */ #define LINUX_SYS_sendmmsg 344 diff --git a/sys/compat/linux/arch/mips/linux_syscallargs.h b/sys/compat/linux/arch/mips/linux_syscallargs.h index 9d4b5e8c1fd..29f6e34c07c 100644 --- a/sys/compat/linux/arch/mips/linux_syscallargs.h +++ b/sys/compat/linux/arch/mips/linux_syscallargs.h @@ -1,10 +1,10 @@ -/* $NetBSD: linux_syscallargs.h,v 1.84 2021/11/24 18:57:25 ryo Exp $ */ +/* $NetBSD: linux_syscallargs.h,v 1.85 2021/12/02 04:39:45 ryo Exp $ */ /* * System call argument lists. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.72 2021/09/20 02:20:02 thorpej Exp + * created from NetBSD: syscalls.master,v 1.73 2021/11/24 18:52:13 ryo Exp */ #ifndef _LINUX_SYS_SYSCALLARGS_H_ @@ -1230,6 +1230,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; @@ -1722,6 +1730,8 @@ int linux_sys_accept4(struct lwp *, const struct linux_sys_accept4_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 sys_getrandom(struct lwp *, const struct sys_getrandom_args *, register_t *); diff --git a/sys/compat/linux/arch/mips/linux_syscalls.c b/sys/compat/linux/arch/mips/linux_syscalls.c index a99b4e9e3d9..7aa9bbdfa64 100644 --- a/sys/compat/linux/arch/mips/linux_syscalls.c +++ b/sys/compat/linux/arch/mips/linux_syscalls.c @@ -1,14 +1,14 @@ -/* $NetBSD: linux_syscalls.c,v 1.84 2021/11/24 18:57:25 ryo Exp $ */ +/* $NetBSD: linux_syscalls.c,v 1.85 2021/12/02 04:39:45 ryo Exp $ */ /* * System call names. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.72 2021/09/20 02:20:02 thorpej Exp + * created from NetBSD: syscalls.master,v 1.73 2021/11/24 18:52:13 ryo Exp */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.84 2021/11/24 18:57:25 ryo Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.85 2021/12/02 04:39:45 ryo Exp $"); #if defined(_KERNEL_OPT) #include <sys/param.h> @@ -369,7 +369,7 @@ const char *const linux_syscallnames[] = { /* 336 */ "#336 (unimplemented getdents64)", /* 337 */ "#337 (unimplemented fanotify_init)", /* 338 */ "#338 (unimplemented fanotify_mark)", - /* 339 */ "#339 (unimplemented prlimit64)", + /* 339 */ "prlimit64", /* 340 */ "#340 (unimplemented name_to_handle_at)", /* 341 */ "#341 (unimplemented open_by_handle_at)", /* 342 */ "#342 (unimplemented clock_adjtime)", @@ -886,7 +886,7 @@ const char *const altlinux_syscallnames[] = { /* 336 */ NULL, /* unimplemented getdents64 */ /* 337 */ NULL, /* unimplemented fanotify_init */ /* 338 */ NULL, /* unimplemented fanotify_mark */ - /* 339 */ NULL, /* unimplemented prlimit64 */ + /* 339 */ NULL, /* prlimit64 */ /* 340 */ NULL, /* unimplemented name_to_handle_at */ /* 341 */ NULL, /* unimplemented open_by_handle_at */ /* 342 */ NULL, /* unimplemented clock_adjtime */ diff --git a/sys/compat/linux/arch/mips/linux_sysent.c b/sys/compat/linux/arch/mips/linux_sysent.c index 4b4ed07e296..01c5cfb312f 100644 --- a/sys/compat/linux/arch/mips/linux_sysent.c +++ b/sys/compat/linux/arch/mips/linux_sysent.c @@ -1,14 +1,14 @@ -/* $NetBSD: linux_sysent.c,v 1.84 2021/11/24 18:57:25 ryo Exp $ */ +/* $NetBSD: linux_sysent.c,v 1.85 2021/12/02 04:39:45 ryo Exp $ */ /* * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.72 2021/09/20 02:20:02 thorpej Exp + * created from NetBSD: syscalls.master,v 1.73 2021/11/24 18:52:13 ryo Exp */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.84 2021/11/24 18:57:25 ryo Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.85 2021/12/02 04:39:45 ryo Exp $"); #include <sys/param.h> #include <sys/poll.h> @@ -1442,8 +1442,10 @@ struct sysent linux_sysent[] = { .sy_call = linux_sys_nosys, }, /* 338 = filler */ { - .sy_call = linux_sys_nosys, - }, /* 339 = filler */ + ns(struct linux_sys_prlimit64_args), + .sy_flags = SYCALL_ARG_PTR, + .sy_call = (sy_call_t *)linux_sys_prlimit64 + }, /* 339 = prlimit64 */ { .sy_call = linux_sys_nosys, }, /* 340 = filler */ diff --git a/sys/compat/linux/arch/powerpc/linux_syscall.h b/sys/compat/linux/arch/powerpc/linux_syscall.h index fc94dbcbeb8..9743d24283c 100644 --- a/sys/compat/linux/arch/powerpc/linux_syscall.h +++ b/sys/compat/linux/arch/powerpc/linux_syscall.h @@ -1,10 +1,10 @@ -/* $NetBSD: linux_syscall.h,v 1.91 2021/11/24 18:57:25 ryo Exp $ */ +/* $NetBSD: linux_syscall.h,v 1.92 2021/12/02 04:39:45 ryo Exp $ */ /* * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.78 2021/09/20 02:20:02 thorpej Exp + * created from NetBSD: syscalls.master,v 1.79 2021/11/24 18:52:13 ryo Exp */ #ifndef _LINUX_SYS_SYSCALL_H_ @@ -696,6 +696,9 @@ /* syscall: "pwritev" ret: "int" args: "int" "const struct iovcnt *" "int" "unsigned long" "unsigned long" */ #define LINUX_SYS_pwritev 321 +/* syscall: "prlimit64" ret: "int" args: "pid_t" "int" "struct rlimit *" "struct rlimit *" */ +#define LINUX_SYS_prlimit64 325 + /* syscall: "recvmmsg" ret: "int" args: "int" "struct linux_mmsghdr *" "unsigned int" "unsigned int" "struct timespec *" */ #define LINUX_SYS_recvmmsg 343 diff --git a/sys/compat/linux/arch/powerpc/linux_syscallargs.h b/sys/compat/linux/arch/powerpc/linux_syscallargs.h index 78c3cb65ac3..14361a05eee 100644 --- a/sys/compat/linux/arch/powerpc/linux_syscallargs.h +++ b/sys/compat/linux/arch/powerpc/linux_syscallargs.h @@ -1,10 +1,10 @@ -/* $NetBSD: linux_syscallargs.h,v 1.90 2021/11/24 18:57:25 ryo Exp $ */ +/* $NetBSD: linux_syscallargs.h,v 1.91 2021/12/02 04:39:45 ryo Exp $ */ /* * System call argument lists. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.78 2021/09/20 02:20:02 thorpej Exp + * created from NetBSD: syscalls.master,v 1.79 2021/11/24 18:52:13 ryo Exp */ #ifndef _LINUX_SYS_SYSCALLARGS_H_ @@ -1100,6 +1100,14 @@ struct linux_sys_pwritev_args { }; check_syscall_args(linux_sys_pwritev) +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_recvmmsg_args { syscallarg(int) s; syscallarg(struct linux_mmsghdr *) msgvec; @@ -1581,6 +1589,8 @@ int linux_sys_preadv(struct lwp *, const struct linux_sys_preadv_args *, registe int linux_sys_pwritev(struct lwp *, const struct linux_sys_pwritev_args *, register_t *); +int linux_sys_prlimit64(struct lwp *, const struct linux_sys_prlimit64_args *, register_t *); + int linux_sys_recvmmsg(struct lwp *, const struct linux_sys_recvmmsg_args *, register_t *); int linux_sys_accept4(struct lwp *, const struct linux_sys_accept4_args *, register_t *); diff --git a/sys/compat/linux/arch/powerpc/linux_syscalls.c b/sys/compat/linux/arch/powerpc/linux_syscalls.c index 46f5ff9c16d..909c752d989 100644 --- a/sys/compat/linux/arch/powerpc/linux_syscalls.c +++ b/sys/compat/linux/arch/powerpc/linux_syscalls.c @@ -1,14 +1,14 @@ -/* $NetBSD: linux_syscalls.c,v 1.90 2021/11/24 18:57:25 ryo Exp $ */ +/* $NetBSD: linux_syscalls.c,v 1.91 2021/12/02 04:39:45 ryo Exp $ */ /* * System call names. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.78 2021/09/20 02:20:02 thorpej Exp + * created from NetBSD: syscalls.master,v 1.79 2021/11/24 18:52:13 ryo Exp */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.90 2021/11/24 18:57:25 ryo Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.91 2021/12/02 04:39:45 ryo Exp $"); #if defined(_KERNEL_OPT) #include <sys/param.h> @@ -358,7 +358,7 @@ const char *const linux_syscallnames[] = { /* 322 */ "#322 (unimplemented rt_tgsigqueueinfo)", /* 323 */ "#323 (unimplemented fanotify_init)", /* 324 */ "#324 (unimplemented fanotify_mark)", - /* 325 */ "#325 (unimplemented prlimit64)", + /* 325 */ "prlimit64", /* 326 */ "#326 (unimplemented socket)", /* 327 */ "#327 (unimplemented bind)", /* 328 */ "#328 (unimplemented connect)", @@ -880,7 +880,7 @@ const char *const altlinux_syscallnames[] = { /* 322 */ NULL, /* unimplemented rt_tgsigqueueinfo */ /* 323 */ NULL, /* unimplemented fanotify_init */ /* 324 */ NULL, /* unimplemented fanotify_mark */ - /* 325 */ NULL, /* unimplemented prlimit64 */ + /* 325 */ NULL, /* prlimit64 */ /* 326 */ NULL, /* unimplemented socket */ /* 327 */ NULL, /* unimplemented bind */ /* 328 */ NULL, /* unimplemented connect */ diff --git a/sys/compat/linux/arch/powerpc/linux_sysent.c b/sys/compat/linux/arch/powerpc/linux_sysent.c index e78e2ea7eea..5e4c75f3fc2 100644 --- a/sys/compat/linux/arch/powerpc/linux_sysent.c +++ b/sys/compat/linux/arch/powerpc/linux_sysent.c @@ -1,14 +1,14 @@ -/* $NetBSD: linux_sysent.c,v 1.91 2021/11/24 18:57:25 ryo Exp $ */ +/* $NetBSD: linux_sysent.c,v 1.92 2021/12/02 04:39:45 ryo Exp $ */ /* * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.78 2021/09/20 02:20:02 thorpej Exp + * created from NetBSD: syscalls.master,v 1.79 2021/11/24 18:52:13 ryo Exp */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.91 2021/11/24 18:57:25 ryo Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.92 2021/12/02 04:39:45 ryo Exp $"); #include <sys/param.h> #include <sys/poll.h> @@ -1375,8 +1375,10 @@ struct sysent linux_sysent[] = { .sy_call = linux_sys_nosys, }, /* 324 = filler */ { - .sy_call = linux_sys_nosys, - }, /* 325 = filler */ + ns(struct linux_sys_prlimit64_args), + .sy_flags = SYCALL_ARG_PTR, + .sy_call = (sy_call_t *)linux_sys_prlimit64 + }, /* 325 = prlimit64 */ { .sy_call = linux_sys_nosys, }, /* 326 = filler */ diff --git a/sys/compat/linux32/arch/aarch64/linux32_syscall.h b/sys/compat/linux32/arch/aarch64/linux32_syscall.h index 2813e342a34..b36a0b683f2 100644 --- a/sys/compat/linux32/arch/aarch64/linux32_syscall.h +++ b/sys/compat/linux32/arch/aarch64/linux32_syscall.h @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_syscall.h,v 1.2 2021/11/27 21:15:53 ryo Exp $ */ +/* $NetBSD: linux32_syscall.h,v 1.3 2021/12/02 04:39:45 ryo Exp $ */ /* * System call numbers. @@ -769,6 +769,9 @@ /* syscall: "pwritev" ret: "int" args: "int" "const netbsd32_iovecp_t" "int" "netbsd32_u_long" "netbsd32_u_long" */ #define LINUX32_SYS_pwritev 362 +/* syscall: "prlimit64" ret: "int" args: "pid_t" "int" "netbsd32_rlimitp_t" "netbsd32_rlimitp_t" */ +#define LINUX32_SYS_prlimit64 369 + /* syscall: "netbsd32_getrandom" ret: "netbsd32_ssize_t" args: "netbsd32_voidp" "netbsd32_size_t" "unsigned int" */ #define LINUX32_SYS_netbsd32_getrandom 384 diff --git a/sys/compat/linux32/arch/aarch64/linux32_syscallargs.h b/sys/compat/linux32/arch/aarch64/linux32_syscallargs.h index e162b3f8b08..6795816855d 100644 --- a/sys/compat/linux32/arch/aarch64/linux32_syscallargs.h +++ b/sys/compat/linux32/arch/aarch64/linux32_syscallargs.h @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_syscallargs.h,v 1.2 2021/11/27 21:15:53 ryo Exp $ */ +/* $NetBSD: linux32_syscallargs.h,v 1.3 2021/12/02 04:39:45 ryo Exp $ */ /* * System call argument lists. @@ -1096,6 +1096,14 @@ struct linux32_sys_pwritev_args { }; check_syscall_args(linux32_sys_pwritev) +struct linux32_sys_prlimit64_args { + syscallarg(pid_t) pid; + syscallarg(int) which; + syscallarg(netbsd32_rlimitp_t) new_rlp; + syscallarg(netbsd32_rlimitp_t) old_rlp; +}; +check_syscall_args(linux32_sys_prlimit64) + struct netbsd32_getrandom_args; struct linux32_sys_statx_args { @@ -1598,6 +1606,8 @@ int linux32_sys_preadv(struct lwp *, const struct linux32_sys_preadv_args *, reg int linux32_sys_pwritev(struct lwp *, const struct linux32_sys_pwritev_args *, register_t *); +int linux32_sys_prlimit64(struct lwp *, const struct linux32_sys_prlimit64_args *, register_t *); + int netbsd32_getrandom(struct lwp *, const struct netbsd32_getrandom_args *, register_t *); int linux32_sys_statx(struct lwp *, const struct linux32_sys_statx_args *, register_t *); diff --git a/sys/compat/linux32/arch/aarch64/linux32_syscalls.c b/sys/compat/linux32/arch/aarch64/linux32_syscalls.c index bf272a8a17c..6e822ff1fd7 100644 --- a/sys/compat/linux32/arch/aarch64/linux32_syscalls.c +++ b/sys/compat/linux32/arch/aarch64/linux32_syscalls.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_syscalls.c,v 1.2 2021/11/27 21:15:53 ryo Exp $ */ +/* $NetBSD: linux32_syscalls.c,v 1.3 2021/12/02 04:39:45 ryo Exp $ */ /* * System call names. @@ -8,7 +8,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux32_syscalls.c,v 1.2 2021/11/27 21:15:53 ryo Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux32_syscalls.c,v 1.3 2021/12/02 04:39:45 ryo Exp $"); #if defined(_KERNEL_OPT) #include <sys/param.h> @@ -405,7 +405,7 @@ const char *const linux32_syscallnames[] = { /* 366 */ "#366 (unimplemented accept4)", /* 367 */ "#367 (unimplemented fanotify_init)", /* 368 */ "#368 (unimplemented fanotify_mark)", - /* 369 */ "#369 (unimplemented prlimit64)", + /* 369 */ "prlimit64", /* 370 */ "#370 (unimplemented name_to_handle_at)", /* 371 */ "#371 (unimplemented open_by_handle_at)", /* 372 */ "#372 (unimplemented clock_adjtime)", @@ -924,7 +924,7 @@ const char *const altlinux32_syscallnames[] = { /* 366 */ NULL, /* unimplemented accept4 */ /* 367 */ NULL, /* unimplemented fanotify_init */ /* 368 */ NULL, /* unimplemented fanotify_mark */ - /* 369 */ NULL, /* unimplemented prlimit64 */ + /* 369 */ NULL, /* prlimit64 */ /* 370 */ NULL, /* unimplemented name_to_handle_at */ /* 371 */ NULL, /* unimplemented open_by_handle_at */ /* 372 */ NULL, /* unimplemented clock_adjtime */ diff --git a/sys/compat/linux32/arch/aarch64/linux32_sysent.c b/sys/compat/linux32/arch/aarch64/linux32_sysent.c index b93419b0050..a585b91f2df 100644 --- a/sys/compat/linux32/arch/aarch64/linux32_sysent.c +++ b/sys/compat/linux32/arch/aarch64/linux32_sysent.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_sysent.c,v 1.2 2021/11/27 21:15:53 ryo Exp $ */ +/* $NetBSD: linux32_sysent.c,v 1.3 2021/12/02 04:39:45 ryo Exp $ */ /* * System call switch table. @@ -8,7 +8,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux32_sysent.c,v 1.2 2021/11/27 21:15:53 ryo Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux32_sysent.c,v 1.3 2021/12/02 04:39:45 ryo Exp $"); #include <sys/param.h> #include <sys/syscallargs.h> @@ -1379,8 +1379,9 @@ struct sysent linux32_sysent[] = { .sy_call = linux_sys_nosys, }, /* 368 = filler */ { - .sy_call = linux_sys_nosys, - }, /* 369 = filler */ + ns(struct linux32_sys_prlimit64_args), + .sy_call = (sy_call_t *)linux32_sys_prlimit64 + }, /* 369 = prlimit64 */ { .sy_call = linux_sys_nosys, }, /* 370 = filler */ diff --git a/sys/compat/linux32/arch/aarch64/linux32_systrace_args.c b/sys/compat/linux32/arch/aarch64/linux32_systrace_args.c index 720ccce7e5d..eed519541e9 100644 --- a/sys/compat/linux32/arch/aarch64/linux32_systrace_args.c +++ b/sys/compat/linux32/arch/aarch64/linux32_systrace_args.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_systrace_args.c,v 1.2 2021/11/27 21:15:53 ryo Exp $ */ +/* $NetBSD: linux32_systrace_args.c,v 1.3 2021/12/02 04:39:45 ryo Exp $ */ /* * System call argument to DTrace register array conversion. @@ -2063,6 +2063,16 @@ systrace_args(register_t sysnum, const void *params, uintptr_t *uarg, size_t *n_ *n_args = 5; break; } + /* linux32_sys_prlimit64 */ + case 369: { + const struct linux32_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).i32; /* netbsd32_rlimitp_t */ + uarg[3] = (intptr_t) SCARG(p, old_rlp).i32; /* netbsd32_rlimitp_t */ + *n_args = 4; + break; + } /* netbsd32_getrandom */ case 384: { const struct netbsd32_getrandom_args *p = params; @@ -5505,6 +5515,25 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; }; break; + /* linux32_sys_prlimit64 */ + case 369: + switch(ndx) { + case 0: + p = "pid_t"; + break; + case 1: + p = "int"; + break; + case 2: + p = "netbsd32_rlimitp_t"; + break; + case 3: + p = "netbsd32_rlimitp_t"; + break; + default: + break; + }; + break; /* netbsd32_getrandom */ case 384: switch(ndx) { @@ -6746,6 +6775,11 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) if (ndx == 0 || ndx == 1) p = "int"; break; + /* linux32_sys_prlimit64 */ + case 369: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* netbsd32_getrandom */ case 384: if (ndx == 0 || ndx == 1) diff --git a/sys/compat/linux32/arch/amd64/linux32_syscall.h b/sys/compat/linux32/arch/amd64/linux32_syscall.h index 6e475735da3..66335fe1a42 100644 --- a/sys/compat/linux32/arch/amd64/linux32_syscall.h +++ b/sys/compat/linux32/arch/amd64/linux32_syscall.h @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_syscall.h,v 1.86 2021/11/27 21:15:53 ryo Exp $ */ +/* $NetBSD: linux32_syscall.h,v 1.87 2021/12/02 04:39:45 ryo Exp $ */ /* * System call numbers. @@ -750,6 +750,9 @@ /* syscall: "pwritev" ret: "int" args: "int" "const netbsd32_iovecp_t" "int" "netbsd32_u_long" "netbsd32_u_long" */ #define LINUX32_SYS_pwritev 334 +/* syscall: "prlimit64" ret: "int" args: "pid_t" "int" "netbsd32_rlimitp_t" "netbsd32_rlimitp_t" */ +#define LINUX32_SYS_prlimit64 340 + #define LINUX32_SYS_MAXSYSCALL 351 #define LINUX32_SYS_NSYSENT 512 #endif /* _LINUX32_SYS_SYSCALL_H_ */ diff --git a/sys/compat/linux32/arch/amd64/linux32_syscallargs.h b/sys/compat/linux32/arch/amd64/linux32_syscallargs.h index 1301ee64e1a..8f8c027e15c 100644 --- a/sys/compat/linux32/arch/amd64/linux32_syscallargs.h +++ b/sys/compat/linux32/arch/amd64/linux32_syscallargs.h @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_syscallargs.h,v 1.86 2021/11/27 21:15:53 ryo Exp $ */ +/* $NetBSD: linux32_syscallargs.h,v 1.87 2021/12/02 04:39:45 ryo Exp $ */ /* * System call argument lists. @@ -1105,6 +1105,14 @@ struct linux32_sys_pwritev_args { }; check_syscall_args(linux32_sys_pwritev) +struct linux32_sys_prlimit64_args { + syscallarg(pid_t) pid; + syscallarg(int) which; + syscallarg(netbsd32_rlimitp_t) new_rlp; + syscallarg(netbsd32_rlimitp_t) old_rlp; +}; +check_syscall_args(linux32_sys_prlimit64) + /* * System call prototypes. */ @@ -1579,4 +1587,6 @@ int linux32_sys_preadv(struct lwp *, const struct linux32_sys_preadv_args *, reg int linux32_sys_pwritev(struct lwp *, const struct linux32_sys_pwritev_args *, register_t *); +int linux32_sys_prlimit64(struct lwp *, const struct linux32_sys_prlimit64_args *, register_t *); + #endif /* _LINUX32_SYS_SYSCALLARGS_H_ */ diff --git a/sys/compat/linux32/arch/amd64/linux32_syscalls.c b/sys/compat/linux32/arch/amd64/linux32_syscalls.c index eddcaacc645..29553cfadc7 100644 --- a/sys/compat/linux32/arch/amd64/linux32_syscalls.c +++ b/sys/compat/linux32/arch/amd64/linux32_syscalls.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_syscalls.c,v 1.86 2021/11/27 21:15:53 ryo Exp $ */ +/* $NetBSD: linux32_syscalls.c,v 1.87 2021/12/02 04:39:45 ryo Exp $ */ /* * System call names. @@ -8,7 +8,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux32_syscalls.c,v 1.86 2021/11/27 21:15:53 ryo Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux32_syscalls.c,v 1.87 2021/12/02 04:39:45 ryo Exp $"); #if defined(_KERNEL_OPT) #include <sys/param.h> @@ -379,7 +379,7 @@ const char *const linux32_syscallnames[] = { /* 337 */ "#337 (unimplemented recvmmsg)", /* 338 */ "#338 (unimplemented fanotify_init)", /* 339 */ "#339 (unimplemented fanotify_mark)", - /* 340 */ "#340 (unimplemented prlimit64)", + /* 340 */ "prlimit64", /* 341 */ "#341 (unimplemented name_to_handle_at)", /* 342 */ "#342 (unimplemented open_by_handle_at)", /* 343 */ "#343 (unimplemented clock_adjtime)", @@ -898,7 +898,7 @@ const char *const altlinux32_syscallnames[] = { /* 337 */ NULL, /* unimplemented recvmmsg */ /* 338 */ NULL, /* unimplemented fanotify_init */ /* 339 */ NULL, /* unimplemented fanotify_mark */ - /* 340 */ NULL, /* unimplemented prlimit64 */ + /* 340 */ NULL, /* prlimit64 */ /* 341 */ NULL, /* unimplemented name_to_handle_at */ /* 342 */ NULL, /* unimplemented open_by_handle_at */ /* 343 */ NULL, /* unimplemented clock_adjtime */ diff --git a/sys/compat/linux32/arch/amd64/linux32_sysent.c b/sys/compat/linux32/arch/amd64/linux32_sysent.c index 4fa91a2d05e..63be2358a51 100644 --- a/sys/compat/linux32/arch/amd64/linux32_sysent.c +++ b/sys/compat/linux32/arch/amd64/linux32_sysent.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_sysent.c,v 1.86 2021/11/27 21:15:53 ryo Exp $ */ +/* $NetBSD: linux32_sysent.c,v 1.87 2021/12/02 04:39:45 ryo Exp $ */ /* * System call switch table. @@ -8,7 +8,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux32_sysent.c,v 1.86 2021/11/27 21:15:53 ryo Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux32_sysent.c,v 1.87 2021/12/02 04:39:45 ryo Exp $"); #include <sys/param.h> #include <sys/poll.h> @@ -1289,8 +1289,9 @@ struct sysent linux32_sysent[] = { .sy_call = linux_sys_nosys, }, /* 339 = filler */ { - .sy_call = linux_sys_nosys, - }, /* 340 = filler */ + ns(struct linux32_sys_prlimit64_args), + .sy_call = (sy_call_t *)linux32_sys_prlimit64 + }, /* 340 = prlimit64 */ { .sy_call = linux_sys_nosys, }, /* 341 = filler */ diff --git a/sys/compat/linux32/arch/amd64/linux32_systrace_args.c b/sys/compat/linux32/arch/amd64/linux32_systrace_args.c index 64d928f4b2c..1569342baa1 100644 --- a/sys/compat/linux32/arch/amd64/linux32_systrace_args.c +++ b/sys/compat/linux32/arch/amd64/linux32_systrace_args.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_systrace_args.c,v 1.13 2021/11/27 21:15:53 ryo Exp $ */ +/* $NetBSD: linux32_systrace_args.c,v 1.14 2021/12/02 04:39:45 ryo Exp $ */ /* * System call argument to DTrace register array conversion. @@ -1990,6 +1990,16 @@ systrace_args(register_t sysnum, const void *params, uintptr_t *uarg, size_t *n_ *n_args = 5; break; } + /* linux32_sys_prlimit64 */ + case 340: { + const struct linux32_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).i32; /* netbsd32_rlimitp_t */ + uarg[3] = (intptr_t) SCARG(p, old_rlp).i32; /* netbsd32_rlimitp_t */ + *n_args = 4; + break; + } default: *n_args = 0; break; @@ -5247,6 +5257,25 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; }; break; + /* linux32_sys_prlimit64 */ + case 340: + switch(ndx) { + case 0: + p = "pid_t"; + break; + case 1: + p = "int"; + break; + case 2: + p = "netbsd32_rlimitp_t"; + break; + case 3: + p = "netbsd32_rlimitp_t"; + break; + default: + break; + }; + break; default: break; }; @@ -6407,6 +6436,11 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) if (ndx == 0 || ndx == 1) p = "int"; break; + /* linux32_sys_prlimit64 */ + case 340: + if (ndx == 0 || ndx == 1) + p = "int"; + break; default: break; }; |
