git: 99e5a70046da - main - sysent: regen for deletion of gssd_syscall and new ABI for rpctls_syscall

From: Gleb Smirnoff <glebius_at_FreeBSD.org>
Date: Sat, 01 Feb 2025 09:02:31 UTC
The branch main has been updated by glebius:

URL: https://cgit.FreeBSD.org/src/commit/?id=99e5a70046daada7057b14bf106c7f4135c5fac6

commit 99e5a70046daada7057b14bf106c7f4135c5fac6
Author:     Gleb Smirnoff <glebius@FreeBSD.org>
AuthorDate: 2025-02-01 01:04:35 +0000
Commit:     Gleb Smirnoff <glebius@FreeBSD.org>
CommitDate: 2025-02-01 09:00:28 +0000

    sysent: regen for deletion of gssd_syscall and new ABI for rpctls_syscall
---
 lib/libsys/_libsys.h                           |  4 ++--
 sys/compat/freebsd32/freebsd32_syscall.h       |  2 +-
 sys/compat/freebsd32/freebsd32_syscalls.c      |  2 +-
 sys/compat/freebsd32/freebsd32_sysent.c        |  2 +-
 sys/compat/freebsd32/freebsd32_systrace_args.c | 32 +++-----------------------
 sys/kern/init_sysent.c                         |  2 +-
 sys/kern/syscalls.c                            |  2 +-
 sys/kern/systrace_args.c                       | 32 +++-----------------------
 sys/sys/syscall.h                              |  2 +-
 sys/sys/syscall.mk                             |  1 -
 sys/sys/sysproto.h                             |  8 +------
 11 files changed, 15 insertions(+), 74 deletions(-)

diff --git a/lib/libsys/_libsys.h b/lib/libsys/_libsys.h
index 15a2334f284c..d06017edf6d9 100644
--- a/lib/libsys/_libsys.h
+++ b/lib/libsys/_libsys.h
@@ -449,7 +449,7 @@ typedef int (__sys_shm_rename_t)(const char *, const char *, int);
 typedef int (__sys_sigfastblock_t)(int, void *);
 typedef int (__sys___realpathat_t)(int, const char *, char *, size_t, int);
 typedef int (__sys_close_range_t)(u_int, u_int, int);
-typedef int (__sys_rpctls_syscall_t)(int, const char *);
+typedef int (__sys_rpctls_syscall_t)(uint64_t);
 typedef int (__sys___specialfd_t)(int, const void *, size_t);
 typedef int (__sys_aio_writev_t)(struct aiocb *);
 typedef int (__sys_aio_readv_t)(struct aiocb *);
@@ -850,7 +850,7 @@ int __sys_shm_rename(const char * path_from, const char * path_to, int flags);
 int __sys_sigfastblock(int cmd, void * ptr);
 int __sys___realpathat(int fd, const char * path, char * buf, size_t size, int flags);
 int __sys_close_range(u_int lowfd, u_int highfd, int flags);
-int __sys_rpctls_syscall(int op, const char * path);
+int __sys_rpctls_syscall(uint64_t socookie);
 int __sys___specialfd(int type, const void * req, size_t len);
 int __sys_aio_writev(struct aiocb * aiocbp);
 int __sys_aio_readv(struct aiocb * aiocbp);
diff --git a/sys/compat/freebsd32/freebsd32_syscall.h b/sys/compat/freebsd32/freebsd32_syscall.h
index b01ea86551d9..37be6137289e 100644
--- a/sys/compat/freebsd32/freebsd32_syscall.h
+++ b/sys/compat/freebsd32/freebsd32_syscall.h
@@ -424,7 +424,7 @@
 #define	FREEBSD32_SYS_symlinkat	502
 #define	FREEBSD32_SYS_unlinkat	503
 #define	FREEBSD32_SYS_posix_openpt	504
-#define	FREEBSD32_SYS_gssd_syscall	505
+				/* 505 is obsolete kgssapi */
 #define	FREEBSD32_SYS_freebsd32_jail_get	506
 #define	FREEBSD32_SYS_freebsd32_jail_set	507
 #define	FREEBSD32_SYS_jail_remove	508
