Module Name:    src
Committed By:   ryo
Date:           Thu Dec  2 04:39:45 UTC 2021

Modified Files:
        src/sys/compat/linux/arch/aarch64: linux_syscall.h linux_syscallargs.h
            linux_syscalls.c linux_sysent.c linux_systrace_args.c
        src/sys/compat/linux/arch/alpha: linux_syscall.h linux_syscallargs.h
            linux_syscalls.c linux_sysent.c
        src/sys/compat/linux/arch/amd64: linux_syscall.h linux_syscallargs.h
            linux_syscalls.c linux_sysent.c linux_systrace_args.c
        src/sys/compat/linux/arch/arm: linux_syscall.h linux_syscallargs.h
            linux_syscalls.c linux_sysent.c linux_systrace_args.c
        src/sys/compat/linux/arch/i386: linux_syscall.h linux_syscallargs.h
            linux_syscalls.c linux_sysent.c linux_systrace_args.c
        src/sys/compat/linux/arch/m68k: linux_syscall.h linux_syscallargs.h
            linux_syscalls.c linux_sysent.c
        src/sys/compat/linux/arch/mips: linux_syscall.h linux_syscallargs.h
            linux_syscalls.c linux_sysent.c
        src/sys/compat/linux/arch/powerpc: linux_syscall.h linux_syscallargs.h
            linux_syscalls.c linux_sysent.c
        src/sys/compat/linux32/arch/aarch64: linux32_syscall.h
            linux32_syscallargs.h linux32_syscalls.c linux32_sysent.c
            linux32_systrace_args.c
        src/sys/compat/linux32/arch/amd64: linux32_syscall.h
            linux32_syscallargs.h linux32_syscalls.c linux32_sysent.c
            linux32_systrace_args.c

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/compat/linux/arch/aarch64/linux_syscall.h \
    src/sys/compat/linux/arch/aarch64/linux_syscallargs.h \
    src/sys/compat/linux/arch/aarch64/linux_syscalls.c \
    src/sys/compat/linux/arch/aarch64/linux_sysent.c \
    src/sys/compat/linux/arch/aarch64/linux_systrace_args.c
cvs rdiff -u -r1.114 -r1.115 src/sys/compat/linux/arch/alpha/linux_syscall.h \
    src/sys/compat/linux/arch/alpha/linux_sysent.c
cvs rdiff -u -r1.113 -r1.114 \
    src/sys/compat/linux/arch/alpha/linux_syscallargs.h
cvs rdiff -u -r1.115 -r1.116 src/sys/compat/linux/arch/alpha/linux_syscalls.c
cvs rdiff -u -r1.75 -r1.76 src/sys/compat/linux/arch/amd64/linux_syscall.h \
    src/sys/compat/linux/arch/amd64/linux_syscallargs.h \
    src/sys/compat/linux/arch/amd64/linux_syscalls.c \
    src/sys/compat/linux/arch/amd64/linux_sysent.c
cvs rdiff -u -r1.19 -r1.20 \
    src/sys/compat/linux/arch/amd64/linux_systrace_args.c
cvs rdiff -u -r1.87 -r1.88 src/sys/compat/linux/arch/arm/linux_syscall.h \
    src/sys/compat/linux/arch/arm/linux_syscallargs.h \
    src/sys/compat/linux/arch/arm/linux_syscalls.c \
    src/sys/compat/linux/arch/arm/linux_sysent.c
cvs rdiff -u -r1.20 -r1.21 \
    src/sys/compat/linux/arch/arm/linux_systrace_args.c
cvs rdiff -u -r1.120 -r1.121 src/sys/compat/linux/arch/i386/linux_syscall.h \
    src/sys/compat/linux/arch/i386/linux_syscallargs.h \
    src/sys/compat/linux/arch/i386/linux_sysent.c
