Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Nov 2021 20:22:38 GMT
From:      Brooks Davis <brooks@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 7bd795650f5c - main - freebsd32: enable trivial syscalls
Message-ID:  <202111172022.1AHKMchM059990@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by brooks:

URL: https://cgit.FreeBSD.org/src/commit/?id=7bd795650f5c5310819755f1f0428bfe693c8515

commit 7bd795650f5c5310819755f1f0428bfe693c8515
Author:     Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2021-11-17 20:12:25 +0000
Commit:     Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2021-11-17 20:12:25 +0000

    freebsd32: enable trivial syscalls
    
    These syscalls require no translation.  They were simply missing
    from compat/freebsd32/syscalls.master.
    
    Reviewed by:    kevans
---
 sys/compat/freebsd32/freebsd32_syscall.h       | 36 +++++++++---------
 sys/compat/freebsd32/freebsd32_syscalls.c      | 38 +++++++++----------
 sys/compat/freebsd32/freebsd32_sysent.c        | 38 +++++++++----------
 sys/compat/freebsd32/freebsd32_systrace_args.c | 44 ++++++++++++++++++++++
 sys/compat/freebsd32/syscalls.master           | 51 ++++++++++++++++----------
 5 files changed, 133 insertions(+), 74 deletions(-)

diff --git a/sys/compat/freebsd32/freebsd32_syscall.h b/sys/compat/freebsd32/freebsd32_syscall.h
index 71055205093a..2e65581b5a27 100644
--- a/sys/compat/freebsd32/freebsd32_syscall.h
+++ b/sys/compat/freebsd32/freebsd32_syscall.h
@@ -13,7 +13,7 @@
 #define	FREEBSD32_SYS_open	5
 #define	FREEBSD32_SYS_close	6
 #define	FREEBSD32_SYS_freebsd32_wait4	7
-				/* 8 is obsolete old creat */
+				/* 8 is old creat */
 #define	FREEBSD32_SYS_link	9
 #define	FREEBSD32_SYS_unlink	10
 				/* 11 is obsolete execv */
@@ -89,11 +89,11 @@
 #define	FREEBSD32_SYS_getpgrp	81
 #define	FREEBSD32_SYS_setpgid	82
 #define	FREEBSD32_SYS_freebsd32_setitimer	83
-				/* 84 is obsolete owait */
+				/* 84 is old wait */
 #define	FREEBSD32_SYS_swapon	85
 #define	FREEBSD32_SYS_freebsd32_getitimer	86
-				/* 87 is obsolete ogethostname */
-				/* 88 is obsolete osethostname */
+				/* 87 is old gethostname */
+				/* 88 is old sethostname */
 #define	FREEBSD32_SYS_getdtablesize	89
 #define	FREEBSD32_SYS_dup2	90
 #define	FREEBSD32_SYS_freebsd32_fcntl	92
@@ -102,10 +102,10 @@
 #define	FREEBSD32_SYS_setpriority	96
 #define	FREEBSD32_SYS_socket	97
 #define	FREEBSD32_SYS_connect	98
-				/* 99 is obsolete oaccept */
+				/* 99 is old accept */
 #define	FREEBSD32_SYS_getpriority	100
-				/* 101 is obsolete osend */
-				/* 102 is obsolete orecv */
+				/* 101 is old send */
+				/* 102 is old recv */
 				/* 103 is old freebsd32_sigreturn */
 #define	FREEBSD32_SYS_bind	104
 #define	FREEBSD32_SYS_setsockopt	105
@@ -143,23 +143,23 @@
 #define	FREEBSD32_SYS_freebsd32_utimes	138
 				/* 139 is obsolete 4.2 sigreturn */
 #define	FREEBSD32_SYS_freebsd32_adjtime	140
-				/* 141 is obsolete ogetpeername */
-				/* 142 is obsolete ogethostid */
+				/* 141 is old getpeername */
+				/* 142 is old gethostid */
 				/* 143 is obsolete sethostid */
-				/* 144 is obsolete getrlimit */
-				/* 145 is obsolete setrlimit */
-				/* 146 is obsolete killpg */
+				/* 144 is old getrlimit */
+				/* 145 is old setrlimit */
+				/* 146 is old killpg */
 #define	FREEBSD32_SYS_setsid	147
 #define	FREEBSD32_SYS_quotactl	148
