git: 927f379180cd - main - Regen

From: Konstantin Belousov <kib_at_FreeBSD.org>
Date: Fri, 27 Sep 2024 15:03:29 UTC
The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=927f379180cd2f3d3460d2f3506d0059ea1c6cf8

commit 927f379180cd2f3d3460d2f3506d0059ea1c6cf8
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2024-09-20 15:21:06 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2024-09-27 15:02:23 +0000

    Regen
---
 lib/libsys/_libsys.h                           |  2 ++
 lib/libsys/syscalls.map                        |  2 ++
 sys/compat/freebsd32/freebsd32_syscall.h       |  3 ++-
 sys/compat/freebsd32/freebsd32_syscalls.c      |  1 +
 sys/compat/freebsd32/freebsd32_sysent.c        |  1 +
 sys/compat/freebsd32/freebsd32_systrace_args.c | 30 ++++++++++++++++++++++++++
 sys/kern/init_sysent.c                         |  1 +
 sys/kern/syscalls.c                            |  1 +
 sys/kern/systrace_args.c                       | 30 ++++++++++++++++++++++++++
 sys/sys/syscall.h                              |  3 ++-
 sys/sys/syscall.mk                             |  3 ++-
 sys/sys/sysproto.h                             |  7 ++++++
 12 files changed, 81 insertions(+), 3 deletions(-)

diff --git a/lib/libsys/_libsys.h b/lib/libsys/_libsys.h
index d4cd14ceb75f..4565740a25bc 100644
--- a/lib/libsys/_libsys.h
+++ b/lib/libsys/_libsys.h
@@ -461,6 +461,7 @@ typedef int (__sys_timerfd_create_t)(int, int);
 typedef int (__sys_timerfd_gettime_t)(int, struct itimerspec *);
 typedef int (__sys_timerfd_settime_t)(int, int, const struct itimerspec *, struct itimerspec *);
 typedef int (__sys_kcmp_t)(pid_t, pid_t, int, uintptr_t, uintptr_t);
+typedef int (__sys_getrlimitusage_t)(u_int, int, rlim_t *);
 
 void __sys_exit(int rval);
 int __sys_fork(void);
@@ -860,6 +861,7 @@ int __sys_timerfd_create(int clockid, int flags);
 int __sys_timerfd_gettime(int fd, struct itimerspec * curr_value);
 int __sys_timerfd_settime(int fd, int flags, const struct itimerspec * new_value, struct itimerspec * old_value);
 int __sys_kcmp(pid_t pid1, pid_t pid2, int type, uintptr_t idx1, uintptr_t idx2);
+int __sys_getrlimitusage(u_int which, int flags, rlim_t * res);
 __END_DECLS
 
 #endif /* __LIBSYS_H_ */
diff --git a/lib/libsys/syscalls.map b/lib/libsys/syscalls.map
index eeb75dc28a2c..3d952c691afd 100644
--- a/lib/libsys/syscalls.map
+++ b/lib/libsys/syscalls.map
@@ -801,4 +801,6 @@ FBSDprivate_1.0 {
 	__sys_timerfd_settime;
 	_kcmp;
 	__sys_kcmp;
+	_getrlimitusage;
+	__sys_getrlimitusage;
 };
diff --git a/sys/compat/freebsd32/freebsd32_syscall.h b/sys/compat/freebsd32/freebsd32_syscall.h
index 662947c330d4..b3c5c46bd586 100644
--- a/sys/compat/freebsd32/freebsd32_syscall.h
+++ b/sys/compat/freebsd32/freebsd32_syscall.h
@@ -507,4 +507,5 @@
 #define	FREEBSD32_SYS_freebsd32_timerfd_gettime	586
 #define	FREEBSD32_SYS_freebsd32_timerfd_settime	587
 #define	FREEBSD32_SYS_kcmp	588
-#define	FREEBSD32_SYS_MAXSYSCALL	589
+#define	FREEBSD32_SYS_getrlimitusage	589
+#define	FREEBSD32_SYS_MAXSYSCALL	590
diff --git a/sys/compat/freebsd32/freebsd32_syscalls.c b/sys/compat/freebsd32/freebsd32_syscalls.c
index b4c41fdbbc12..264a1f17db3b 100644
--- a/sys/compat/freebsd32/freebsd32_syscalls.c
+++ b/sys/compat/freebsd32/freebsd32_syscalls.c
@@ -594,4 +594,5 @@ const char *freebsd32_syscallnames[] = {
 	"freebsd32_timerfd_gettime",			/* 586 = freebsd32_timerfd_gettime */
 	"freebsd32_timerfd_settime",			/* 587 = freebsd32_timerfd_settime */
 	"kcmp",			/* 588 = kcmp */
+	"getrlimitusage",			/* 589 = getrlimitusage */
 };