cvs rdiff -u -r1.121 -r1.122 src/sys/compat/linux/arch/i386/linux_syscalls.c
cvs rdiff -u -r1.15 -r1.16 \
    src/sys/compat/linux/arch/i386/linux_systrace_args.c
cvs rdiff -u -r1.113 -r1.114 src/sys/compat/linux/arch/m68k/linux_syscall.h \
    src/sys/compat/linux/arch/m68k/linux_syscalls.c \
    src/sys/compat/linux/arch/m68k/linux_sysent.c
cvs rdiff -u -r1.112 -r1.113 \
    src/sys/compat/linux/arch/m68k/linux_syscallargs.h
cvs rdiff -u -r1.85 -r1.86 src/sys/compat/linux/arch/mips/linux_syscall.h
cvs rdiff -u -r1.84 -r1.85 src/sys/compat/linux/arch/mips/linux_syscallargs.h \
    src/sys/compat/linux/arch/mips/linux_syscalls.c \
    src/sys/compat/linux/arch/mips/linux_sysent.c
cvs rdiff -u -r1.91 -r1.92 src/sys/compat/linux/arch/powerpc/linux_syscall.h \
    src/sys/compat/linux/arch/powerpc/linux_sysent.c
cvs rdiff -u -r1.90 -r1.91 \
    src/sys/compat/linux/arch/powerpc/linux_syscallargs.h \
    src/sys/compat/linux/arch/powerpc/linux_syscalls.c
cvs rdiff -u -r1.2 -r1.3 \
    src/sys/compat/linux32/arch/aarch64/linux32_syscall.h \
    src/sys/compat/linux32/arch/aarch64/linux32_syscallargs.h \
    src/sys/compat/linux32/arch/aarch64/linux32_syscalls.c \
    src/sys/compat/linux32/arch/aarch64/linux32_sysent.c \
    src/sys/compat/linux32/arch/aarch64/linux32_systrace_args.c
cvs rdiff -u -r1.86 -r1.87 \
    src/sys/compat/linux32/arch/amd64/linux32_syscall.h \
    src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h \
    src/sys/compat/linux32/arch/amd64/linux32_syscalls.c \
    src/sys/compat/linux32/arch/amd64/linux32_sysent.c
cvs rdiff -u -r1.13 -r1.14 \
    src/sys/compat/linux32/arch/amd64/linux32_systrace_args.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/linux/arch/aarch64/linux_syscall.h
diff -u src/sys/compat/linux/arch/aarch64/linux_syscall.h:1.3 src/sys/compat/linux/arch/aarch64/linux_syscall.h:1.4
--- src/sys/compat/linux/arch/aarch64/linux_syscall.h:1.3	Thu Nov 25 02:32:24 2021
+++ src/sys/compat/linux/arch/aarch64/linux_syscall.h	Thu Dec  2 04:39:44 2021
@@ -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
 
Index: src/sys/compat/linux/arch/aarch64/linux_syscallargs.h
diff -u src/sys/compat/linux/arch/aarch64/linux_syscallargs.h:1.3 src/sys/compat/linux/arch/aarch64/linux_syscallargs.h:1.4
--- src/sys/compat/linux/arch/aarch64/linux_syscallargs.h:1.3	Thu Nov 25 02:32:24 2021
+++ src/sys/compat/linux/arch/aarch64/linux_syscallargs.h	Thu Dec  2 04:39:44 2021
@@ -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 *, con
 
 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 *);
