From nobody Fri Sep 27 15:03:29 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XFYcx70V3z5Y60q; Fri, 27 Sep 2024 15:03:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XFYcx3qPxz58bs; Fri, 27 Sep 2024 15:03:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727449409; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B4V/l2B0uWaryGF1h/xL3rx7IFExZcIMDCToPjqu2Zo=; b=yPTIRDRaJ5stRLMwrSFNhaBZb6s8j4bo9j4Hv1e+98Oya26K/FztS1F3auESx39vBr+/sC klUfZ3Z0zHJE/BQHckTxwxh9c5I5Q2ElHXB+a7GjmgdakGUUYNipFqU/3lNQlLhnfuYlt6 PjPL1SzaggFkQKKA80FcLdgLb5yS8PH6uD0ga5Z789q96lmRaowqzcpsNxWJRHy6CRB0Md UA/xZXVCkt9xYuDRVwEhXMSQcSKbR15zalOg2PVA5VcDiVqf0AT8hvcosRAlwZgE00Tslm xo9jrqB2BBYW3tjdAyFErKTkvIbBvtP1zWsR+GsXZzQuem4U8PCuObWez8ApSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727449409; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B4V/l2B0uWaryGF1h/xL3rx7IFExZcIMDCToPjqu2Zo=; b=jfacjcS2I42ozPatQJbwLM4RcWZuaXxmuFLQt/3XUl+x58/il8pPXkja32Ekg0G+TgKFbO 7mVZLqQsS8cle+2VNj2SJTeX8wkz3plXsJDianJpXOif4nE99PSshVNElLOsZ3//u/rrnS YRJs6VMW9bs5qsB7vc0Ym2AEvk0l58wNyAAoqwoG3JNVhDDOLAwmW3YwkMqNUiqp85Eje6 PXscr+H2sU/7ud/8A8s9+aUflZEOO0SsiCu5JqvVuAH2oXQ6dlrfX7dmun8TgPo02hW0ts 0efxSM2c+8D7n4UKUh9z9Fe5yf/NGHUv5S/h1L4DP7vFjpfnPSg2CPVbXdnIRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727449409; a=rsa-sha256; cv=none; b=ly8sJ7YYpRRjIA/5I+0en2JvAQwLm+jApL9kDqG/C47hRlHlS0F8mNGrxGyblfaODExZ1Z jYknzn+afKklZ9e+U41hXNZuOvx8JxlLwoDb4vdfkelYARRALz83dVS+YtFPiJEiD4yDYH PDZEiPTbVCses2L1MuVKBQ9Dk4zvHjhs6y3E6Syv2TOnIEDQnNdsgFt1fJEbkjWk7TXZbi aVAB6o3gk3vjYk7Al09meoj80D1KOlk74CEUKbxkSOXnQ9L81YkWr2gwFZ0a36W+Sa6iLp WIV4LUjv4Ouq50NLhz5sl2eVKDtSBDRSUmOVypinh3LQMwQoUItYi2n4X2GhUA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XFYcx3RZwzlWx; Fri, 27 Sep 2024 15:03:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 48RF3T8I009206; Fri, 27 Sep 2024 15:03:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48RF3T45009203; Fri, 27 Sep 2024 15:03:29 GMT (envelope-from git) Date: Fri, 27 Sep 2024 15:03:29 GMT Message-Id: <202409271503.48RF3T45009203@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 927f379180cd - main - Regen List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 927f379180cd2f3d3460d2f3506d0059ea1c6cf8 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=927f379180cd2f3d3460d2f3506d0059ea1c6cf8 commit 927f379180cd2f3d3460d2f3506d0059ea1c6cf8 Author: Konstantin Belousov AuthorDate: 2024-09-20 15:21:06 +0000 Commit: Konstantin Belousov 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_