diff --git a/sys/compat/freebsd32/freebsd32_sysent.c b/sys/compat/freebsd32/freebsd32_sysent.c
index b8df64206611..c8ddecc7f131 100644
--- a/sys/compat/freebsd32/freebsd32_sysent.c
+++ b/sys/compat/freebsd32/freebsd32_sysent.c
@@ -650,4 +650,5 @@ struct sysent freebsd32_sysent[] = {
 	{ .sy_narg = AS(freebsd32_timerfd_gettime_args), .sy_call = (sy_call_t *)freebsd32_timerfd_gettime, .sy_auevent = AUE_TIMERFD, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC },	/* 586 = freebsd32_timerfd_gettime */
 	{ .sy_narg = AS(freebsd32_timerfd_settime_args), .sy_call = (sy_call_t *)freebsd32_timerfd_settime, .sy_auevent = AUE_TIMERFD, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC },	/* 587 = freebsd32_timerfd_settime */
 	{ .sy_narg = AS(kcmp_args), .sy_call = (sy_call_t *)sys_kcmp, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 588 = kcmp */
+	{ .sy_narg = AS(getrlimitusage_args), .sy_call = (sy_call_t *)sys_getrlimitusage, .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC },	/* 589 = getrlimitusage */
 };
diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c
index ff62adce85b9..9992242dba25 100644
--- a/sys/compat/freebsd32/freebsd32_systrace_args.c
+++ b/sys/compat/freebsd32/freebsd32_systrace_args.c
@@ -3368,6 +3368,15 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
 		*n_args = 5;
 		break;
 	}
+	/* getrlimitusage */
+	case 589: {
+		struct getrlimitusage_args *p = params;
+		uarg[a++] = p->which; /* u_int */
+		iarg[a++] = p->flags; /* int */
+		uarg[a++] = (intptr_t)p->res; /* rlim_t * */
+		*n_args = 3;
+		break;
+	}
 	default:
 		*n_args = 0;
 		break;
@@ -9100,6 +9109,22 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
 			break;
 		};
 		break;
+	/* getrlimitusage */
+	case 589:
+		switch (ndx) {
+		case 0:
+			p = "u_int";
+			break;
+		case 1:
+			p = "int";
+			break;
+		case 2:
+			p = "userland rlim_t *";
+			break;
+		default:
+			break;
+		};
+		break;
 	default:
 		break;
 	};
@@ -10983,6 +11008,11 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
 		if (ndx == 0 || ndx == 1)
 			p = "int";
 		break;
+	/* getrlimitusage */
+	case 589:
+		if (ndx == 0 || ndx == 1)
+			p = "int";
+		break;
 	default:
 		break;
 	};
diff --git a/sys/kern/init_sysent.c b/sys/kern/init_sysent.c
index e066b04b4f6e..147b26daa4e6 100644
--- a/sys/kern/init_sysent.c
+++ b/sys/kern/init_sysent.c
@@ -649,4 +649,5 @@ struct sysent sysent[] = {
 	{ .sy_narg = AS(timerfd_gettime_args), .sy_call = (sy_call_t *)sys_timerfd_gettime, .sy_auevent = AUE_TIMERFD, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC },	/* 586 = timerfd_gettime */
 	{ .sy_narg = AS(timerfd_settime_args), .sy_call = (sy_call_t *)sys_timerfd_settime, .sy_auevent = AUE_TIMERFD, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC },	/* 587 = timerfd_settime */
 	{ .sy_narg = AS(kcmp_args), .sy_call = (sy_call_t *)sys_kcmp, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 588 = kcmp */
+	{ .sy_narg = AS(getrlimitusage_args), .sy_call = (sy_call_t *)sys_getrlimitusage, .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC },	/* 589 = getrlimitusage */
 };
diff --git a/sys/kern/syscalls.c b/sys/kern/syscalls.c
index 0e6e3a3dd1f1..a2af13617dee 100644
--- a/sys/kern/syscalls.c
+++ b/sys/kern/syscalls.c
@@ -594,4 +594,5 @@ const char *syscallnames[] = {
 	"timerfd_gettime",			/* 586 = timerfd_gettime */
 	"timerfd_settime",			/* 587 = timerfd_settime */
 	"kcmp",			/* 588 = kcmp */
+	"getrlimitusage",			/* 589 = getrlimitusage */
 };
diff --git a/sys/kern/systrace_args.c b/sys/kern/systrace_args.c
index e7231bf8570e..2454a8b5137b 100644
--- a/sys/kern/systrace_args.c
+++ b/sys/kern/systrace_args.c
@@ -3455,6 +3455,15 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
 		*n_args = 5;
 		break;
 	}