Index: src/sys/compat/linux/arch/aarch64/linux_syscalls.c
diff -u src/sys/compat/linux/arch/aarch64/linux_syscalls.c:1.3 src/sys/compat/linux/arch/aarch64/linux_syscalls.c:1.4
--- src/sys/compat/linux/arch/aarch64/linux_syscalls.c:1.3	Thu Nov 25 02:32:24 2021
+++ src/sys/compat/linux/arch/aarch64/linux_syscalls.c	Thu Dec  2 04:39:44 2021
@@ -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 */
Index: src/sys/compat/linux/arch/aarch64/linux_sysent.c
diff -u src/sys/compat/linux/arch/aarch64/linux_sysent.c:1.3 src/sys/compat/linux/arch/aarch64/linux_sysent.c:1.4
--- src/sys/compat/linux/arch/aarch64/linux_sysent.c:1.3	Thu Nov 25 02:32:24 2021
+++ src/sys/compat/linux/arch/aarch64/linux_sysent.c	Thu Dec  2 04:39:44 2021
@@ -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 */
Index: src/sys/compat/linux/arch/aarch64/linux_systrace_args.c
diff -u src/sys/compat/linux/arch/aarch64/linux_systrace_args.c:1.3 src/sys/compat/linux/arch/aarch64/linux_systrace_args.c:1.4
--- src/sys/compat/linux/arch/aarch64/linux_systrace_args.c:1.3	Thu Nov 25 02:32:24 2021
+++ src/sys/compat/linux/arch/aarch64/linux_systrace_args.c	Thu Dec  2 04:39:44 2021
@@ -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 v
 		*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, in
 			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, i
 		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)

Index: src/sys/compat/linux/arch/alpha/linux_syscall.h
diff -u src/sys/compat/linux/arch/alpha/linux_syscall.h:1.114 src/sys/compat/linux/arch/alpha/linux_syscall.h:1.115
--- src/sys/compat/linux/arch/alpha/linux_syscall.h:1.114	Mon Sep 20 02:20:30 2021
+++ src/sys/compat/linux/arch/alpha/linux_syscall.h	Thu Dec  2 04:39:44 2021
@@ -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
 
Index: src/sys/compat/linux/arch/alpha/linux_sysent.c
diff -u src/sys/compat/linux/arch/alpha/linux_sysent.c:1.114 src/sys/compat/linux/arch/alpha/linux_sysent.c:1.115
--- src/sys/compat/linux/arch/alpha/linux_sysent.c:1.114	Mon Sep 20 02:20:30 2021
+++ src/sys/compat/linux/arch/alpha/linux_sysent.c	Thu Dec  2 04:39:44 2021
@@ -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 */

Index: src/sys/compat/linux/arch/alpha/linux_syscallargs.h
diff -u src/sys/compat/linux/arch/alpha/linux_syscallargs.h:1.113 src/sys/compat/linux/arch/alpha/linux_syscallargs.h:1.114
--- src/sys/compat/linux/arch/alpha/linux_syscallargs.h:1.113	Mon Sep 20 02:20:30 2021
+++ src/sys/compat/linux/arch/alpha/linux_syscallargs.h	Thu Dec  2 04:39:44 2021
@@ -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
 
 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 *);

Index: src/sys/compat/linux/arch/alpha/linux_syscalls.c
diff -u src/sys/compat/linux/arch/alpha/linux_syscalls.c:1.115 src/sys/compat/linux/arch/alpha/linux_syscalls.c:1.116
--- src/sys/compat/linux/arch/alpha/linux_syscalls.c:1.115	Mon Sep 20 02:20:30 2021
+++ src/sys/compat/linux/arch/alpha/linux_syscalls.c	Thu Dec  2 04:39:44 2021
@@ -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 */

Index: src/sys/compat/linux/arch/amd64/linux_syscall.h
diff -u src/sys/compat/linux/arch/amd64/linux_syscall.h:1.75 src/sys/compat/linux/arch/amd64/linux_syscall.h:1.76
--- src/sys/compat/linux/arch/amd64/linux_syscall.h:1.75	Mon Sep 20 02:20:30 2021
+++ src/sys/compat/linux/arch/amd64/linux_syscall.h	Thu Dec  2 04:39:44 2021
@@ -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
 