-				/* 149 is obsolete oquota */
-				/* 150 is obsolete ogetsockname */
+				/* 149 is old quota */
+				/* 150 is old getsockname */
 				/* 156 is old freebsd32_getdirentries */
 				/* 157 is freebsd4 freebsd32_statfs */
 				/* 158 is freebsd4 freebsd32_fstatfs */
 #define	FREEBSD32_SYS_getfh	161
-				/* 162 is obsolete getdomainname */
-				/* 163 is obsolete setdomainname */
-				/* 164 is obsolete uname */
+				/* 162 is freebsd4 getdomainname */
+				/* 163 is freebsd4 setdomainname */
+				/* 164 is freebsd4 uname */
 #define	FREEBSD32_SYS_freebsd32_sysarch	165
 #define	FREEBSD32_SYS_rtprio	166
 #define	FREEBSD32_SYS_freebsd32_semsys	169
@@ -167,6 +167,7 @@
 #define	FREEBSD32_SYS_freebsd32_shmsys	171
 				/* 173 is freebsd6 freebsd32_pread */
 				/* 174 is freebsd6 freebsd32_pwrite */
+#define	FREEBSD32_SYS_setfib	175
 #define	FREEBSD32_SYS_freebsd32_ntp_adjtime	176
 #define	FREEBSD32_SYS_setgid	181
 #define	FREEBSD32_SYS_setegid	182
@@ -347,6 +348,7 @@
 #define	FREEBSD32_SYS_freebsd32_getcontext	421
 #define	FREEBSD32_SYS_freebsd32_setcontext	422
 #define	FREEBSD32_SYS_freebsd32_swapcontext	423
+#define	FREEBSD32_SYS_swapoff	424
 #define	FREEBSD32_SYS___acl_get_link	425
 #define	FREEBSD32_SYS___acl_set_link	426
 #define	FREEBSD32_SYS___acl_delete_link	427
