aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrooks Davis <brooks@FreeBSD.org>2021-11-17 20:12:22 +0000
committerBrooks Davis <brooks@FreeBSD.org>2021-11-17 20:12:22 +0000
commit43227e4c834fc4b4859df49a6f6f7542a2a236e3 (patch)
treef9e924fd5ededca89ae1a27d5b2d1687ae0e21b0
parent6de7c05379b8e89be9dfbff7dc74ceb936ef7960 (diff)
downloadsrc-43227e4c834fc4b4859df49a6f6f7542a2a236e3.tar.gz
src-43227e4c834fc4b4859df49a6f6f7542a2a236e3.zip
freebsd32: prototype gssd_syscall()
Nothing about the interface should prevent this from working so go ahead and prototype it for consistency. Reviewed by: kevans
-rw-r--r--sys/compat/freebsd32/freebsd32_syscall.h1
-rw-r--r--sys/compat/freebsd32/freebsd32_syscalls.c2
-rw-r--r--sys/compat/freebsd32/freebsd32_sysent.c2
-rw-r--r--sys/compat/freebsd32/freebsd32_systrace_args.c22
-rw-r--r--sys/compat/freebsd32/syscalls.master2
5 files changed, 26 insertions, 3 deletions
diff --git a/sys/compat/freebsd32/freebsd32_syscall.h b/sys/compat/freebsd32/freebsd32_syscall.h
index 124e8b0e05e7..321a72fb744a 100644
--- a/sys/compat/freebsd32/freebsd32_syscall.h
+++ b/sys/compat/freebsd32/freebsd32_syscall.h
@@ -430,6 +430,7 @@
#define FREEBSD32_SYS_symlinkat 502
#define FREEBSD32_SYS_unlinkat 503
#define FREEBSD32_SYS_posix_openpt 504
+#define FREEBSD32_SYS_gssd_syscall 505
#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 f0ae365ddf3d..e7da47e3d7fe 100644
--- a/sys/compat/freebsd32/freebsd32_syscalls.c
+++ b/sys/compat/freebsd32/freebsd32_syscalls.c
@@ -527,7 +527,7 @@ const char *freebsd32_syscallnames[] = {
"symlinkat", /* 502 = symlinkat */
"unlinkat", /* 503 = unlinkat */
"posix_openpt", /* 504 = posix_openpt */
- "#505", /* 505 = gssd_syscall */
+ "gssd_syscall", /* 505 = gssd_syscall */
"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 c48e7b1f3c9a..ebf1c02e3a8a 100644
--- a/sys/compat/freebsd32/freebsd32_sysent.c
+++ b/sys/compat/freebsd32/freebsd32_sysent.c
@@ -580,7 +580,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 = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 505 = gssd_syscall */
+ { .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 = 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 8cc005c47ef2..bc4c7ce4f36f 100644
--- a/sys/compat/freebsd32/freebsd32_systrace_args.c
+++ b/sys/compat/freebsd32/freebsd32_systrace_args.c
@@ -2697,6 +2697,13 @@ 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[0] = (intptr_t)p->path; /* char * */
+ *n_args = 1;
+ break;
+ }
/* freebsd32_jail_get */
case 506: {
struct freebsd32_jail_get_args *p = params;
@@ -7902,6 +7909,16 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
break;
};
break;
+ /* gssd_syscall */
+ case 505:
+ switch (ndx) {
+ case 0:
+ p = "userland char *";
+ break;
+ default:
+ break;
+ };
+ break;
/* freebsd32_jail_get */
case 506:
switch (ndx) {
@@ -10767,6 +10784,11 @@ 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/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master
index e8927b05c24f..4a0b6f80125d 100644
--- a/sys/compat/freebsd32/syscalls.master
+++ b/sys/compat/freebsd32/syscalls.master
@@ -977,7 +977,7 @@
int flag); }
504 AUE_POSIX_OPENPT NOPROTO { int posix_openpt(int flags); }
; 505 is initialised by the kgssapi code, if present.
-505 AUE_NULL UNIMPL gssd_syscall
+505 AUE_NULL NOPROTO|NOSTD { int gssd_syscall(char *path); }
506 AUE_JAIL_GET STD { int freebsd32_jail_get(struct iovec32 *iovp, \
unsigned int iovcnt, int flags); }
507 AUE_JAIL_SET STD { int freebsd32_jail_set(struct iovec32 *iovp, \