Index: src/sys/compat/linux/arch/amd64/linux_syscallargs.h
diff -u src/sys/compat/linux/arch/amd64/linux_syscallargs.h:1.75 src/sys/compat/linux/arch/amd64/linux_syscallargs.h:1.76
--- src/sys/compat/linux/arch/amd64/linux_syscallargs.h:1.75	Mon Sep 20 02:20:30 2021
+++ src/sys/compat/linux/arch/amd64/linux_syscallargs.h	Thu Dec  2 04:39:44 2021
@@ -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 *, cons
 
 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 *);
Index: src/sys/compat/linux/arch/amd64/linux_syscalls.c
diff -u src/sys/compat/linux/arch/amd64/linux_syscalls.c:1.75 src/sys/compat/linux/arch/amd64/linux_syscalls.c:1.76
--- src/sys/compat/linux/arch/amd64/linux_syscalls.c:1.75	Mon Sep 20 02:20:30 2021
+++ src/sys/compat/linux/arch/amd64/linux_syscalls.c	Thu Dec  2 04:39:44 2021
@@ -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 */
Index: src/sys/compat/linux/arch/amd64/linux_sysent.c
diff -u src/sys/compat/linux/arch/amd64/linux_sysent.c:1.75 src/sys/compat/linux/arch/amd64/linux_sysent.c:1.76
--- src/sys/compat/linux/arch/amd64/linux_sysent.c:1.75	Mon Sep 20 02:20:30 2021
+++ src/sys/compat/linux/arch/amd64/linux_sysent.c	Thu Dec  2 04:39:44 2021
@@ -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 */

Index: src/sys/compat/linux/arch/amd64/linux_systrace_args.c
diff -u src/sys/compat/linux/arch/amd64/linux_systrace_args.c:1.19 src/sys/compat/linux/arch/amd64/linux_systrace_args.c:1.20
--- src/sys/compat/linux/arch/amd64/linux_systrace_args.c:1.19	Mon Sep 20 02:20:30 2021
+++ src/sys/compat/linux/arch/amd64/linux_systrace_args.c	Thu Dec  2 04:39:44 2021
@@ -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 v
 		*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, in
 			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, i
 		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)

Index: src/sys/compat/linux/arch/arm/linux_syscall.h
diff -u src/sys/compat/linux/arch/arm/linux_syscall.h:1.87 src/sys/compat/linux/arch/arm/linux_syscall.h:1.88
--- src/sys/compat/linux/arch/arm/linux_syscall.h:1.87	Wed Nov 24 18:57:24 2021
+++ src/sys/compat/linux/arch/arm/linux_syscall.h	Thu Dec  2 04:39:45 2021
@@ -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
 
Index: src/sys/compat/linux/arch/arm/linux_syscallargs.h
diff -u src/sys/compat/linux/arch/arm/linux_syscallargs.h:1.87 src/sys/compat/linux/arch/arm/linux_syscallargs.h:1.88
--- src/sys/compat/linux/arch/arm/linux_syscallargs.h:1.87	Wed Nov 24 18:57:24 2021
+++ src/sys/compat/linux/arch/arm/linux_syscallargs.h	Thu Dec  2 04:39:45 2021
@@ -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 *, con
 
 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 *);
Index: src/sys/compat/linux/arch/arm/linux_syscalls.c
diff -u src/sys/compat/linux/arch/arm/linux_syscalls.c:1.87 src/sys/compat/linux/arch/arm/linux_syscalls.c:1.88
--- src/sys/compat/linux/arch/arm/linux_syscalls.c:1.87	Wed Nov 24 18:57:24 2021
+++ src/sys/compat/linux/arch/arm/linux_syscalls.c	Thu Dec  2 04:39:45 2021
@@ -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 */
Index: src/sys/compat/linux/arch/arm/linux_sysent.c
diff -u src/sys/compat/linux/arch/arm/linux_sysent.c:1.87 src/sys/compat/linux/arch/arm/linux_sysent.c:1.88
--- src/sys/compat/linux/arch/arm/linux_sysent.c:1.87	Wed Nov 24 18:57:24 2021
+++ src/sys/compat/linux/arch/arm/linux_sysent.c	Thu Dec  2 04:39:45 2021
@@ -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 */