diff --git a/sys/compat/freebsd32/freebsd32_syscalls.c b/sys/compat/freebsd32/freebsd32_syscalls.c
index 3a2a515b9dc5..f2ef4bf97563 100644
--- a/sys/compat/freebsd32/freebsd32_syscalls.c
+++ b/sys/compat/freebsd32/freebsd32_syscalls.c
@@ -17,7 +17,7 @@ const char *freebsd32_syscallnames[] = {
 	"open",			/* 5 = open */
 	"close",			/* 6 = close */
 	"freebsd32_wait4",			/* 7 = freebsd32_wait4 */
-	"obs_old",			/* 8 = obsolete old creat */
+	"compat.creat",		/* 8 = old creat */
 	"link",			/* 9 = link */
 	"unlink",			/* 10 = unlink */
 	"obs_execv",			/* 11 = obsolete execv */
@@ -93,11 +93,11 @@ const char *freebsd32_syscallnames[] = {
 	"getpgrp",			/* 81 = getpgrp */
 	"setpgid",			/* 82 = setpgid */
 	"freebsd32_setitimer",			/* 83 = freebsd32_setitimer */
-	"obs_owait",			/* 84 = obsolete owait */
+	"compat.wait",		/* 84 = old wait */
 	"swapon",			/* 85 = swapon */
 	"freebsd32_getitimer",			/* 86 = freebsd32_getitimer */
-	"obs_ogethostname",			/* 87 = obsolete ogethostname */
-	"obs_osethostname",			/* 88 = obsolete osethostname */
+	"compat.gethostname",		/* 87 = old gethostname */
+	"compat.sethostname",		/* 88 = old sethostname */
 	"getdtablesize",			/* 89 = getdtablesize */
 	"dup2",			/* 90 = dup2 */
 	"#91",			/* 91 = getdopt */
@@ -108,10 +108,10 @@ const char *freebsd32_syscallnames[] = {
 	"setpriority",			/* 96 = setpriority */
 	"socket",			/* 97 = socket */
 	"connect",			/* 98 = connect */
-	"obs_oaccept",			/* 99 = obsolete oaccept */
+	"compat.accept",		/* 99 = old accept */
 	"getpriority",			/* 100 = getpriority */
-	"obs_osend",			/* 101 = obsolete osend */
-	"obs_orecv",			/* 102 = obsolete orecv */
+	"compat.send",		/* 101 = old send */
+	"compat.recv",		/* 102 = old recv */
 	"compat.freebsd32_sigreturn",		/* 103 = old freebsd32_sigreturn */
 	"bind",			/* 104 = bind */
 	"setsockopt",			/* 105 = setsockopt */
@@ -150,16 +150,16 @@ const char *freebsd32_syscallnames[] = {
 	"freebsd32_utimes",			/* 138 = freebsd32_utimes */
 	"obs_4.2",			/* 139 = obsolete 4.2 sigreturn */
 	"freebsd32_adjtime",			/* 140 = freebsd32_adjtime */
-	"obs_ogetpeername",			/* 141 = obsolete ogetpeername */
-	"obs_ogethostid",			/* 142 = obsolete ogethostid */
+	"compat.getpeername",		/* 141 = old getpeername */
+	"compat.gethostid",		/* 142 = old gethostid */
 	"obs_sethostid",			/* 143 = obsolete sethostid */
-	"obs_getrlimit",			/* 144 = obsolete getrlimit */
-	"obs_setrlimit",			/* 145 = obsolete setrlimit */
-	"obs_killpg",			/* 146 = obsolete killpg */
+	"compat.getrlimit",		/* 144 = old getrlimit */
+	"compat.setrlimit",		/* 145 = old setrlimit */
+	"compat.killpg",		/* 146 = old killpg */
 	"setsid",			/* 147 = setsid */
 	"quotactl",			/* 148 = quotactl */
-	"obs_oquota",			/* 149 = obsolete oquota */
-	"obs_ogetsockname",			/* 150 = obsolete ogetsockname */
+	"compat.quota",		/* 149 = old quota */
+	"compat.getsockname",		/* 150 = old getsockname */
 	"#151",			/* 151 = sem_lock */
 	"#152",			/* 152 = sem_wakeup */
 	"#153",			/* 153 = asyncdaemon */
@@ -171,9 +171,9 @@ const char *freebsd32_syscallnames[] = {
 	"#159",			/* 159 = nosys */
 	"#160",			/* 160 = lgetfh */
 	"getfh",			/* 161 = getfh */
-	"obs_getdomainname",			/* 162 = obsolete getdomainname */
-	"obs_setdomainname",			/* 163 = obsolete setdomainname */
-	"obs_uname",			/* 164 = obsolete uname */
+	"compat4.getdomainname",		/* 162 = freebsd4 getdomainname */
+	"compat4.setdomainname",		/* 163 = freebsd4 setdomainname */
+	"compat4.uname",		/* 164 = freebsd4 uname */
 	"freebsd32_sysarch",			/* 165 = freebsd32_sysarch */
 	"rtprio",			/* 166 = rtprio */
 	"#167",			/* 167 = nosys */
@@ -184,7 +184,7 @@ const char *freebsd32_syscallnames[] = {
 	"#172",			/* 172 = nosys */
 	"compat6.freebsd32_pread",		/* 173 = freebsd6 freebsd32_pread */
 	"compat6.freebsd32_pwrite",		/* 174 = freebsd6 freebsd32_pwrite */
-	"#175",			/* 175 = nosys */
+	"setfib",			/* 175 = setfib */
 	"freebsd32_ntp_adjtime",			/* 176 = freebsd32_ntp_adjtime */
 	"#177",			/* 177 = sfork */
 	"#178",			/* 178 = getdescriptor */
@@ -433,7 +433,7 @@ const char *freebsd32_syscallnames[] = {
 	"freebsd32_getcontext",			/* 421 = freebsd32_getcontext */
 	"freebsd32_setcontext",			/* 422 = freebsd32_setcontext */
 	"freebsd32_swapcontext",			/* 423 = freebsd32_swapcontext */
-	"#424",			/* 424 = swapoff */
+	"swapoff",			/* 424 = swapoff */
 	"__acl_get_link",			/* 425 = __acl_get_link */
 	"__acl_set_link",			/* 426 = __acl_set_link */
 	"__acl_delete_link",			/* 427 = __acl_delete_link */
diff --git a/sys/compat/freebsd32/freebsd32_sysent.c b/sys/compat/freebsd32/freebsd32_sysent.c
index 806d0437884a..4e5e91c372ff 100644
--- a/sys/compat/freebsd32/freebsd32_sysent.c
+++ b/sys/compat/freebsd32/freebsd32_sysent.c
@@ -70,7 +70,7 @@ struct sysent freebsd32_sysent[] = {
 	{ .sy_narg = AS(open_args), .sy_call = (sy_call_t *)sys_open, .sy_auevent = AUE_OPEN_RWTC, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 5 = open */
 	{ .sy_narg = AS(close_args), .sy_call = (sy_call_t *)sys_close, .sy_auevent = AUE_CLOSE, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC },	/* 6 = close */
 	{ .sy_narg = AS(freebsd32_wait4_args), .sy_call = (sy_call_t *)freebsd32_wait4, .sy_auevent = AUE_WAIT4, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 7 = freebsd32_wait4 */
-	{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT },			/* 8 = obsolete old creat */
+	{ compat(AS(ocreat_args),creat), .sy_auevent = AUE_CREAT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 8 = old creat */
 	{ .sy_narg = AS(link_args), .sy_call = (sy_call_t *)sys_link, .sy_auevent = AUE_LINK, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 9 = link */
 	{ .sy_narg = AS(unlink_args), .sy_call = (sy_call_t *)sys_unlink, .sy_auevent = AUE_UNLINK, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 10 = unlink */
 	{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT },			/* 11 = obsolete execv */
@@ -146,11 +146,11 @@ struct sysent freebsd32_sysent[] = {
 	{ .sy_narg = 0, .sy_call = (sy_call_t *)sys_getpgrp, .sy_auevent = AUE_GETPGRP, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC },	/* 81 = getpgrp */
 	{ .sy_narg = AS(setpgid_args), .sy_call = (sy_call_t *)sys_setpgid, .sy_auevent = AUE_SETPGRP, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 82 = setpgid */
 	{ .sy_narg = AS(freebsd32_setitimer_args), .sy_call = (sy_call_t *)freebsd32_setitimer, .sy_auevent = AUE_SETITIMER, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC },	/* 83 = freebsd32_setitimer */
-	{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT },			/* 84 = obsolete owait */
+	{ compat(0,wait), .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },			/* 84 = old wait */
 	{ .sy_narg = AS(swapon_args), .sy_call = (sy_call_t *)sys_swapon, .sy_auevent = AUE_SWAPON, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 85 = swapon */
 	{ .sy_narg = AS(freebsd32_getitimer_args), .sy_call = (sy_call_t *)freebsd32_getitimer, .sy_auevent = AUE_GETITIMER, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC },	/* 86 = freebsd32_getitimer */
-	{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT },			/* 87 = obsolete ogethostname */
-	{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT },			/* 88 = obsolete osethostname */
+	{ compat(AS(ogethostname_args),gethostname), .sy_auevent = AUE_O_GETHOSTNAME, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC },	/* 87 = old gethostname */
+	{ compat(AS(osethostname_args),sethostname), .sy_auevent = AUE_O_SETHOSTNAME, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 88 = old sethostname */
 	{ .sy_narg = 0, .sy_call = (sy_call_t *)sys_getdtablesize, .sy_auevent = AUE_GETDTABLESIZE, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC },	/* 89 = getdtablesize */
 	{ .sy_narg = AS(dup2_args), .sy_call = (sy_call_t *)sys_dup2, .sy_auevent = AUE_DUP2, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC },	/* 90 = dup2 */
 	{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT },			/* 91 = getdopt */
@@ -161,10 +161,10 @@ struct sysent freebsd32_sysent[] = {
 	{ .sy_narg = AS(setpriority_args), .sy_call = (sy_call_t *)sys_setpriority, .sy_auevent = AUE_SETPRIORITY, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC },	/* 96 = setpriority */
 	{ .sy_narg = AS(socket_args), .sy_call = (sy_call_t *)sys_socket, .sy_auevent = AUE_SOCKET, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC },	/* 97 = socket */
 	{ .sy_narg = AS(connect_args), .sy_call = (sy_call_t *)sys_connect, .sy_auevent = AUE_CONNECT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 98 = connect */
-	{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT },			/* 99 = obsolete oaccept */
+	{ compat(AS(oaccept_args),accept), .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC },	/* 99 = old accept */
 	{ .sy_narg = AS(getpriority_args), .sy_call = (sy_call_t *)sys_getpriority, .sy_auevent = AUE_GETPRIORITY, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC },	/* 100 = getpriority */
-	{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT },			/* 101 = obsolete osend */
-	{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT },			/* 102 = obsolete orecv */
+	{ compat(AS(osend_args),send), .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC },	/* 101 = old send */
+	{ compat(AS(orecv_args),recv), .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC },	/* 102 = old recv */
 	{ compat(AS(ofreebsd32_sigreturn_args),freebsd32_sigreturn), .sy_auevent = AUE_SIGRETURN, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC },	/* 103 = old freebsd32_sigreturn */
 	{ .sy_narg = AS(bind_args), .sy_call = (sy_call_t *)sys_bind, .sy_auevent = AUE_BIND, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 104 = bind */
 	{ .sy_narg = AS(setsockopt_args), .sy_call = (sy_call_t *)sys_setsockopt, .sy_auevent = AUE_SETSOCKOPT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC },	/* 105 = setsockopt */
@@ -203,16 +203,16 @@ struct sysent freebsd32_sysent[] = {
 	{ .sy_narg = AS(freebsd32_utimes_args), .sy_call = (sy_call_t *)freebsd32_utimes, .sy_auevent = AUE_UTIMES, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 138 = freebsd32_utimes */
 	{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT },			/* 139 = obsolete 4.2 sigreturn */
 	{ .sy_narg = AS(freebsd32_adjtime_args), .sy_call = (sy_call_t *)freebsd32_adjtime, .sy_auevent = AUE_ADJTIME, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 140 = freebsd32_adjtime */
-	{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT },			/* 141 = obsolete ogetpeername */
-	{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT },			/* 142 = obsolete ogethostid */
+	{ compat(AS(ogetpeername_args),getpeername), .sy_auevent = AUE_GETPEERNAME, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC },	/* 141 = old getpeername */
+	{ compat(0,gethostid), .sy_auevent = AUE_SYSCTL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC },	/* 142 = old gethostid */
 	{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT },			/* 143 = obsolete sethostid */
-	{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT },			/* 144 = obsolete getrlimit */
-	{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT },			/* 145 = obsolete setrlimit */
-	{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT },			/* 146 = obsolete killpg */
+	{ compat(AS(ogetrlimit_args),getrlimit), .sy_auevent = AUE_GETRLIMIT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC },	/* 144 = old getrlimit */
+	{ compat(AS(osetrlimit_args),setrlimit), .sy_auevent = AUE_SETRLIMIT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC },	/* 145 = old setrlimit */
+	{ compat(AS(okillpg_args),killpg), .sy_auevent = AUE_KILLPG, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 146 = old killpg */
 	{ .sy_narg = 0, .sy_call = (sy_call_t *)sys_setsid, .sy_auevent = AUE_SETSID, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC },	/* 147 = setsid */
 	{ .sy_narg = AS(quotactl_args), .sy_call = (sy_call_t *)sys_quotactl, .sy_auevent = AUE_QUOTACTL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 148 = quotactl */
-	{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT },			/* 149 = obsolete oquota */
-	{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT },			/* 150 = obsolete ogetsockname */
+	{ compat(0,quota), .sy_auevent = AUE_O_QUOTA, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },		/* 149 = old quota */
+	{ compat(0,getsockname), .sy_auevent = AUE_GETSOCKNAME, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC },	/* 150 = old getsockname */
 	{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT },			/* 151 = sem_lock */
 	{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT },			/* 152 = sem_wakeup */
 	{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT },			/* 153 = asyncdaemon */
@@ -224,9 +224,9 @@ struct sysent freebsd32_sysent[] = {
 	{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT },			/* 159 = nosys */
 	{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT },			/* 160 = lgetfh */
 	{ .sy_narg = AS(getfh_args), .sy_call = (sy_call_t *)sys_getfh, .sy_auevent = AUE_NFS_GETFH, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 161 = getfh */
-	{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT },			/* 162 = obsolete getdomainname */
-	{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT },			/* 163 = obsolete setdomainname */
-	{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT },			/* 164 = obsolete uname */
+	{ compat4(AS(freebsd4_getdomainname_args),getdomainname), .sy_auevent = AUE_SYSCTL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC },	/* 162 = freebsd4 getdomainname */
+	{ compat4(AS(freebsd4_setdomainname_args),setdomainname), .sy_auevent = AUE_SYSCTL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 163 = freebsd4 setdomainname */
+	{ compat4(AS(freebsd4_uname_args),uname), .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 164 = freebsd4 uname */
 	{ .sy_narg = AS(freebsd32_sysarch_args), .sy_call = (sy_call_t *)freebsd32_sysarch, .sy_auevent = AUE_SYSARCH, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC },	/* 165 = freebsd32_sysarch */
 	{ .sy_narg = AS(rtprio_args), .sy_call = (sy_call_t *)sys_rtprio, .sy_auevent = AUE_RTPRIO, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC },	/* 166 = rtprio */
 	{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT },			/* 167 = nosys */
@@ -237,7 +237,7 @@ struct sysent freebsd32_sysent[] = {
 	{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT },			/* 172 = nosys */
 	{ compat6(AS(freebsd6_freebsd32_pread_args),freebsd32_pread), .sy_auevent = AUE_PREAD, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC },	/* 173 = freebsd6 freebsd32_pread */
 	{ compat6(AS(freebsd6_freebsd32_pwrite_args),freebsd32_pwrite), .sy_auevent = AUE_PWRITE, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC },	/* 174 = freebsd6 freebsd32_pwrite */
-	{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT },			/* 175 = nosys */
+	{ .sy_narg = AS(setfib_args), .sy_call = (sy_call_t *)sys_setfib, .sy_auevent = AUE_SETFIB, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 175 = setfib */
 	{ .sy_narg = AS(freebsd32_ntp_adjtime_args), .sy_call = (sy_call_t *)freebsd32_ntp_adjtime, .sy_auevent = AUE_NTP_ADJTIME, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 176 = freebsd32_ntp_adjtime */
 	{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT },			/* 177 = sfork */
 	{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT },			/* 178 = getdescriptor */
@@ -486,7 +486,7 @@ struct sysent freebsd32_sysent[] = {
 	{ .sy_narg = AS(freebsd32_getcontext_args), .sy_call = (sy_call_t *)freebsd32_getcontext, .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC },	/* 421 = freebsd32_getcontext */
 	{ .sy_narg = AS(freebsd32_setcontext_args), .sy_call = (sy_call_t *)freebsd32_setcontext, .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC },	/* 422 = freebsd32_setcontext */
 	{ .sy_narg = AS(freebsd32_swapcontext_args), .sy_call = (sy_call_t *)freebsd32_swapcontext, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 423 = freebsd32_swapcontext */
-	{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT },			/* 424 = swapoff */
+	{ .sy_narg = AS(swapoff_args), .sy_call = (sy_call_t *)sys_swapoff, .sy_auevent = AUE_SWAPOFF, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 424 = swapoff */
 	{ .sy_narg = AS(__acl_get_link_args), .sy_call = (sy_call_t *)sys___acl_get_link, .sy_auevent = AUE_ACL_GET_LINK, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 425 = __acl_get_link */
 	{ .sy_narg = AS(__acl_set_link_args), .sy_call = (sy_call_t *)sys___acl_set_link, .sy_auevent = AUE_ACL_SET_LINK, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 426 = __acl_set_link */
 	{ .sy_narg = AS(__acl_delete_link_args), .sy_call = (sy_call_t *)sys___acl_delete_link, .sy_auevent = AUE_ACL_DELETE_LINK, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 427 = __acl_delete_link */
diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c
index 21d59a5fdfd9..69e510fddc0a 100644
--- a/sys/compat/freebsd32/freebsd32_systrace_args.c
+++ b/sys/compat/freebsd32/freebsd32_systrace_args.c
@@ -870,6 +870,13 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
 		*n_args = 4;
 		break;
 	}
+	/* setfib */
+	case 175: {
+		struct setfib_args *p = params;
+		iarg[0] = p->fibnum; /* int */
+		*n_args = 1;
+		break;
+	}
 	/* freebsd32_ntp_adjtime */
 	case 176: {
 		struct freebsd32_ntp_adjtime_args *p = params;
@@ -1973,6 +1980,13 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
 		*n_args = 2;
 		break;
 	}
+	/* swapoff */
+	case 424: {
+		struct swapoff_args *p = params;
+		uarg[0] = (intptr_t)p->name; /* const char * */
+		*n_args = 1;
+		break;
+	}
 	/* __acl_get_link */
 	case 425: {
 		struct __acl_get_link_args *p = params;
@@ -4823,6 +4837,16 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
 			break;
 		};
 		break;
+	/* setfib */
+	case 175:
+		switch (ndx) {
+		case 0:
+			p = "int";
+			break;
+		default:
+			break;
+		};
+		break;
 	/* freebsd32_ntp_adjtime */
 	case 176:
 		switch (ndx) {
@@ -6587,6 +6611,16 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
 			break;
 		};
 		break;
+	/* swapoff */
+	case 424:
+		switch (ndx) {
+		case 0:
+			p = "userland const char *";
+			break;
+		default:
+			break;
+		};
+		break;
 	/* __acl_get_link */
 	case 425:
 		switch (ndx) {
@@ -9721,6 +9755,11 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
 		if (ndx == 0 || ndx == 1)
 			p = "int";
 		break;
+	/* setfib */
+	case 175:
+		if (ndx == 0 || ndx == 1)
+			p = "int";
+		break;
 	/* freebsd32_ntp_adjtime */
 	case 176:
 		if (ndx == 0 || ndx == 1)
@@ -10368,6 +10407,11 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
 		if (ndx == 0 || ndx == 1)
 			p = "int";
 		break;
+	/* swapoff */
+	case 424:
+		if (ndx == 0 || ndx == 1)
+			p = "int";
+		break;
 	/* __acl_get_link */
 	case 425:
 		if (ndx == 0 || ndx == 1)
diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master
index c9cac48f7ac4..4dce7def6b4a 100644
--- a/sys/compat/freebsd32/syscalls.master
+++ b/sys/compat/freebsd32/syscalls.master
@@ -78,7 +78,8 @@
 6	AUE_CLOSE	NOPROTO	{ int close(int fd); }
 7	AUE_WAIT4	STD	{ int freebsd32_wait4(int pid, int *status, \
 				    int options, struct rusage32 *rusage); }
-8	AUE_CREAT	OBSOL	old creat
+8	AUE_CREAT	COMPAT|NOPROTO	{ int creat(const char *path, \
+				    int mode); }
 9	AUE_LINK	NOPROTO	{ int link(const char *path, \
 				    const char *link); }
 10	AUE_UNLINK	NOPROTO	{ int unlink(const char *path); }
@@ -195,13 +196,15 @@
 83	AUE_SETITIMER	STD	{ int freebsd32_setitimer(int which, \
 				    const struct itimerval32 *itv, \
 				    struct itimerval32 *oitv); }
-84	AUE_NULL	OBSOL	owait
+84	AUE_NULL	COMPAT|NOPROTO	{ int wait(void); }
 ; XXX implement
 85	AUE_SWAPON	NOPROTO	{ int swapon(const char *name); }
 86	AUE_GETITIMER	STD	{ int freebsd32_getitimer(int which, \
 				    struct itimerval32 *itv); }
-87	AUE_O_GETHOSTNAME	OBSOL	ogethostname
-88	AUE_O_SETHOSTNAME	OBSOL	osethostname
+87	AUE_O_GETHOSTNAME	COMPAT|NOPROTO	{ int gethostname( \
+				    char *hostname, u_int len); }
+88	AUE_O_SETHOSTNAME	COMPAT|NOPROTO	{ int sethostname( \
+				    char *hostname, u_int len); }
 89	AUE_GETDTABLESIZE	NOPROTO	{ int getdtablesize(void); }
 90	AUE_DUP2	NOPROTO	{ int dup2(u_int from, u_int to); }
 91	AUE_NULL	UNIMPL	getdopt
@@ -219,10 +222,14 @@
 98	AUE_CONNECT	NOPROTO	{ int connect(int s, \
 				    const struct sockaddr *name, \
 				    int namelen); }
-99	AUE_NULL	OBSOL	oaccept
+99	AUE_NULL	COMPAT|NOPROTO { int accept(int s, \
+				    struct sockaddr *name, \
+				    __socklen_t *anamelen); }
 100	AUE_GETPRIORITY	NOPROTO	{ int getpriority(int which, int who); }
-101	AUE_NULL	OBSOL	osend
-102	AUE_NULL	OBSOL	orecv
+101	AUE_NULL	COMPAT|NOPROTO { int send(int s, const void *buf, \
+				    int len, int flags); }
+102	AUE_NULL	COMPAT|NOPROTO { int recv(int s, void *buf, int len, \
+				    int flags); }
 103	AUE_SIGRETURN	COMPAT	{ int freebsd32_sigreturn( \
 				    struct ia32_sigcontext3 *sigcntxp); }
 104	AUE_BIND	NOPROTO	{ int bind(int s, const struct sockaddr *name, \
@@ -285,17 +292,21 @@
 140	AUE_ADJTIME	STD	{ int freebsd32_adjtime( \
 				    const struct timeval32 *delta, \
 				    struct timeval32 *olddelta); }
-141	AUE_GETPEERNAME	OBSOL	ogetpeername
-142	AUE_SYSCTL	OBSOL	ogethostid
+141	AUE_GETPEERNAME	COMPAT|NOPROTO { int getpeername(int fdes, \
+				    struct sockaddr *asa, \
+				    __socklen_t *alen); }
+142	AUE_SYSCTL	COMPAT|NOPROTO { long gethostid(void); }
 143	AUE_SYSCTL	OBSOL	sethostid
-144	AUE_GETRLIMIT	OBSOL	getrlimit
-145	AUE_SETRLIMIT	OBSOL	setrlimit
-146	AUE_KILLPG	OBSOL	killpg
+144	AUE_GETRLIMIT	COMPAT|NOPROTO { int getrlimit(u_int which, \
+				    struct orlimit *rlp); }
+145	AUE_SETRLIMIT	COMPAT|NOPROTO { int setrlimit(u_int which, \
+				    struct orlimit *rlp); }
+146	AUE_KILLPG	COMPAT|NOPROTO { int killpg(int pgid, int signum); }
 147	AUE_SETSID	NOPROTO	{ int setsid(void); }
 148	AUE_QUOTACTL	NOPROTO	{ int quotactl(const char *path, int cmd, \
 				    int uid, void *arg); }
-149	AUE_O_QUOTA	OBSOL oquota
-150	AUE_GETSOCKNAME	OBSOL ogetsockname
+149	AUE_O_QUOTA	COMPAT|NOPROTO { int quota(void); }
+150	AUE_GETSOCKNAME	COMPAT|NOPROTO getsockname
 
 ; Syscalls 151-180 inclusive are reserved for vendor-specific
 ; system calls.  (This includes various calls added for compatibity
@@ -319,9 +330,11 @@
 160	AUE_LGETFH	UNIMPL	lgetfh
 161	AUE_NFS_GETFH	NOPROTO	{ int getfh(const char *fname, \
 				    struct fhandle *fhp); }
-162	AUE_SYSCTL	OBSOL	getdomainname
-163	AUE_SYSCTL	OBSOL	setdomainname
-164	AUE_NULL	OBSOL	uname
+162	AUE_SYSCTL	COMPAT4|NOPROTO	{ int getdomainname(char *domainname, \
+				    int len); }
+163	AUE_SYSCTL	COMPAT4|NOPROTO	{ int setdomainname(char *domainname, \
+				    int len); }
+164	AUE_NULL	COMPAT4|NOPROTO { int uname(struct utsname *name); }
 165	AUE_SYSARCH	STD	{ int freebsd32_sysarch(int op, char *parms); }
 166	AUE_RTPRIO	NOPROTO	{ int rtprio(int function, pid_t pid, \
 				    struct rtprio *rtp); }
@@ -340,7 +353,7 @@
 174	AUE_PWRITE	COMPAT6	{ ssize_t freebsd32_pwrite(int fd, \
 				    const void *buf, size_t nbyte, int pad, \
 				    uint32_t offset1, uint32_t offset2); }
-175	AUE_NULL	UNIMPL	nosys
+175	AUE_SETFIB	NOPROTO	{ int setfib(int fibnum); }
 176	AUE_NTP_ADJTIME	STD	{ int freebsd32_ntp_adjtime( \
 				    struct timex32 *tp); }
 177	AUE_NULL	UNIMPL	sfork (BSD/OS 2.x)
@@ -771,7 +784,7 @@
 423	AUE_NULL	STD	{ int freebsd32_swapcontext( \
 				    struct __ucontext32 *oucp, \
 				    const struct __ucontext32 *ucp); }
-424	AUE_SWAPOFF	UNIMPL	swapoff
+424	AUE_SWAPOFF	NOPROTO	{ int swapoff(const char *name); }
 425	AUE_ACL_GET_LINK	NOPROTO	{ int __acl_get_link(const char *path, \
 				    acl_type_t type, struct acl *aclp); }
 426	AUE_ACL_SET_LINK	NOPROTO	{ int __acl_set_link(const char *path, \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202111172022.1AHKMchM059990>