diff --git a/sys/compat/freebsd32/freebsd32_syscalls.c b/sys/compat/freebsd32/freebsd32_syscalls.c
index cf5d42eefb10..45d5563d6660 100644
--- a/sys/compat/freebsd32/freebsd32_syscalls.c
+++ b/sys/compat/freebsd32/freebsd32_syscalls.c
@@ -510,7 +510,7 @@ const char *freebsd32_syscallnames[] = {
 	"symlinkat",			/* 502 = symlinkat */
 	"unlinkat",			/* 503 = unlinkat */
 	"posix_openpt",			/* 504 = posix_openpt */
-	"gssd_syscall",			/* 505 = gssd_syscall */
+	"obs_kgssapi",			/* 505 = obsolete kgssapi */
 	"freebsd32_jail_get",			/* 506 = freebsd32_jail_get */
 	"freebsd32_jail_set",			/* 507 = freebsd32_jail_set */
 	"jail_remove",			/* 508 = jail_remove */
diff --git a/sys/compat/freebsd32/freebsd32_sysent.c b/sys/compat/freebsd32/freebsd32_sysent.c
index a54744d3b260..321d2264b65e 100644
--- a/sys/compat/freebsd32/freebsd32_sysent.c
+++ b/sys/compat/freebsd32/freebsd32_sysent.c
@@ -572,7 +572,7 @@ struct sysent freebsd32_sysent[] = {
 	{ .sy_narg = AS(symlinkat_args), .sy_call = (sy_call_t *)sys_symlinkat, .sy_auevent = AUE_SYMLINKAT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC },	/* 502 = symlinkat */
 	{ .sy_narg = AS(unlinkat_args), .sy_call = (sy_call_t *)sys_unlinkat, .sy_auevent = AUE_UNLINKAT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC },	/* 503 = unlinkat */
 	{ .sy_narg = AS(posix_openpt_args), .sy_call = (sy_call_t *)sys_posix_openpt, .sy_auevent = AUE_POSIX_OPENPT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 504 = posix_openpt */
-	{ .sy_narg = AS(gssd_syscall_args), .sy_call = (sy_call_t *)lkmressys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT },	/* 505 = gssd_syscall */
+	{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT },	/* 505 = obsolete kgssapi */
 	{ .sy_narg = AS(freebsd32_jail_get_args), .sy_call = (sy_call_t *)freebsd32_jail_get, .sy_auevent = AUE_JAIL_GET, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 506 = freebsd32_jail_get */
 	{ .sy_narg = AS(freebsd32_jail_set_args), .sy_call = (sy_call_t *)freebsd32_jail_set, .sy_auevent = AUE_JAIL_SET, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 507 = freebsd32_jail_set */
 	{ .sy_narg = AS(jail_remove_args), .sy_call = (sy_call_t *)sys_jail_remove, .sy_auevent = AUE_JAIL_REMOVE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 508 = jail_remove */
diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c
index 39b93074e5be..6ffb00784d10 100644
--- a/sys/compat/freebsd32/freebsd32_systrace_args.c
+++ b/sys/compat/freebsd32/freebsd32_systrace_args.c
@@ -2632,13 +2632,6 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
 		*n_args = 1;
 		break;
 	}
-	/* gssd_syscall */
-	case 505: {
-		struct gssd_syscall_args *p = params;
-		uarg[a++] = (intptr_t)p->path; /* const char * */
-		*n_args = 1;
-		break;
-	}
 	/* freebsd32_jail_get */
 	case 506: {
 		struct freebsd32_jail_get_args *p = params;
@@ -3264,9 +3257,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
 	/* rpctls_syscall */
 	case 576: {
 		struct rpctls_syscall_args *p = params;
-		iarg[a++] = p->op; /* int */
-		uarg[a++] = (intptr_t)p->path; /* const char * */
-		*n_args = 2;
+		uarg[a++] = p->socookie; /* uint64_t */
+		*n_args = 1;
 		break;
 	}
 	/* __specialfd */
@@ -7781,16 +7773,6 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
 			break;
 		};
 		break;
-	/* gssd_syscall */
-	case 505:
-		switch (ndx) {
-		case 0:
-			p = "userland const char *";
-			break;
-		default:
-			break;
-		};
-		break;
 	/* freebsd32_jail_get */
 	case 506:
 		switch (ndx) {
@@ -8950,10 +8932,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
 	case 576:
 		switch (ndx) {
 		case 0:
-			p = "int";
-			break;
-		case 1:
-			p = "userland const char *";
+			p = "uint64_t";
 			break;
 		default:
 			break;
@@ -10662,11 +10641,6 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
 		if (ndx == 0 || ndx == 1)
 			p = "int";
 		break;
-	/* gssd_syscall */
-	case 505:
-		if (ndx == 0 || ndx == 1)
-			p = "int";
-		break;
 	/* freebsd32_jail_get */
 	case 506:
 		if (ndx == 0 || ndx == 1)
diff --git a/sys/kern/init_sysent.c b/sys/kern/init_sysent.c
index 30cf30b8ed29..f34fae00f532 100644
--- a/sys/kern/init_sysent.c
+++ b/sys/kern/init_sysent.c
@@ -571,7 +571,7 @@ struct sysent sysent[] = {
 	{ .sy_narg = AS(symlinkat_args), .sy_call = (sy_call_t *)sys_symlinkat, .sy_auevent = AUE_SYMLINKAT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC },	/* 502 = symlinkat */
 	{ .sy_narg = AS(unlinkat_args), .sy_call = (sy_call_t *)sys_unlinkat, .sy_auevent = AUE_UNLINKAT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC },	/* 503 = unlinkat */
 	{ .sy_narg = AS(posix_openpt_args), .sy_call = (sy_call_t *)sys_posix_openpt, .sy_auevent = AUE_POSIX_OPENPT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 504 = posix_openpt */
-	{ .sy_narg = AS(gssd_syscall_args), .sy_call = (sy_call_t *)lkmressys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT },	/* 505 = gssd_syscall */
+	{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT },	/* 505 = obsolete kgssapi */
 	{ .sy_narg = AS(jail_get_args), .sy_call = (sy_call_t *)sys_jail_get, .sy_auevent = AUE_JAIL_GET, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 506 = jail_get */
 	{ .sy_narg = AS(jail_set_args), .sy_call = (sy_call_t *)sys_jail_set, .sy_auevent = AUE_JAIL_SET, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 507 = jail_set */
 	{ .sy_narg = AS(jail_remove_args), .sy_call = (sy_call_t *)sys_jail_remove, .sy_auevent = AUE_JAIL_REMOVE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 508 = jail_remove */
diff --git a/sys/kern/syscalls.c b/sys/kern/syscalls.c
index 142350ade770..f8543cfa611d 100644
--- a/sys/kern/syscalls.c
+++ b/sys/kern/syscalls.c
@@ -510,7 +510,7 @@ const char *syscallnames[] = {
 	"symlinkat",			/* 502 = symlinkat */
 	"unlinkat",			/* 503 = unlinkat */
 	"posix_openpt",			/* 504 = posix_openpt */
-	"gssd_syscall",			/* 505 = gssd_syscall */
+	"obs_kgssapi",			/* 505 = obsolete kgssapi */
 	"jail_get",			/* 506 = jail_get */
 	"jail_set",			/* 507 = jail_set */
 	"jail_remove",			/* 508 = jail_remove */
diff --git a/sys/kern/systrace_args.c b/sys/kern/systrace_args.c
index 2b4be1065425..d1877f3c9333 100644
--- a/sys/kern/systrace_args.c
+++ b/sys/kern/systrace_args.c
@@ -2743,13 +2743,6 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
 		*n_args = 1;
 		break;
 	}
-	/* gssd_syscall */
-	case 505: {
-		struct gssd_syscall_args *p = params;
-		uarg[a++] = (intptr_t)p->path; /* const char * */
-		*n_args = 1;
-		break;
-	}
 	/* jail_get */
 	case 506: {
 		struct jail_get_args *p = params;
@@ -3351,9 +3344,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
 	/* rpctls_syscall */
 	case 576: {
 		struct rpctls_syscall_args *p = params;
-		iarg[a++] = p->op; /* int */
-		uarg[a++] = (intptr_t)p->path; /* const char * */
-		*n_args = 2;
+		uarg[a++] = p->socookie; /* uint64_t */
+		*n_args = 1;
 		break;
 	}
 	/* __specialfd */
@@ -8003,16 +7995,6 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
 			break;
 		};
 		break;
-	/* gssd_syscall */
-	case 505:
-		switch (ndx) {
-		case 0:
-			p = "userland const char *";
-			break;
-		default:
-			break;
-		};
-		break;
 	/* jail_get */
 	case 506:
 		switch (ndx) {
@@ -9095,10 +9077,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
 	case 576:
 		switch (ndx) {
 		case 0:
-			p = "int";
-			break;
-		case 1:
-			p = "userland const char *";
+			p = "uint64_t";
 			break;
 		default:
 			break;
@@ -10897,11 +10876,6 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
 		if (ndx == 0 || ndx == 1)
 			p = "int";
 		break;
-	/* gssd_syscall */
-	case 505:
-		if (ndx == 0 || ndx == 1)
-			p = "int";
-		break;
 	/* jail_get */
 	case 506:
 		if (ndx == 0 || ndx == 1)
diff --git a/sys/sys/syscall.h b/sys/sys/syscall.h
index 5f55fe4577eb..1e1a36c8951b 100644
--- a/sys/sys/syscall.h
+++ b/sys/sys/syscall.h
@@ -442,7 +442,7 @@
 #define	SYS_symlinkat	502
 #define	SYS_unlinkat	503
 #define	SYS_posix_openpt	504
-#define	SYS_gssd_syscall	505
+				/* 505 is obsolete kgssapi */
 #define	SYS_jail_get	506
 #define	SYS_jail_set	507
 #define	SYS_jail_remove	508
diff --git a/sys/sys/syscall.mk b/sys/sys/syscall.mk
index ceccd99aa36c..d1f2b0e2dbb7 100644
--- a/sys/sys/syscall.mk
+++ b/sys/sys/syscall.mk
@@ -352,7 +352,6 @@ MIASM =  \
 	symlinkat.o \
 	unlinkat.o \
 	posix_openpt.o \
-	gssd_syscall.o \
 	jail_get.o \
 	jail_set.o \
 	jail_remove.o \
diff --git a/sys/sys/sysproto.h b/sys/sys/sysproto.h
index 89de469d88d8..55f91424d16f 100644
--- a/sys/sys/sysproto.h
+++ b/sys/sys/sysproto.h
@@ -1476,9 +1476,6 @@ struct unlinkat_args {
 struct posix_openpt_args {
 	char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)];
 };
-struct gssd_syscall_args {
-	char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)];
-};
 struct jail_get_args {
 	char iovp_l_[PADL_(struct iovec *)]; struct iovec * iovp; char iovp_r_[PADR_(struct iovec *)];
 	char iovcnt_l_[PADL_(unsigned int)]; unsigned int iovcnt; char iovcnt_r_[PADR_(unsigned int)];
@@ -1820,8 +1817,7 @@ struct close_range_args {
 	char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)];
 };
 struct rpctls_syscall_args {
-	char op_l_[PADL_(int)]; int op; char op_r_[PADR_(int)];
-	char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)];
+	char socookie_l_[PADL_(uint64_t)]; uint64_t socookie; char socookie_r_[PADR_(uint64_t)];
 };
 struct __specialfd_args {
 	char type_l_[PADL_(int)]; int type; char type_r_[PADR_(int)];
@@ -2210,7 +2206,6 @@ int	sys_renameat(struct thread *, struct renameat_args *);
 int	sys_symlinkat(struct thread *, struct symlinkat_args *);
 int	sys_unlinkat(struct thread *, struct unlinkat_args *);
 int	sys_posix_openpt(struct thread *, struct posix_openpt_args *);
-int	sys_gssd_syscall(struct thread *, struct gssd_syscall_args *);
 int	sys_jail_get(struct thread *, struct jail_get_args *);
 int	sys_jail_set(struct thread *, struct jail_set_args *);
 int	sys_jail_remove(struct thread *, struct jail_remove_args *);
@@ -3191,7 +3186,6 @@ int	freebsd13_swapoff(struct thread *, struct freebsd13_swapoff_args *);
 #define	SYS_AUE_symlinkat	AUE_SYMLINKAT
 #define	SYS_AUE_unlinkat	AUE_UNLINKAT
 #define	SYS_AUE_posix_openpt	AUE_POSIX_OPENPT
-#define	SYS_AUE_gssd_syscall	AUE_NULL
 #define	SYS_AUE_jail_get	AUE_JAIL_GET
 #define	SYS_AUE_jail_set	AUE_JAIL_SET
 #define	SYS_AUE_jail_remove	AUE_JAIL_REMOVE