Index: src/sys/compat/linux/arch/arm/linux_systrace_args.c
diff -u src/sys/compat/linux/arch/arm/linux_systrace_args.c:1.20 src/sys/compat/linux/arch/arm/linux_systrace_args.c:1.21
--- src/sys/compat/linux/arch/arm/linux_systrace_args.c:1.20	Wed Nov 24 18:57:24 2021
+++ src/sys/compat/linux/arch/arm/linux_systrace_args.c	Thu Dec  2 04:39:45 2021
@@ -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 v
 		*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, in
 			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, i
 		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)

Index: src/sys/compat/linux/arch/i386/linux_syscall.h
diff -u src/sys/compat/linux/arch/i386/linux_syscall.h:1.120 src/sys/compat/linux/arch/i386/linux_syscall.h:1.121
--- src/sys/compat/linux/arch/i386/linux_syscall.h:1.120	Mon Sep 20 02:20:30 2021
+++ src/sys/compat/linux/arch/i386/linux_syscall.h	Thu Dec  2 04:39:45 2021
@@ -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_ */
Index: src/sys/compat/linux/arch/i386/linux_syscallargs.h
diff -u src/sys/compat/linux/arch/i386/linux_syscallargs.h:1.120 src/sys/compat/linux/arch/i386/linux_syscallargs.h:1.121
--- src/sys/compat/linux/arch/i386/linux_syscallargs.h:1.120	Mon Sep 20 02:20:30 2021
+++ src/sys/compat/linux/arch/i386/linux_syscallargs.h	Thu Dec  2 04:39:45 2021
@@ -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
 
 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_ */
Index: src/sys/compat/linux/arch/i386/linux_sysent.c
diff -u src/sys/compat/linux/arch/i386/linux_sysent.c:1.120 src/sys/compat/linux/arch/i386/linux_sysent.c:1.121
--- src/sys/compat/linux/arch/i386/linux_sysent.c:1.120	Mon Sep 20 02:20:31 2021
+++ src/sys/compat/linux/arch/i386/linux_sysent.c	Thu Dec  2 04:39:45 2021
@@ -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 */

Index: src/sys/compat/linux/arch/i386/linux_syscalls.c
diff -u src/sys/compat/linux/arch/i386/linux_syscalls.c:1.121 src/sys/compat/linux/arch/i386/linux_syscalls.c:1.122
--- src/sys/compat/linux/arch/i386/linux_syscalls.c:1.121	Mon Sep 20 02:20:31 2021
+++ src/sys/compat/linux/arch/i386/linux_syscalls.c	Thu Dec  2 04:39:45 2021
@@ -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 */

Index: src/sys/compat/linux/arch/i386/linux_systrace_args.c
diff -u src/sys/compat/linux/arch/i386/linux_systrace_args.c:1.15 src/sys/compat/linux/arch/i386/linux_systrace_args.c:1.16
--- src/sys/compat/linux/arch/i386/linux_systrace_args.c:1.15	Mon Sep 20 02:20:31 2021
+++ src/sys/compat/linux/arch/i386/linux_systrace_args.c	Thu Dec  2 04:39:45 2021
@@ -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 v
 		*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, in
 			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, i
 		if (ndx == 0 || ndx == 1)
 			p = "int";
 		break;
+	/* linux_sys_prlimit64 */
+	case 340:
+		if (ndx == 0 || ndx == 1)
+			p = "int";
+		break;
 	default:
 		break;
 	};

Index: src/sys/compat/linux/arch/m68k/linux_syscall.h
diff -u src/sys/compat/linux/arch/m68k/linux_syscall.h:1.113 src/sys/compat/linux/arch/m68k/linux_syscall.h:1.114
--- src/sys/compat/linux/arch/m68k/linux_syscall.h:1.113	Wed Nov 24 18:57:25 2021
+++ src/sys/compat/linux/arch/m68k/linux_syscall.h	Thu Dec  2 04:39:45 2021
@@ -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
 