+	/* getrlimitusage */
+	case 589: {
+		struct getrlimitusage_args *p = params;
+		uarg[a++] = p->which; /* u_int */
+		iarg[a++] = p->flags; /* int */
+		uarg[a++] = (intptr_t)p->res; /* rlim_t * */
+		*n_args = 3;
+		break;
+	}
 	default:
 		*n_args = 0;
 		break;
@@ -9245,6 +9254,22 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
 			break;
 		};
 		break;
+	/* getrlimitusage */
+	case 589:
+		switch (ndx) {
+		case 0:
+			p = "u_int";
+			break;
+		case 1:
+			p = "int";
+			break;
+		case 2:
+			p = "userland rlim_t *";
+			break;
+		default:
+			break;
+		};
+		break;
 	default:
 		break;
 	};
@@ -11218,6 +11243,11 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
 		if (ndx == 0 || ndx == 1)
 			p = "int";
 		break;
+	/* getrlimitusage */
+	case 589:
+		if (ndx == 0 || ndx == 1)
+			p = "int";
+		break;
 	default:
 		break;
 	};
diff --git a/sys/sys/syscall.h b/sys/sys/syscall.h
index 1fa5878c6ff6..2a200f12f3c1 100644
--- a/sys/sys/syscall.h
+++ b/sys/sys/syscall.h
@@ -525,4 +525,5 @@
 #define	SYS_timerfd_gettime	586
 #define	SYS_timerfd_settime	587
 #define	SYS_kcmp	588
-#define	SYS_MAXSYSCALL	589
+#define	SYS_getrlimitusage	589
+#define	SYS_MAXSYSCALL	590
diff --git a/sys/sys/syscall.mk b/sys/sys/syscall.mk
index 31e698ea2beb..6c8830042045 100644
--- a/sys/sys/syscall.mk
+++ b/sys/sys/syscall.mk
@@ -428,4 +428,5 @@ MIASM =  \
 	timerfd_create.o \
 	timerfd_gettime.o \
 	timerfd_settime.o \
-	kcmp.o
+	kcmp.o \
+	getrlimitusage.o
diff --git a/sys/sys/sysproto.h b/sys/sys/sysproto.h
index c86c5d1eb212..26817db8d755 100644
--- a/sys/sys/sysproto.h
+++ b/sys/sys/sysproto.h
@@ -1877,6 +1877,11 @@ struct kcmp_args {
 	char idx1_l_[PADL_(uintptr_t)]; uintptr_t idx1; char idx1_r_[PADR_(uintptr_t)];
 	char idx2_l_[PADL_(uintptr_t)]; uintptr_t idx2; char idx2_r_[PADR_(uintptr_t)];
 };
+struct getrlimitusage_args {
+	char which_l_[PADL_(u_int)]; u_int which; char which_r_[PADR_(u_int)];
+	char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)];
+	char res_l_[PADL_(rlim_t *)]; rlim_t * res; char res_r_[PADR_(rlim_t *)];
+};
 int	sys_exit(struct thread *, struct exit_args *);
 int	sys_fork(struct thread *, struct fork_args *);
 int	sys_read(struct thread *, struct read_args *);
@@ -2276,6 +2281,7 @@ int	sys_timerfd_create(struct thread *, struct timerfd_create_args *);
 int	sys_timerfd_gettime(struct thread *, struct timerfd_gettime_args *);
 int	sys_timerfd_settime(struct thread *, struct timerfd_settime_args *);
 int	sys_kcmp(struct thread *, struct kcmp_args *);
+int	sys_getrlimitusage(struct thread *, struct getrlimitusage_args *);
 
 #ifdef COMPAT_43
 
@@ -3255,6 +3261,7 @@ int	freebsd13_swapoff(struct thread *, struct freebsd13_swapoff_args *);
 #define	SYS_AUE_timerfd_gettime	AUE_TIMERFD
 #define	SYS_AUE_timerfd_settime	AUE_TIMERFD
 #define	SYS_AUE_kcmp	AUE_NULL
+#define	SYS_AUE_getrlimitusage	AUE_NULL
 
 #undef PAD_
 #undef PADL_