From nobody Fri Nov 29 12:22:17 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 4Y0C3t2kBPz5f5HP; Fri, 29 Nov 2024 12:22:18 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0C3t1V9Kz46vd; Fri, 29 Nov 2024 12:22:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732882938; 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=PycokH3mFwTjOpkdhm42cBfuDC2Ng+sCP+Ow5Fd8puU=; b=etCqZy7LOpYIeWwak8hnYm0wJ8xOmL5sZvHUx8P7kpGgpvohQvfKat66UqC/dPtofAGGMt Ok3a9ptri6YgaH4E6nm3EM3u+sh4kvRCoBiMzHWolh4q+0Ji9B1hs/LWxV++rwCkGQW9l8 fngolwbIBJACMe84ZmsvUmah52CphuSrcGGoOvuyIf6Qmr19TerdtjfJ4nwizefoZNCO6U 8eu8ziU5QjpfNp0ot3RyNP/xGR32HpQ+s7WNE+gSMJwOAYd6PfPRjY9tytPRIqgYnsIwB5 IoFWqxJq4/dc8rj4u+2Zis1FxS7oV2qF/tTK3d4h6s0OlhhcO9d+ywn7k6XTLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732882938; 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=PycokH3mFwTjOpkdhm42cBfuDC2Ng+sCP+Ow5Fd8puU=; b=UA3EE2JB5AMvB3s3WWSZI7CXflHiIn++HozU9R7JWpGHss4B0HHaOrqsw+QX212dtst3b7 /iNckI9oi5FADlXoUVbZGXx0w+7ZmBuauHtJvJNg1lqZqu8Se4MAk3HmMygcaq5S2xtvrW uM9eDYtB+NCA06uekrnZuaEr7hL8DHed7i/VD/wIz4LV4l7EeFnsiFwCFRplfWt6Y+XKVA Rd3DBYODy98D02mlsrC0VlM2YiHVumF8QCoNt3hLbFRRtRs89hsx7IyQrPm/FrD/nbQqDC 7TQMCyKdFqRFj6TtkKsgsrepxdcVdE8hhhsKiqs8aPgWMtV5XEfT2usTFUWSWw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732882938; a=rsa-sha256; cv=none; b=tDpbUueb6kH3olsCPRGapPkwggpiBcc1d9HbPgR8Rxj08Vz41zTfzgSwcr9dJvsalQ8bn0 AJ0/Bi1OYY5T51phZz7oWEyq4GZzjqsjyAaboDqI6UDZ3SSd/hHjYgy1qmjFWDBwsB9grG 3U9rDBp16sTpCqYIabe6wX4h3r9Rujqndtn4Vm6xhbME+h+EjORksxepAXOv8OYGwucz0y l5WNSG+zcdyN9I5RuEout8/Cm4z/6CSTbunFUnFViYQMnK9uy/pNxULsfx3o7ntZbMuRSN nn1VBuH9TdNQ7U+RTJpi016/6+u7DqcHbT2DdtxKOO9a+M+qLs7hZClaDcm3hg== 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 4Y0C3s6zVNzNT0; Fri, 29 Nov 2024 12:22:17 +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 4ATCMH3e068301; Fri, 29 Nov 2024 12:22:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ATCMHP3068298; Fri, 29 Nov 2024 12:22:17 GMT (envelope-from git) Date: Fri, 29 Nov 2024 12:22:17 GMT Message-Id: <202411291222.4ATCMHP3068298@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Edward Tomasz Napierala Subject: git: 60f87c736807 - 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: trasz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 60f87c736807bd2b5a3ebe451add868232facf43 Auto-Submitted: auto-generated The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=60f87c736807bd2b5a3ebe451add868232facf43 commit 60f87c736807bd2b5a3ebe451add868232facf43 Author: Edward Tomasz Napierala AuthorDate: 2024-11-29 12:10:45 +0000 Commit: Edward Tomasz Napierala CommitDate: 2024-11-29 12:10:45 +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 | 22 ++++++++++++++++++++++ sys/kern/init_sysent.c | 1 + sys/kern/syscalls.c | 1 + sys/kern/systrace_args.c | 22 ++++++++++++++++++++++ sys/sys/syscall.h | 3 ++- sys/sys/syscall.mk | 3 ++- sys/sys/sysproto.h | 5 +++++ 12 files changed, 63 insertions(+), 3 deletions(-) diff --git a/lib/libsys/_libsys.h b/lib/libsys/_libsys.h index 00d966661786..894f49185fbc 100644 --- a/lib/libsys/_libsys.h +++ b/lib/libsys/_libsys.h @@ -463,6 +463,7 @@ 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 *); +typedef int (__sys_fchroot_t)(int); void __sys_exit(int rval); int __sys_fork(void); @@ -863,6 +864,7 @@ 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); +int __sys_fchroot(int fd); __END_DECLS #endif /* __LIBSYS_H_ */ diff --git a/lib/libsys/syscalls.map b/lib/libsys/syscalls.map index 62a2a2005262..9e748c659c46 100644 --- a/lib/libsys/syscalls.map +++ b/lib/libsys/syscalls.map @@ -805,4 +805,6 @@ FBSDprivate_1.0 { __sys_kcmp; _getrlimitusage; __sys_getrlimitusage; + _fchroot; + __sys_fchroot; }; diff --git a/sys/compat/freebsd32/freebsd32_syscall.h b/sys/compat/freebsd32/freebsd32_syscall.h index 44f55fb7d13b..a68154ad9c13 100644 --- a/sys/compat/freebsd32/freebsd32_syscall.h +++ b/sys/compat/freebsd32/freebsd32_syscall.h @@ -508,4 +508,5 @@ #define FREEBSD32_SYS_freebsd32_timerfd_settime 587 #define FREEBSD32_SYS_kcmp 588 #define FREEBSD32_SYS_getrlimitusage 589 -#define FREEBSD32_SYS_MAXSYSCALL 590 +#define FREEBSD32_SYS_fchroot 590 +#define FREEBSD32_SYS_MAXSYSCALL 591 diff --git a/sys/compat/freebsd32/freebsd32_syscalls.c b/sys/compat/freebsd32/freebsd32_syscalls.c index 0dee48aa564a..daf2e217cf03 100644 --- a/sys/compat/freebsd32/freebsd32_syscalls.c +++ b/sys/compat/freebsd32/freebsd32_syscalls.c @@ -595,4 +595,5 @@ const char *freebsd32_syscallnames[] = { "freebsd32_timerfd_settime", /* 587 = freebsd32_timerfd_settime */ "kcmp", /* 588 = kcmp */ "getrlimitusage", /* 589 = getrlimitusage */ + "fchroot", /* 590 = fchroot */ }; diff --git a/sys/compat/freebsd32/freebsd32_sysent.c b/sys/compat/freebsd32/freebsd32_sysent.c index 386650e5afea..d7fe60a8c5f4 100644 --- a/sys/compat/freebsd32/freebsd32_sysent.c +++ b/sys/compat/freebsd32/freebsd32_sysent.c @@ -657,4 +657,5 @@ struct sysent freebsd32_sysent[] = { { .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 */ + { .sy_narg = AS(fchroot_args), .sy_call = (sy_call_t *)sys_fchroot, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 590 = fchroot */ }; diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index ce0b37b178f9..dd82d0f44f6a 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -3378,6 +3378,13 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 3; break; } + /* fchroot */ + case 590: { + struct fchroot_args *p = params; + iarg[a++] = p->fd; /* int */ + *n_args = 1; + break; + } default: *n_args = 0; break; @@ -9126,6 +9133,16 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; }; break; + /* fchroot */ + case 590: + switch (ndx) { + case 0: + p = "int"; + break; + default: + break; + }; + break; default: break; }; @@ -11014,6 +11031,11 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) if (ndx == 0 || ndx == 1) p = "int"; break; + /* fchroot */ + case 590: + 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 8b0f50c8d7e1..21860f697940 100644 --- a/sys/kern/init_sysent.c +++ b/sys/kern/init_sysent.c @@ -656,4 +656,5 @@ struct sysent sysent[] = { { .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 */ + { .sy_narg = AS(fchroot_args), .sy_call = (sy_call_t *)sys_fchroot, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 590 = fchroot */ }; diff --git a/sys/kern/syscalls.c b/sys/kern/syscalls.c index a2af13617dee..414edab93e33 100644 --- a/sys/kern/syscalls.c +++ b/sys/kern/syscalls.c @@ -595,4 +595,5 @@ const char *syscallnames[] = { "timerfd_settime", /* 587 = timerfd_settime */ "kcmp", /* 588 = kcmp */ "getrlimitusage", /* 589 = getrlimitusage */ + "fchroot", /* 590 = fchroot */ }; diff --git a/sys/kern/systrace_args.c b/sys/kern/systrace_args.c index d70d7942ff58..63c26f605e88 100644 --- a/sys/kern/systrace_args.c +++ b/sys/kern/systrace_args.c @@ -3465,6 +3465,13 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 3; break; } + /* fchroot */ + case 590: { + struct fchroot_args *p = params; + iarg[a++] = p->fd; /* int */ + *n_args = 1; + break; + } default: *n_args = 0; break; @@ -9271,6 +9278,16 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; }; break; + /* fchroot */ + case 590: + switch (ndx) { + case 0: + p = "int"; + break; + default: + break; + }; + break; default: break; }; @@ -11249,6 +11266,11 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) if (ndx == 0 || ndx == 1) p = "int"; break; + /* fchroot */ + case 590: + if (ndx == 0 || ndx == 1) + p = "int"; + break; default: break; }; diff --git a/sys/sys/syscall.h b/sys/sys/syscall.h index 2a200f12f3c1..f2c1f954d5e5 100644 --- a/sys/sys/syscall.h +++ b/sys/sys/syscall.h @@ -526,4 +526,5 @@ #define SYS_timerfd_settime 587 #define SYS_kcmp 588 #define SYS_getrlimitusage 589 -#define SYS_MAXSYSCALL 590 +#define SYS_fchroot 590 +#define SYS_MAXSYSCALL 591 diff --git a/sys/sys/syscall.mk b/sys/sys/syscall.mk index 692c7d621471..29ad3f1cce51 100644 --- a/sys/sys/syscall.mk +++ b/sys/sys/syscall.mk @@ -432,4 +432,5 @@ MIASM = \ timerfd_gettime.o \ timerfd_settime.o \ kcmp.o \ - getrlimitusage.o + getrlimitusage.o \ + fchroot.o diff --git a/sys/sys/sysproto.h b/sys/sys/sysproto.h index 26817db8d755..5b3de6053a95 100644 --- a/sys/sys/sysproto.h +++ b/sys/sys/sysproto.h @@ -1882,6 +1882,9 @@ struct getrlimitusage_args { 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 *)]; }; +struct fchroot_args { + char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; +}; int sys_exit(struct thread *, struct exit_args *); int sys_fork(struct thread *, struct fork_args *); int sys_read(struct thread *, struct read_args *); @@ -2282,6 +2285,7 @@ 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 *); +int sys_fchroot(struct thread *, struct fchroot_args *); #ifdef COMPAT_43 @@ -3262,6 +3266,7 @@ int freebsd13_swapoff(struct thread *, struct freebsd13_swapoff_args *); #define SYS_AUE_timerfd_settime AUE_TIMERFD #define SYS_AUE_kcmp AUE_NULL #define SYS_AUE_getrlimitusage AUE_NULL +#define SYS_AUE_fchroot AUE_NULL #undef PAD_ #undef PADL_