Index: src/sys/compat/linux/arch/m68k/linux_syscalls.c
diff -u src/sys/compat/linux/arch/m68k/linux_syscalls.c:1.113 src/sys/compat/linux/arch/m68k/linux_syscalls.c:1.114
--- src/sys/compat/linux/arch/m68k/linux_syscalls.c:1.113	Wed Nov 24 18:57:25 2021
+++ src/sys/compat/linux/arch/m68k/linux_syscalls.c	Thu Dec  2 04:39:45 2021
@@ -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 */
Index: src/sys/compat/linux/arch/m68k/linux_sysent.c
diff -u src/sys/compat/linux/arch/m68k/linux_sysent.c:1.113 src/sys/compat/linux/arch/m68k/linux_sysent.c:1.114
--- src/sys/compat/linux/arch/m68k/linux_sysent.c:1.113	Wed Nov 24 18:57:25 2021
+++ src/sys/compat/linux/arch/m68k/linux_sysent.c	Thu Dec  2 04:39:45 2021
@@ -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 */

Index: src/sys/compat/linux/arch/m68k/linux_syscallargs.h
diff -u src/sys/compat/linux/arch/m68k/linux_syscallargs.h:1.112 src/sys/compat/linux/arch/m68k/linux_syscallargs.h:1.113
--- src/sys/compat/linux/arch/m68k/linux_syscallargs.h:1.112	Wed Nov 24 18:57:25 2021
+++ src/sys/compat/linux/arch/m68k/linux_syscallargs.h	Thu Dec  2 04:39:45 2021
@@ -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
 
 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 *);

Index: src/sys/compat/linux/arch/mips/linux_syscall.h
diff -u src/sys/compat/linux/arch/mips/linux_syscall.h:1.85 src/sys/compat/linux/arch/mips/linux_syscall.h:1.86
--- src/sys/compat/linux/arch/mips/linux_syscall.h:1.85	Wed Nov 24 18:57:25 2021
+++ src/sys/compat/linux/arch/mips/linux_syscall.h	Thu Dec  2 04:39:45 2021
@@ -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
 

Index: src/sys/compat/linux/arch/mips/linux_syscallargs.h
diff -u src/sys/compat/linux/arch/mips/linux_syscallargs.h:1.84 src/sys/compat/linux/arch/mips/linux_syscallargs.h:1.85
--- src/sys/compat/linux/arch/mips/linux_syscallargs.h:1.84	Wed Nov 24 18:57:25 2021
+++ src/sys/compat/linux/arch/mips/linux_syscallargs.h	Thu Dec  2 04:39:45 2021
@@ -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 *, cons
 
 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 *);
Index: src/sys/compat/linux/arch/mips/linux_syscalls.c
diff -u src/sys/compat/linux/arch/mips/linux_syscalls.c:1.84 src/sys/compat/linux/arch/mips/linux_syscalls.c:1.85
--- src/sys/compat/linux/arch/mips/linux_syscalls.c:1.84	Wed Nov 24 18:57:25 2021
+++ src/sys/compat/linux/arch/mips/linux_syscalls.c	Thu Dec  2 04:39:45 2021
@@ -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 */
Index: src/sys/compat/linux/arch/mips/linux_sysent.c
diff -u src/sys/compat/linux/arch/mips/linux_sysent.c:1.84 src/sys/compat/linux/arch/mips/linux_sysent.c:1.85
--- src/sys/compat/linux/arch/mips/linux_sysent.c:1.84	Wed Nov 24 18:57:25 2021
+++ src/sys/compat/linux/arch/mips/linux_sysent.c	Thu Dec  2 04:39:45 2021
@@ -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 */

Index: src/sys/compat/linux/arch/powerpc/linux_syscall.h
diff -u src/sys/compat/linux/arch/powerpc/linux_syscall.h:1.91 src/sys/compat/linux/arch/powerpc/linux_syscall.h:1.92
--- src/sys/compat/linux/arch/powerpc/linux_syscall.h:1.91	Wed Nov 24 18:57:25 2021
+++ src/sys/compat/linux/arch/powerpc/linux_syscall.h	Thu Dec  2 04:39:45 2021
@@ -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
 
Index: src/sys/compat/linux/arch/powerpc/linux_sysent.c
diff -u src/sys/compat/linux/arch/powerpc/linux_sysent.c:1.91 src/sys/compat/linux/arch/powerpc/linux_sysent.c:1.92
--- src/sys/compat/linux/arch/powerpc/linux_sysent.c:1.91	Wed Nov 24 18:57:25 2021
+++ src/sys/compat/linux/arch/powerpc/linux_sysent.c	Thu Dec  2 04:39:45 2021
@@ -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 */

Index: src/sys/compat/linux/arch/powerpc/linux_syscallargs.h
diff -u src/sys/compat/linux/arch/powerpc/linux_syscallargs.h:1.90 src/sys/compat/linux/arch/powerpc/linux_syscallargs.h:1.91
--- src/sys/compat/linux/arch/powerpc/linux_syscallargs.h:1.90	Wed Nov 24 18:57:25 2021
+++ src/sys/compat/linux/arch/powerpc/linux_syscallargs.h	Thu Dec  2 04:39:45 2021
@@ -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
 
 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 *);
Index: src/sys/compat/linux/arch/powerpc/linux_syscalls.c
diff -u src/sys/compat/linux/arch/powerpc/linux_syscalls.c:1.90 src/sys/compat/linux/arch/powerpc/linux_syscalls.c:1.91
--- src/sys/compat/linux/arch/powerpc/linux_syscalls.c:1.90	Wed Nov 24 18:57:25 2021
+++ src/sys/compat/linux/arch/powerpc/linux_syscalls.c	Thu Dec  2 04:39:45 2021
@@ -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 */

Index: src/sys/compat/linux32/arch/aarch64/linux32_syscall.h
diff -u src/sys/compat/linux32/arch/aarch64/linux32_syscall.h:1.2 src/sys/compat/linux32/arch/aarch64/linux32_syscall.h:1.3
--- src/sys/compat/linux32/arch/aarch64/linux32_syscall.h:1.2	Sat Nov 27 21:15:53 2021
+++ src/sys/compat/linux32/arch/aarch64/linux32_syscall.h	Thu Dec  2 04:39:45 2021
@@ -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
 
Index: src/sys/compat/linux32/arch/aarch64/linux32_syscallargs.h
diff -u src/sys/compat/linux32/arch/aarch64/linux32_syscallargs.h:1.2 src/sys/compat/linux32/arch/aarch64/linux32_syscallargs.h:1.3
--- src/sys/compat/linux32/arch/aarch64/linux32_syscallargs.h:1.2	Sat Nov 27 21:15:53 2021
+++ src/sys/compat/linux32/arch/aarch64/linux32_syscallargs.h	Thu Dec  2 04:39:45 2021
@@ -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 *, con
 
 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 *);
Index: src/sys/compat/linux32/arch/aarch64/linux32_syscalls.c
diff -u src/sys/compat/linux32/arch/aarch64/linux32_syscalls.c:1.2 src/sys/compat/linux32/arch/aarch64/linux32_syscalls.c:1.3
--- src/sys/compat/linux32/arch/aarch64/linux32_syscalls.c:1.2	Sat Nov 27 21:15:53 2021
+++ src/sys/compat/linux32/arch/aarch64/linux32_syscalls.c	Thu Dec  2 04:39:45 2021
@@ -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_syscallname
 	/* 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 */
Index: src/sys/compat/linux32/arch/aarch64/linux32_sysent.c
diff -u src/sys/compat/linux32/arch/aarch64/linux32_sysent.c:1.2 src/sys/compat/linux32/arch/aarch64/linux32_sysent.c:1.3
--- src/sys/compat/linux32/arch/aarch64/linux32_sysent.c:1.2	Sat Nov 27 21:15:53 2021
+++ src/sys/compat/linux32/arch/aarch64/linux32_sysent.c	Thu Dec  2 04:39:45 2021
@@ -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 */
Index: src/sys/compat/linux32/arch/aarch64/linux32_systrace_args.c
diff -u src/sys/compat/linux32/arch/aarch64/linux32_systrace_args.c:1.2 src/sys/compat/linux32/arch/aarch64/linux32_systrace_args.c:1.3
--- src/sys/compat/linux32/arch/aarch64/linux32_systrace_args.c:1.2	Sat Nov 27 21:15:53 2021
+++ src/sys/compat/linux32/arch/aarch64/linux32_systrace_args.c	Thu Dec  2 04:39:45 2021
@@ -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 v
 		*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, in
 			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, i
 		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)

Index: src/sys/compat/linux32/arch/amd64/linux32_syscall.h
diff -u src/sys/compat/linux32/arch/amd64/linux32_syscall.h:1.86 src/sys/compat/linux32/arch/amd64/linux32_syscall.h:1.87
--- src/sys/compat/linux32/arch/amd64/linux32_syscall.h:1.86	Sat Nov 27 21:15:53 2021
+++ src/sys/compat/linux32/arch/amd64/linux32_syscall.h	Thu Dec  2 04:39:45 2021
@@ -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_ */
Index: src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h
diff -u src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h:1.86 src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h:1.87
--- src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h:1.86	Sat Nov 27 21:15:53 2021
+++ src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h	Thu Dec  2 04:39:45 2021
@@ -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 *, con
 
 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_ */
Index: src/sys/compat/linux32/arch/amd64/linux32_syscalls.c
diff -u src/sys/compat/linux32/arch/amd64/linux32_syscalls.c:1.86 src/sys/compat/linux32/arch/amd64/linux32_syscalls.c:1.87
--- src/sys/compat/linux32/arch/amd64/linux32_syscalls.c:1.86	Sat Nov 27 21:15:53 2021
+++ src/sys/compat/linux32/arch/amd64/linux32_syscalls.c	Thu Dec  2 04:39:45 2021
@@ -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_syscallname
 	/* 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 */
Index: src/sys/compat/linux32/arch/amd64/linux32_sysent.c
diff -u src/sys/compat/linux32/arch/amd64/linux32_sysent.c:1.86 src/sys/compat/linux32/arch/amd64/linux32_sysent.c:1.87
--- src/sys/compat/linux32/arch/amd64/linux32_sysent.c:1.86	Sat Nov 27 21:15:53 2021
+++ src/sys/compat/linux32/arch/amd64/linux32_sysent.c	Thu Dec  2 04:39:45 2021
@@ -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 */

Index: src/sys/compat/linux32/arch/amd64/linux32_systrace_args.c
diff -u src/sys/compat/linux32/arch/amd64/linux32_systrace_args.c:1.13 src/sys/compat/linux32/arch/amd64/linux32_systrace_args.c:1.14
--- src/sys/compat/linux32/arch/amd64/linux32_systrace_args.c:1.13	Sat Nov 27 21:15:53 2021
+++ src/sys/compat/linux32/arch/amd64/linux32_systrace_args.c	Thu Dec  2 04:39:45 2021
@@ -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 v
 		*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, in
 			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, i
 		if (ndx == 0 || ndx == 1)
 			p = "int";
 		break;
+	/* linux32_sys_prlimit64 */
+	case 340:
+		if (ndx == 0 || ndx == 1)
+			p = "int";
+		break;
 	default:
 		break;
 	};

Reply via email to