Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Aug 2017 11:01:39 +0000 (UTC)
From:      Ed Schouten <ed@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r322885 - in head: sys/compat/cloudabi sys/compat/cloudabi32 sys/compat/cloudabi64 sys/contrib/cloudabi usr.bin/truss
Message-ID:  <201708251101.v7PB1doR027697@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ed
Date: Fri Aug 25 11:01:39 2017
New Revision: 322885
URL: https://svnweb.freebsd.org/changeset/base/322885

Log:
  Sync CloudABI compatibility against the latest upstream version (v0.13).
  
  With Flower (CloudABI's network connection daemon) becoming more
  complete, there is no longer any need for creating any unconnected
  sockets. Socket pairs in combination with file descriptor passing is all
  that is necessary, as that is what is used by Flower to pass network
  connections from the public internet to listening processes.
  
  Remove all of the kernel bits that were used to implement socket(),
  listen(), bindat() and connectat(). In principle, accept() and
  SO_ACCEPTCONN may also be removed, but there are still some consumers
  left.
  
  Obtained from:	https://github.com/NuxiNL/cloudabi
  MFC after:	1 month

Modified:
  head/sys/compat/cloudabi/cloudabi_fd.c
  head/sys/compat/cloudabi/cloudabi_sock.c
  head/sys/compat/cloudabi32/cloudabi32_proto.h
  head/sys/compat/cloudabi32/cloudabi32_syscall.h
  head/sys/compat/cloudabi32/cloudabi32_syscalls.c
  head/sys/compat/cloudabi32/cloudabi32_sysent.c
  head/sys/compat/cloudabi32/cloudabi32_systrace_args.c
  head/sys/compat/cloudabi64/cloudabi64_proto.h
  head/sys/compat/cloudabi64/cloudabi64_syscall.h
  head/sys/compat/cloudabi64/cloudabi64_syscalls.c
  head/sys/compat/cloudabi64/cloudabi64_sysent.c
  head/sys/compat/cloudabi64/cloudabi64_systrace_args.c
  head/sys/contrib/cloudabi/cloudabi_types_common.h
  head/sys/contrib/cloudabi/cloudabi_vdso_aarch64.S
  head/sys/contrib/cloudabi/cloudabi_vdso_armv6.S
  head/sys/contrib/cloudabi/cloudabi_vdso_i686.S
  head/sys/contrib/cloudabi/cloudabi_vdso_i686_on_64bit.S
  head/sys/contrib/cloudabi/cloudabi_vdso_x86_64.S
  head/sys/contrib/cloudabi/syscalls32.master
  head/sys/contrib/cloudabi/syscalls64.master
  head/usr.bin/truss/syscalls.c

Modified: head/sys/compat/cloudabi/cloudabi_fd.c
==============================================================================
--- head/sys/compat/cloudabi/cloudabi_fd.c	Fri Aug 25 10:57:17 2017	(r322884)
+++ head/sys/compat/cloudabi/cloudabi_fd.c	Fri Aug 25 11:01:39 2017	(r322885)
@@ -79,11 +79,6 @@ __FBSDID("$FreeBSD$");
 	MAPPING(CLOUDABI_RIGHT_POLL_WAIT, CAP_KQUEUE_EVENT)		\
 	MAPPING(CLOUDABI_RIGHT_PROC_EXEC, CAP_FEXECVE)			\
 	MAPPING(CLOUDABI_RIGHT_SOCK_ACCEPT, CAP_ACCEPT)			\
-	MAPPING(CLOUDABI_RIGHT_SOCK_BIND_DIRECTORY, CAP_BINDAT)		\
-	MAPPING(CLOUDABI_RIGHT_SOCK_BIND_SOCKET, CAP_BIND)		\
-	MAPPING(CLOUDABI_RIGHT_SOCK_CONNECT_DIRECTORY, CAP_CONNECTAT)	\
-	MAPPING(CLOUDABI_RIGHT_SOCK_CONNECT_SOCKET, CAP_CONNECT)	\
-	MAPPING(CLOUDABI_RIGHT_SOCK_LISTEN, CAP_LISTEN)			\
 	MAPPING(CLOUDABI_RIGHT_SOCK_SHUTDOWN, CAP_SHUTDOWN)		\
 	MAPPING(CLOUDABI_RIGHT_SOCK_STAT_GET, CAP_GETPEERNAME,		\
 	    CAP_GETSOCKNAME, CAP_GETSOCKOPT)
@@ -109,10 +104,6 @@ cloudabi_sys_fd_create1(struct thread *td,
 		cap_rights_init(&fcaps.fc_rights, CAP_FSTAT, CAP_FTRUNCATE,
 		    CAP_MMAP_RWX);
 		return (kern_shm_open(td, SHM_ANON, O_RDWR, 0, &fcaps));
-	case CLOUDABI_FILETYPE_SOCKET_DGRAM:
-		return (kern_socket(td, AF_UNIX, SOCK_DGRAM, 0));
-	case CLOUDABI_FILETYPE_SOCKET_STREAM:
-		return (kern_socket(td, AF_UNIX, SOCK_STREAM, 0));
 	default:
 		return (EINVAL);
 	}
@@ -312,9 +303,7 @@ cloudabi_remove_conflicting_rights(cloudabi_filetype_t
 		    CLOUDABI_RIGHT_FILE_STAT_PUT_TIMES |
 		    CLOUDABI_RIGHT_FILE_SYMLINK |
 		    CLOUDABI_RIGHT_FILE_UNLINK |
-		    CLOUDABI_RIGHT_POLL_FD_READWRITE |
-		    CLOUDABI_RIGHT_SOCK_BIND_DIRECTORY |
-		    CLOUDABI_RIGHT_SOCK_CONNECT_DIRECTORY;
+		    CLOUDABI_RIGHT_POLL_FD_READWRITE;
 		*inheriting &= CLOUDABI_RIGHT_FD_DATASYNC |
 		    CLOUDABI_RIGHT_FD_READ |
 		    CLOUDABI_RIGHT_FD_SEEK |
@@ -344,9 +333,7 @@ cloudabi_remove_conflicting_rights(cloudabi_filetype_t
 		    CLOUDABI_RIGHT_MEM_MAP |
 		    CLOUDABI_RIGHT_MEM_MAP_EXEC |
 		    CLOUDABI_RIGHT_POLL_FD_READWRITE |
-		    CLOUDABI_RIGHT_PROC_EXEC |
-		    CLOUDABI_RIGHT_SOCK_BIND_DIRECTORY |
-		    CLOUDABI_RIGHT_SOCK_CONNECT_DIRECTORY;
+		    CLOUDABI_RIGHT_PROC_EXEC;
 		break;
 	case CLOUDABI_FILETYPE_FIFO:
 		*base &= CLOUDABI_RIGHT_FD_READ |
@@ -400,9 +387,6 @@ cloudabi_remove_conflicting_rights(cloudabi_filetype_t
 		    CLOUDABI_RIGHT_FILE_STAT_FGET |
 		    CLOUDABI_RIGHT_POLL_FD_READWRITE |
 		    CLOUDABI_RIGHT_SOCK_ACCEPT |
-		    CLOUDABI_RIGHT_SOCK_BIND_SOCKET |
-		    CLOUDABI_RIGHT_SOCK_CONNECT_SOCKET |
-		    CLOUDABI_RIGHT_SOCK_LISTEN |
 		    CLOUDABI_RIGHT_SOCK_SHUTDOWN |
 		    CLOUDABI_RIGHT_SOCK_STAT_GET;
 		break;

Modified: head/sys/compat/cloudabi/cloudabi_sock.c
==============================================================================
--- head/sys/compat/cloudabi/cloudabi_sock.c	Fri Aug 25 10:57:17 2017	(r322884)
+++ head/sys/compat/cloudabi/cloudabi_sock.c	Fri Aug 25 11:01:39 2017	(r322885)
@@ -38,7 +38,6 @@ __FBSDID("$FreeBSD$");
 #include <sys/socketvar.h>
 #include <sys/syscallsubr.h>
 #include <sys/systm.h>
-#include <sys/un.h>
 
 #include <net/vnet.h>
 
@@ -49,28 +48,6 @@ __FBSDID("$FreeBSD$");
 #include <compat/cloudabi/cloudabi_proto.h>
 #include <compat/cloudabi/cloudabi_util.h>
 
-/* Copies a pathname into a UNIX socket address structure. */
-static int
-copyin_sockaddr_un(const char *path, size_t pathlen, struct sockaddr_un *sun)
-{
-	int error;
-
-	/* Copy in pathname string if there's enough space. */
-	if (pathlen >= sizeof(sun->sun_path))
-		return (ENAMETOOLONG);
-	error = copyin(path, &sun->sun_path, pathlen);
-	if (error != 0)
-		return (error);
-	if (memchr(sun->sun_path, '\0', pathlen) != NULL)
-		return (EINVAL);
-
-	/* Initialize the rest of the socket address. */
-	sun->sun_path[pathlen] = '\0';
-	sun->sun_family = AF_UNIX;
-	sun->sun_len = sizeof(*sun);
-	return (0);
-}
-
 int
 cloudabi_sys_sock_accept(struct thread *td,
     struct cloudabi_sys_sock_accept_args *uap)
@@ -80,41 +57,6 @@ cloudabi_sys_sock_accept(struct thread *td,
 }
 
 int
-cloudabi_sys_sock_bind(struct thread *td,
-    struct cloudabi_sys_sock_bind_args *uap)
-{
-	struct sockaddr_un sun;
-	int error;
-
-	error = copyin_sockaddr_un(uap->path, uap->path_len, &sun);
-	if (error != 0)
-		return (error);
-	return (kern_bindat(td, uap->fd, uap->sock, (struct sockaddr *)&sun));
-}
-
-int
-cloudabi_sys_sock_connect(struct thread *td,
-    struct cloudabi_sys_sock_connect_args *uap)
-{
-	struct sockaddr_un sun;
-	int error;
-
-	error = copyin_sockaddr_un(uap->path, uap->path_len, &sun);
-	if (error != 0)
-		return (error);
-	return (kern_connectat(td, uap->fd, uap->sock,
-	    (struct sockaddr *)&sun));
-}
-
-int
-cloudabi_sys_sock_listen(struct thread *td,
-    struct cloudabi_sys_sock_listen_args *uap)
-{
-
-	return (kern_listen(td, uap->sock, uap->backlog));
-}
-
-int
 cloudabi_sys_sock_shutdown(struct thread *td,
     struct cloudabi_sys_sock_shutdown_args *uap)
 {
@@ -174,10 +116,7 @@ cloudabi_sock_recv(struct thread *td, cloudabi_fd_t fd
     cloudabi_riflags_t flags, size_t *rdatalen, size_t *rfdslen,
     cloudabi_roflags_t *rflags)
 {
-	struct sockaddr_storage ss;
 	struct msghdr hdr = {
-		.msg_name = &ss,
-		.msg_namelen = sizeof(ss),
 		.msg_iov = data,
 		.msg_iovlen = datalen,
 	};

Modified: head/sys/compat/cloudabi32/cloudabi32_proto.h
==============================================================================
--- head/sys/compat/cloudabi32/cloudabi32_proto.h	Fri Aug 25 10:57:17 2017	(r322884)
+++ head/sys/compat/cloudabi32/cloudabi32_proto.h	Fri Aug 25 11:01:39 2017	(r322885)
@@ -259,22 +259,6 @@ struct cloudabi_sys_sock_accept_args {
 	char sock_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t sock; char sock_r_[PADR_(cloudabi_fd_t)];
 	char unused_l_[PADL_(void *)]; void * unused; char unused_r_[PADR_(void *)];
 };
-struct cloudabi_sys_sock_bind_args {
-	char sock_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t sock; char sock_r_[PADR_(cloudabi_fd_t)];
-	char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)];
-	char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)];
-	char path_len_l_[PADL_(size_t)]; size_t path_len; char path_len_r_[PADR_(size_t)];
-};
-struct cloudabi_sys_sock_connect_args {
-	char sock_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t sock; char sock_r_[PADR_(cloudabi_fd_t)];
-	char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)];
-	char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)];
-	char path_len_l_[PADL_(size_t)]; size_t path_len; char path_len_r_[PADR_(size_t)];
-};
-struct cloudabi_sys_sock_listen_args {
-	char sock_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t sock; char sock_r_[PADR_(cloudabi_fd_t)];
-	char backlog_l_[PADL_(cloudabi_backlog_t)]; cloudabi_backlog_t backlog; char backlog_r_[PADR_(cloudabi_backlog_t)];
-};
 struct cloudabi32_sys_sock_recv_args {
 	char sock_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t sock; char sock_r_[PADR_(cloudabi_fd_t)];
 	char in_l_[PADL_(const cloudabi32_recv_in_t *)]; const cloudabi32_recv_in_t * in; char in_r_[PADR_(const cloudabi32_recv_in_t *)];
@@ -349,9 +333,6 @@ int	cloudabi_sys_proc_fork(struct thread *, struct clo
 int	cloudabi_sys_proc_raise(struct thread *, struct cloudabi_sys_proc_raise_args *);
 int	cloudabi_sys_random_get(struct thread *, struct cloudabi_sys_random_get_args *);
 int	cloudabi_sys_sock_accept(struct thread *, struct cloudabi_sys_sock_accept_args *);
-int	cloudabi_sys_sock_bind(struct thread *, struct cloudabi_sys_sock_bind_args *);
-int	cloudabi_sys_sock_connect(struct thread *, struct cloudabi_sys_sock_connect_args *);
-int	cloudabi_sys_sock_listen(struct thread *, struct cloudabi_sys_sock_listen_args *);
 int	cloudabi32_sys_sock_recv(struct thread *, struct cloudabi32_sys_sock_recv_args *);
 int	cloudabi32_sys_sock_send(struct thread *, struct cloudabi32_sys_sock_send_args *);
 int	cloudabi_sys_sock_shutdown(struct thread *, struct cloudabi_sys_sock_shutdown_args *);
@@ -440,9 +421,6 @@ int	cloudabi_sys_thread_yield(struct thread *, struct 
 #define	CLOUDABI32_SYS_AUE_cloudabi_sys_proc_raise	AUE_NULL
 #define	CLOUDABI32_SYS_AUE_cloudabi_sys_random_get	AUE_NULL
 #define	CLOUDABI32_SYS_AUE_cloudabi_sys_sock_accept	AUE_NULL
-#define	CLOUDABI32_SYS_AUE_cloudabi_sys_sock_bind	AUE_NULL
-#define	CLOUDABI32_SYS_AUE_cloudabi_sys_sock_connect	AUE_NULL
-#define	CLOUDABI32_SYS_AUE_cloudabi_sys_sock_listen	AUE_NULL
 #define	CLOUDABI32_SYS_AUE_cloudabi32_sys_sock_recv	AUE_NULL
 #define	CLOUDABI32_SYS_AUE_cloudabi32_sys_sock_send	AUE_NULL
 #define	CLOUDABI32_SYS_AUE_cloudabi_sys_sock_shutdown	AUE_NULL

Modified: head/sys/compat/cloudabi32/cloudabi32_syscall.h
==============================================================================
--- head/sys/compat/cloudabi32/cloudabi32_syscall.h	Fri Aug 25 10:57:17 2017	(r322884)
+++ head/sys/compat/cloudabi32/cloudabi32_syscall.h	Fri Aug 25 11:01:39 2017	(r322885)
@@ -50,14 +50,11 @@
 #define	CLOUDABI32_SYS_cloudabi_sys_proc_raise	42
 #define	CLOUDABI32_SYS_cloudabi_sys_random_get	43
 #define	CLOUDABI32_SYS_cloudabi_sys_sock_accept	44
-#define	CLOUDABI32_SYS_cloudabi_sys_sock_bind	45
-#define	CLOUDABI32_SYS_cloudabi_sys_sock_connect	46
-#define	CLOUDABI32_SYS_cloudabi_sys_sock_listen	47
-#define	CLOUDABI32_SYS_cloudabi32_sys_sock_recv	48
-#define	CLOUDABI32_SYS_cloudabi32_sys_sock_send	49
-#define	CLOUDABI32_SYS_cloudabi_sys_sock_shutdown	50
-#define	CLOUDABI32_SYS_cloudabi_sys_sock_stat_get	51
-#define	CLOUDABI32_SYS_cloudabi32_sys_thread_create	52
-#define	CLOUDABI32_SYS_cloudabi_sys_thread_exit	53
-#define	CLOUDABI32_SYS_cloudabi_sys_thread_yield	54
-#define	CLOUDABI32_SYS_MAXSYSCALL	55
+#define	CLOUDABI32_SYS_cloudabi32_sys_sock_recv	45
+#define	CLOUDABI32_SYS_cloudabi32_sys_sock_send	46
+#define	CLOUDABI32_SYS_cloudabi_sys_sock_shutdown	47
+#define	CLOUDABI32_SYS_cloudabi_sys_sock_stat_get	48
+#define	CLOUDABI32_SYS_cloudabi32_sys_thread_create	49
+#define	CLOUDABI32_SYS_cloudabi_sys_thread_exit	50
+#define	CLOUDABI32_SYS_cloudabi_sys_thread_yield	51
+#define	CLOUDABI32_SYS_MAXSYSCALL	52

Modified: head/sys/compat/cloudabi32/cloudabi32_syscalls.c
==============================================================================
--- head/sys/compat/cloudabi32/cloudabi32_syscalls.c	Fri Aug 25 10:57:17 2017	(r322884)
+++ head/sys/compat/cloudabi32/cloudabi32_syscalls.c	Fri Aug 25 11:01:39 2017	(r322885)
@@ -51,14 +51,11 @@ const char *cloudabi32_syscallnames[] = {
 	"cloudabi_sys_proc_raise",			/* 42 = cloudabi_sys_proc_raise */
 	"cloudabi_sys_random_get",			/* 43 = cloudabi_sys_random_get */
 	"cloudabi_sys_sock_accept",			/* 44 = cloudabi_sys_sock_accept */
-	"cloudabi_sys_sock_bind",			/* 45 = cloudabi_sys_sock_bind */
-	"cloudabi_sys_sock_connect",			/* 46 = cloudabi_sys_sock_connect */
-	"cloudabi_sys_sock_listen",			/* 47 = cloudabi_sys_sock_listen */
-	"cloudabi32_sys_sock_recv",			/* 48 = cloudabi32_sys_sock_recv */
-	"cloudabi32_sys_sock_send",			/* 49 = cloudabi32_sys_sock_send */
-	"cloudabi_sys_sock_shutdown",			/* 50 = cloudabi_sys_sock_shutdown */
-	"cloudabi_sys_sock_stat_get",			/* 51 = cloudabi_sys_sock_stat_get */
-	"cloudabi32_sys_thread_create",			/* 52 = cloudabi32_sys_thread_create */
-	"cloudabi_sys_thread_exit",			/* 53 = cloudabi_sys_thread_exit */
-	"cloudabi_sys_thread_yield",			/* 54 = cloudabi_sys_thread_yield */
+	"cloudabi32_sys_sock_recv",			/* 45 = cloudabi32_sys_sock_recv */
+	"cloudabi32_sys_sock_send",			/* 46 = cloudabi32_sys_sock_send */
+	"cloudabi_sys_sock_shutdown",			/* 47 = cloudabi_sys_sock_shutdown */
+	"cloudabi_sys_sock_stat_get",			/* 48 = cloudabi_sys_sock_stat_get */
+	"cloudabi32_sys_thread_create",			/* 49 = cloudabi32_sys_thread_create */
+	"cloudabi_sys_thread_exit",			/* 50 = cloudabi_sys_thread_exit */
+	"cloudabi_sys_thread_yield",			/* 51 = cloudabi_sys_thread_yield */
 };

Modified: head/sys/compat/cloudabi32/cloudabi32_sysent.c
==============================================================================
--- head/sys/compat/cloudabi32/cloudabi32_sysent.c	Fri Aug 25 10:57:17 2017	(r322884)
+++ head/sys/compat/cloudabi32/cloudabi32_sysent.c	Fri Aug 25 11:01:39 2017	(r322885)
@@ -59,14 +59,11 @@ struct sysent cloudabi32_sysent[] = {
 	{ AS(cloudabi_sys_proc_raise_args), (sy_call_t *)cloudabi_sys_proc_raise, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 42 = cloudabi_sys_proc_raise */
 	{ AS(cloudabi_sys_random_get_args), (sy_call_t *)cloudabi_sys_random_get, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 43 = cloudabi_sys_random_get */
 	{ AS(cloudabi_sys_sock_accept_args), (sy_call_t *)cloudabi_sys_sock_accept, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 44 = cloudabi_sys_sock_accept */
-	{ AS(cloudabi_sys_sock_bind_args), (sy_call_t *)cloudabi_sys_sock_bind, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 45 = cloudabi_sys_sock_bind */
-	{ AS(cloudabi_sys_sock_connect_args), (sy_call_t *)cloudabi_sys_sock_connect, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 46 = cloudabi_sys_sock_connect */
-	{ AS(cloudabi_sys_sock_listen_args), (sy_call_t *)cloudabi_sys_sock_listen, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 47 = cloudabi_sys_sock_listen */
-	{ AS(cloudabi32_sys_sock_recv_args), (sy_call_t *)cloudabi32_sys_sock_recv, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 48 = cloudabi32_sys_sock_recv */
-	{ AS(cloudabi32_sys_sock_send_args), (sy_call_t *)cloudabi32_sys_sock_send, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 49 = cloudabi32_sys_sock_send */
-	{ AS(cloudabi_sys_sock_shutdown_args), (sy_call_t *)cloudabi_sys_sock_shutdown, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 50 = cloudabi_sys_sock_shutdown */
-	{ AS(cloudabi_sys_sock_stat_get_args), (sy_call_t *)cloudabi_sys_sock_stat_get, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 51 = cloudabi_sys_sock_stat_get */
-	{ AS(cloudabi32_sys_thread_create_args), (sy_call_t *)cloudabi32_sys_thread_create, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 52 = cloudabi32_sys_thread_create */
-	{ AS(cloudabi_sys_thread_exit_args), (sy_call_t *)cloudabi_sys_thread_exit, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 53 = cloudabi_sys_thread_exit */
-	{ 0, (sy_call_t *)cloudabi_sys_thread_yield, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 54 = cloudabi_sys_thread_yield */
+	{ AS(cloudabi32_sys_sock_recv_args), (sy_call_t *)cloudabi32_sys_sock_recv, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 45 = cloudabi32_sys_sock_recv */
+	{ AS(cloudabi32_sys_sock_send_args), (sy_call_t *)cloudabi32_sys_sock_send, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 46 = cloudabi32_sys_sock_send */
+	{ AS(cloudabi_sys_sock_shutdown_args), (sy_call_t *)cloudabi_sys_sock_shutdown, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 47 = cloudabi_sys_sock_shutdown */
+	{ AS(cloudabi_sys_sock_stat_get_args), (sy_call_t *)cloudabi_sys_sock_stat_get, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 48 = cloudabi_sys_sock_stat_get */
+	{ AS(cloudabi32_sys_thread_create_args), (sy_call_t *)cloudabi32_sys_thread_create, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 49 = cloudabi32_sys_thread_create */
+	{ AS(cloudabi_sys_thread_exit_args), (sy_call_t *)cloudabi_sys_thread_exit, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 50 = cloudabi_sys_thread_exit */
+	{ 0, (sy_call_t *)cloudabi_sys_thread_yield, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 51 = cloudabi_sys_thread_yield */
 };

Modified: head/sys/compat/cloudabi32/cloudabi32_systrace_args.c
==============================================================================
--- head/sys/compat/cloudabi32/cloudabi32_systrace_args.c	Fri Aug 25 10:57:17 2017	(r322884)
+++ head/sys/compat/cloudabi32/cloudabi32_systrace_args.c	Fri Aug 25 11:01:39 2017	(r322885)
@@ -415,36 +415,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg
 		*n_args = 2;
 		break;
 	}
-	/* cloudabi_sys_sock_bind */
-	case 45: {
-		struct cloudabi_sys_sock_bind_args *p = params;
-		iarg[0] = p->sock; /* cloudabi_fd_t */
-		iarg[1] = p->fd; /* cloudabi_fd_t */
-		uarg[2] = (intptr_t) p->path; /* const char * */
-		uarg[3] = p->path_len; /* size_t */
-		*n_args = 4;
-		break;
-	}
-	/* cloudabi_sys_sock_connect */
-	case 46: {
-		struct cloudabi_sys_sock_connect_args *p = params;
-		iarg[0] = p->sock; /* cloudabi_fd_t */
-		iarg[1] = p->fd; /* cloudabi_fd_t */
-		uarg[2] = (intptr_t) p->path; /* const char * */
-		uarg[3] = p->path_len; /* size_t */
-		*n_args = 4;
-		break;
-	}
-	/* cloudabi_sys_sock_listen */
-	case 47: {
-		struct cloudabi_sys_sock_listen_args *p = params;
-		iarg[0] = p->sock; /* cloudabi_fd_t */
-		iarg[1] = p->backlog; /* cloudabi_backlog_t */
-		*n_args = 2;
-		break;
-	}
 	/* cloudabi32_sys_sock_recv */
-	case 48: {
+	case 45: {
 		struct cloudabi32_sys_sock_recv_args *p = params;
 		iarg[0] = p->sock; /* cloudabi_fd_t */
 		uarg[1] = (intptr_t) p->in; /* const cloudabi32_recv_in_t * */
@@ -453,7 +425,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg
 		break;
 	}
 	/* cloudabi32_sys_sock_send */
-	case 49: {
+	case 46: {
 		struct cloudabi32_sys_sock_send_args *p = params;
 		iarg[0] = p->sock; /* cloudabi_fd_t */
 		uarg[1] = (intptr_t) p->in; /* const cloudabi32_send_in_t * */
@@ -462,7 +434,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg
 		break;
 	}
 	/* cloudabi_sys_sock_shutdown */
-	case 50: {
+	case 47: {
 		struct cloudabi_sys_sock_shutdown_args *p = params;
 		iarg[0] = p->sock; /* cloudabi_fd_t */
 		iarg[1] = p->how; /* cloudabi_sdflags_t */
@@ -470,7 +442,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg
 		break;
 	}
 	/* cloudabi_sys_sock_stat_get */
-	case 51: {
+	case 48: {
 		struct cloudabi_sys_sock_stat_get_args *p = params;
 		iarg[0] = p->sock; /* cloudabi_fd_t */
 		uarg[1] = (intptr_t) p->buf; /* cloudabi_sockstat_t * */
@@ -479,14 +451,14 @@ systrace_args(int sysnum, void *params, uint64_t *uarg
 		break;
 	}
 	/* cloudabi32_sys_thread_create */
-	case 52: {
+	case 49: {
 		struct cloudabi32_sys_thread_create_args *p = params;
 		uarg[0] = (intptr_t) p->attr; /* cloudabi32_threadattr_t * */
 		*n_args = 1;
 		break;
 	}
 	/* cloudabi_sys_thread_exit */
-	case 53: {
+	case 50: {
 		struct cloudabi_sys_thread_exit_args *p = params;
 		uarg[0] = (intptr_t) p->lock; /* cloudabi_lock_t * */
 		iarg[1] = p->scope; /* cloudabi_scope_t */
@@ -494,7 +466,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg
 		break;
 	}
 	/* cloudabi_sys_thread_yield */
-	case 54: {
+	case 51: {
 		*n_args = 0;
 		break;
 	}
@@ -1224,64 +1196,13 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d
 			break;
 		};
 		break;
-	/* cloudabi_sys_sock_bind */
+	/* cloudabi32_sys_sock_recv */
 	case 45:
 		switch(ndx) {
 		case 0:
 			p = "cloudabi_fd_t";
 			break;
 		case 1:
-			p = "cloudabi_fd_t";
-			break;
-		case 2:
-			p = "userland const char *";
-			break;
-		case 3:
-			p = "size_t";
-			break;
-		default:
-			break;
-		};
-		break;
-	/* cloudabi_sys_sock_connect */
-	case 46:
-		switch(ndx) {
-		case 0:
-			p = "cloudabi_fd_t";
-			break;
-		case 1:
-			p = "cloudabi_fd_t";
-			break;
-		case 2:
-			p = "userland const char *";
-			break;
-		case 3:
-			p = "size_t";
-			break;
-		default:
-			break;
-		};
-		break;
-	/* cloudabi_sys_sock_listen */
-	case 47:
-		switch(ndx) {
-		case 0:
-			p = "cloudabi_fd_t";
-			break;
-		case 1:
-			p = "cloudabi_backlog_t";
-			break;
-		default:
-			break;
-		};
-		break;
-	/* cloudabi32_sys_sock_recv */
-	case 48:
-		switch(ndx) {
-		case 0:
-			p = "cloudabi_fd_t";
-			break;
-		case 1:
 			p = "userland const cloudabi32_recv_in_t *";
 			break;
 		case 2:
@@ -1292,7 +1213,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d
 		};
 		break;
 	/* cloudabi32_sys_sock_send */
-	case 49:
+	case 46:
 		switch(ndx) {
 		case 0:
 			p = "cloudabi_fd_t";
@@ -1308,7 +1229,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d
 		};
 		break;
 	/* cloudabi_sys_sock_shutdown */
-	case 50:
+	case 47:
 		switch(ndx) {
 		case 0:
 			p = "cloudabi_fd_t";
@@ -1321,7 +1242,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d
 		};
 		break;
 	/* cloudabi_sys_sock_stat_get */
-	case 51:
+	case 48:
 		switch(ndx) {
 		case 0:
 			p = "cloudabi_fd_t";
@@ -1337,7 +1258,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d
 		};
 		break;
 	/* cloudabi32_sys_thread_create */
-	case 52:
+	case 49:
 		switch(ndx) {
 		case 0:
 			p = "userland cloudabi32_threadattr_t *";
@@ -1347,7 +1268,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d
 		};
 		break;
 	/* cloudabi_sys_thread_exit */
-	case 53:
+	case 50:
 		switch(ndx) {
 		case 0:
 			p = "userland cloudabi_lock_t *";
@@ -1360,7 +1281,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d
 		};
 		break;
 	/* cloudabi_sys_thread_yield */
-	case 54:
+	case 51:
 		break;
 	default:
 		break;
@@ -1595,53 +1516,38 @@ systrace_return_setargdesc(int sysnum, int ndx, char *
 		if (ndx == 0 || ndx == 1)
 			p = "cloudabi_fd_t";
 		break;
-	/* cloudabi_sys_sock_bind */
+	/* cloudabi32_sys_sock_recv */
 	case 45:
 		if (ndx == 0 || ndx == 1)
 			p = "void";
 		break;
-	/* cloudabi_sys_sock_connect */
+	/* cloudabi32_sys_sock_send */
 	case 46:
 		if (ndx == 0 || ndx == 1)
 			p = "void";
 		break;
-	/* cloudabi_sys_sock_listen */
+	/* cloudabi_sys_sock_shutdown */
 	case 47:
 		if (ndx == 0 || ndx == 1)
 			p = "void";
 		break;
-	/* cloudabi32_sys_sock_recv */
+	/* cloudabi_sys_sock_stat_get */
 	case 48:
 		if (ndx == 0 || ndx == 1)
 			p = "void";
 		break;
-	/* cloudabi32_sys_sock_send */
+	/* cloudabi32_sys_thread_create */
 	case 49:
 		if (ndx == 0 || ndx == 1)
-			p = "void";
-		break;
-	/* cloudabi_sys_sock_shutdown */
-	case 50:
-		if (ndx == 0 || ndx == 1)
-			p = "void";
-		break;
-	/* cloudabi_sys_sock_stat_get */
-	case 51:
-		if (ndx == 0 || ndx == 1)
-			p = "void";
-		break;
-	/* cloudabi32_sys_thread_create */
-	case 52:
-		if (ndx == 0 || ndx == 1)
 			p = "cloudabi_tid_t";
 		break;
 	/* cloudabi_sys_thread_exit */
-	case 53:
+	case 50:
 		if (ndx == 0 || ndx == 1)
 			p = "void";
 		break;
 	/* cloudabi_sys_thread_yield */
-	case 54:
+	case 51:
 	default:
 		break;
 	};

Modified: head/sys/compat/cloudabi64/cloudabi64_proto.h
==============================================================================
--- head/sys/compat/cloudabi64/cloudabi64_proto.h	Fri Aug 25 10:57:17 2017	(r322884)
+++ head/sys/compat/cloudabi64/cloudabi64_proto.h	Fri Aug 25 11:01:39 2017	(r322885)
@@ -259,22 +259,6 @@ struct cloudabi_sys_sock_accept_args {
 	char sock_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t sock; char sock_r_[PADR_(cloudabi_fd_t)];
 	char unused_l_[PADL_(void *)]; void * unused; char unused_r_[PADR_(void *)];
 };
-struct cloudabi_sys_sock_bind_args {
-	char sock_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t sock; char sock_r_[PADR_(cloudabi_fd_t)];
-	char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)];
-	char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)];
-	char path_len_l_[PADL_(size_t)]; size_t path_len; char path_len_r_[PADR_(size_t)];
-};
-struct cloudabi_sys_sock_connect_args {
-	char sock_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t sock; char sock_r_[PADR_(cloudabi_fd_t)];
-	char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)];
-	char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)];
-	char path_len_l_[PADL_(size_t)]; size_t path_len; char path_len_r_[PADR_(size_t)];
-};
-struct cloudabi_sys_sock_listen_args {
-	char sock_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t sock; char sock_r_[PADR_(cloudabi_fd_t)];
-	char backlog_l_[PADL_(cloudabi_backlog_t)]; cloudabi_backlog_t backlog; char backlog_r_[PADR_(cloudabi_backlog_t)];
-};
 struct cloudabi64_sys_sock_recv_args {
 	char sock_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t sock; char sock_r_[PADR_(cloudabi_fd_t)];
 	char in_l_[PADL_(const cloudabi64_recv_in_t *)]; const cloudabi64_recv_in_t * in; char in_r_[PADR_(const cloudabi64_recv_in_t *)];
@@ -349,9 +333,6 @@ int	cloudabi_sys_proc_fork(struct thread *, struct clo
 int	cloudabi_sys_proc_raise(struct thread *, struct cloudabi_sys_proc_raise_args *);
 int	cloudabi_sys_random_get(struct thread *, struct cloudabi_sys_random_get_args *);
 int	cloudabi_sys_sock_accept(struct thread *, struct cloudabi_sys_sock_accept_args *);
-int	cloudabi_sys_sock_bind(struct thread *, struct cloudabi_sys_sock_bind_args *);
-int	cloudabi_sys_sock_connect(struct thread *, struct cloudabi_sys_sock_connect_args *);
-int	cloudabi_sys_sock_listen(struct thread *, struct cloudabi_sys_sock_listen_args *);
 int	cloudabi64_sys_sock_recv(struct thread *, struct cloudabi64_sys_sock_recv_args *);
 int	cloudabi64_sys_sock_send(struct thread *, struct cloudabi64_sys_sock_send_args *);
 int	cloudabi_sys_sock_shutdown(struct thread *, struct cloudabi_sys_sock_shutdown_args *);
@@ -440,9 +421,6 @@ int	cloudabi_sys_thread_yield(struct thread *, struct 
 #define	CLOUDABI64_SYS_AUE_cloudabi_sys_proc_raise	AUE_NULL
 #define	CLOUDABI64_SYS_AUE_cloudabi_sys_random_get	AUE_NULL
 #define	CLOUDABI64_SYS_AUE_cloudabi_sys_sock_accept	AUE_NULL
-#define	CLOUDABI64_SYS_AUE_cloudabi_sys_sock_bind	AUE_NULL
-#define	CLOUDABI64_SYS_AUE_cloudabi_sys_sock_connect	AUE_NULL
-#define	CLOUDABI64_SYS_AUE_cloudabi_sys_sock_listen	AUE_NULL
 #define	CLOUDABI64_SYS_AUE_cloudabi64_sys_sock_recv	AUE_NULL
 #define	CLOUDABI64_SYS_AUE_cloudabi64_sys_sock_send	AUE_NULL
 #define	CLOUDABI64_SYS_AUE_cloudabi_sys_sock_shutdown	AUE_NULL

Modified: head/sys/compat/cloudabi64/cloudabi64_syscall.h
==============================================================================
--- head/sys/compat/cloudabi64/cloudabi64_syscall.h	Fri Aug 25 10:57:17 2017	(r322884)
+++ head/sys/compat/cloudabi64/cloudabi64_syscall.h	Fri Aug 25 11:01:39 2017	(r322885)
@@ -50,14 +50,11 @@
 #define	CLOUDABI64_SYS_cloudabi_sys_proc_raise	42
 #define	CLOUDABI64_SYS_cloudabi_sys_random_get	43
 #define	CLOUDABI64_SYS_cloudabi_sys_sock_accept	44
-#define	CLOUDABI64_SYS_cloudabi_sys_sock_bind	45
-#define	CLOUDABI64_SYS_cloudabi_sys_sock_connect	46
-#define	CLOUDABI64_SYS_cloudabi_sys_sock_listen	47
-#define	CLOUDABI64_SYS_cloudabi64_sys_sock_recv	48
-#define	CLOUDABI64_SYS_cloudabi64_sys_sock_send	49
-#define	CLOUDABI64_SYS_cloudabi_sys_sock_shutdown	50
-#define	CLOUDABI64_SYS_cloudabi_sys_sock_stat_get	51
-#define	CLOUDABI64_SYS_cloudabi64_sys_thread_create	52
-#define	CLOUDABI64_SYS_cloudabi_sys_thread_exit	53
-#define	CLOUDABI64_SYS_cloudabi_sys_thread_yield	54
-#define	CLOUDABI64_SYS_MAXSYSCALL	55
+#define	CLOUDABI64_SYS_cloudabi64_sys_sock_recv	45
+#define	CLOUDABI64_SYS_cloudabi64_sys_sock_send	46
+#define	CLOUDABI64_SYS_cloudabi_sys_sock_shutdown	47
+#define	CLOUDABI64_SYS_cloudabi_sys_sock_stat_get	48
+#define	CLOUDABI64_SYS_cloudabi64_sys_thread_create	49
+#define	CLOUDABI64_SYS_cloudabi_sys_thread_exit	50
+#define	CLOUDABI64_SYS_cloudabi_sys_thread_yield	51
+#define	CLOUDABI64_SYS_MAXSYSCALL	52

Modified: head/sys/compat/cloudabi64/cloudabi64_syscalls.c
==============================================================================
--- head/sys/compat/cloudabi64/cloudabi64_syscalls.c	Fri Aug 25 10:57:17 2017	(r322884)
+++ head/sys/compat/cloudabi64/cloudabi64_syscalls.c	Fri Aug 25 11:01:39 2017	(r322885)
@@ -51,14 +51,11 @@ const char *cloudabi64_syscallnames[] = {
 	"cloudabi_sys_proc_raise",			/* 42 = cloudabi_sys_proc_raise */
 	"cloudabi_sys_random_get",			/* 43 = cloudabi_sys_random_get */
 	"cloudabi_sys_sock_accept",			/* 44 = cloudabi_sys_sock_accept */
-	"cloudabi_sys_sock_bind",			/* 45 = cloudabi_sys_sock_bind */
-	"cloudabi_sys_sock_connect",			/* 46 = cloudabi_sys_sock_connect */
-	"cloudabi_sys_sock_listen",			/* 47 = cloudabi_sys_sock_listen */
-	"cloudabi64_sys_sock_recv",			/* 48 = cloudabi64_sys_sock_recv */
-	"cloudabi64_sys_sock_send",			/* 49 = cloudabi64_sys_sock_send */
-	"cloudabi_sys_sock_shutdown",			/* 50 = cloudabi_sys_sock_shutdown */
-	"cloudabi_sys_sock_stat_get",			/* 51 = cloudabi_sys_sock_stat_get */
-	"cloudabi64_sys_thread_create",			/* 52 = cloudabi64_sys_thread_create */
-	"cloudabi_sys_thread_exit",			/* 53 = cloudabi_sys_thread_exit */
-	"cloudabi_sys_thread_yield",			/* 54 = cloudabi_sys_thread_yield */
+	"cloudabi64_sys_sock_recv",			/* 45 = cloudabi64_sys_sock_recv */
+	"cloudabi64_sys_sock_send",			/* 46 = cloudabi64_sys_sock_send */
+	"cloudabi_sys_sock_shutdown",			/* 47 = cloudabi_sys_sock_shutdown */
+	"cloudabi_sys_sock_stat_get",			/* 48 = cloudabi_sys_sock_stat_get */
+	"cloudabi64_sys_thread_create",			/* 49 = cloudabi64_sys_thread_create */
+	"cloudabi_sys_thread_exit",			/* 50 = cloudabi_sys_thread_exit */
+	"cloudabi_sys_thread_yield",			/* 51 = cloudabi_sys_thread_yield */
 };

Modified: head/sys/compat/cloudabi64/cloudabi64_sysent.c
==============================================================================
--- head/sys/compat/cloudabi64/cloudabi64_sysent.c	Fri Aug 25 10:57:17 2017	(r322884)
+++ head/sys/compat/cloudabi64/cloudabi64_sysent.c	Fri Aug 25 11:01:39 2017	(r322885)
@@ -59,14 +59,11 @@ struct sysent cloudabi64_sysent[] = {
 	{ AS(cloudabi_sys_proc_raise_args), (sy_call_t *)cloudabi_sys_proc_raise, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 42 = cloudabi_sys_proc_raise */
 	{ AS(cloudabi_sys_random_get_args), (sy_call_t *)cloudabi_sys_random_get, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 43 = cloudabi_sys_random_get */
 	{ AS(cloudabi_sys_sock_accept_args), (sy_call_t *)cloudabi_sys_sock_accept, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 44 = cloudabi_sys_sock_accept */
-	{ AS(cloudabi_sys_sock_bind_args), (sy_call_t *)cloudabi_sys_sock_bind, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 45 = cloudabi_sys_sock_bind */
-	{ AS(cloudabi_sys_sock_connect_args), (sy_call_t *)cloudabi_sys_sock_connect, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 46 = cloudabi_sys_sock_connect */
-	{ AS(cloudabi_sys_sock_listen_args), (sy_call_t *)cloudabi_sys_sock_listen, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 47 = cloudabi_sys_sock_listen */
-	{ AS(cloudabi64_sys_sock_recv_args), (sy_call_t *)cloudabi64_sys_sock_recv, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 48 = cloudabi64_sys_sock_recv */
-	{ AS(cloudabi64_sys_sock_send_args), (sy_call_t *)cloudabi64_sys_sock_send, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 49 = cloudabi64_sys_sock_send */
-	{ AS(cloudabi_sys_sock_shutdown_args), (sy_call_t *)cloudabi_sys_sock_shutdown, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 50 = cloudabi_sys_sock_shutdown */
-	{ AS(cloudabi_sys_sock_stat_get_args), (sy_call_t *)cloudabi_sys_sock_stat_get, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 51 = cloudabi_sys_sock_stat_get */
-	{ AS(cloudabi64_sys_thread_create_args), (sy_call_t *)cloudabi64_sys_thread_create, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 52 = cloudabi64_sys_thread_create */
-	{ AS(cloudabi_sys_thread_exit_args), (sy_call_t *)cloudabi_sys_thread_exit, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 53 = cloudabi_sys_thread_exit */
-	{ 0, (sy_call_t *)cloudabi_sys_thread_yield, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 54 = cloudabi_sys_thread_yield */
+	{ AS(cloudabi64_sys_sock_recv_args), (sy_call_t *)cloudabi64_sys_sock_recv, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 45 = cloudabi64_sys_sock_recv */
+	{ AS(cloudabi64_sys_sock_send_args), (sy_call_t *)cloudabi64_sys_sock_send, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 46 = cloudabi64_sys_sock_send */
+	{ AS(cloudabi_sys_sock_shutdown_args), (sy_call_t *)cloudabi_sys_sock_shutdown, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 47 = cloudabi_sys_sock_shutdown */
+	{ AS(cloudabi_sys_sock_stat_get_args), (sy_call_t *)cloudabi_sys_sock_stat_get, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 48 = cloudabi_sys_sock_stat_get */
+	{ AS(cloudabi64_sys_thread_create_args), (sy_call_t *)cloudabi64_sys_thread_create, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 49 = cloudabi64_sys_thread_create */
+	{ AS(cloudabi_sys_thread_exit_args), (sy_call_t *)cloudabi_sys_thread_exit, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 50 = cloudabi_sys_thread_exit */
+	{ 0, (sy_call_t *)cloudabi_sys_thread_yield, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 51 = cloudabi_sys_thread_yield */
 };

Modified: head/sys/compat/cloudabi64/cloudabi64_systrace_args.c
==============================================================================
--- head/sys/compat/cloudabi64/cloudabi64_systrace_args.c	Fri Aug 25 10:57:17 2017	(r322884)
+++ head/sys/compat/cloudabi64/cloudabi64_systrace_args.c	Fri Aug 25 11:01:39 2017	(r322885)
@@ -415,36 +415,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg
 		*n_args = 2;
 		break;
 	}
-	/* cloudabi_sys_sock_bind */
-	case 45: {
-		struct cloudabi_sys_sock_bind_args *p = params;
-		iarg[0] = p->sock; /* cloudabi_fd_t */
-		iarg[1] = p->fd; /* cloudabi_fd_t */
-		uarg[2] = (intptr_t) p->path; /* const char * */
-		uarg[3] = p->path_len; /* size_t */
-		*n_args = 4;
-		break;
-	}
-	/* cloudabi_sys_sock_connect */
-	case 46: {
-		struct cloudabi_sys_sock_connect_args *p = params;
-		iarg[0] = p->sock; /* cloudabi_fd_t */
-		iarg[1] = p->fd; /* cloudabi_fd_t */
-		uarg[2] = (intptr_t) p->path; /* const char * */
-		uarg[3] = p->path_len; /* size_t */
-		*n_args = 4;
-		break;
-	}
-	/* cloudabi_sys_sock_listen */
-	case 47: {
-		struct cloudabi_sys_sock_listen_args *p = params;
-		iarg[0] = p->sock; /* cloudabi_fd_t */
-		iarg[1] = p->backlog; /* cloudabi_backlog_t */
-		*n_args = 2;
-		break;
-	}
 	/* cloudabi64_sys_sock_recv */
-	case 48: {
+	case 45: {
 		struct cloudabi64_sys_sock_recv_args *p = params;
 		iarg[0] = p->sock; /* cloudabi_fd_t */
 		uarg[1] = (intptr_t) p->in; /* const cloudabi64_recv_in_t * */
@@ -453,7 +425,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg
 		break;
 	}
 	/* cloudabi64_sys_sock_send */
-	case 49: {
+	case 46: {
 		struct cloudabi64_sys_sock_send_args *p = params;
 		iarg[0] = p->sock; /* cloudabi_fd_t */
 		uarg[1] = (intptr_t) p->in; /* const cloudabi64_send_in_t * */
@@ -462,7 +434,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg
 		break;
 	}
 	/* cloudabi_sys_sock_shutdown */
-	case 50: {
+	case 47: {
 		struct cloudabi_sys_sock_shutdown_args *p = params;
 		iarg[0] = p->sock; /* cloudabi_fd_t */
 		iarg[1] = p->how; /* cloudabi_sdflags_t */
@@ -470,7 +442,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg
 		break;
 	}
 	/* cloudabi_sys_sock_stat_get */
-	case 51: {
+	case 48: {
 		struct cloudabi_sys_sock_stat_get_args *p = params;
 		iarg[0] = p->sock; /* cloudabi_fd_t */
 		uarg[1] = (intptr_t) p->buf; /* cloudabi_sockstat_t * */
@@ -479,14 +451,14 @@ systrace_args(int sysnum, void *params, uint64_t *uarg
 		break;
 	}
 	/* cloudabi64_sys_thread_create */
-	case 52: {
+	case 49: {
 		struct cloudabi64_sys_thread_create_args *p = params;
 		uarg[0] = (intptr_t) p->attr; /* cloudabi64_threadattr_t * */
 		*n_args = 1;
 		break;
 	}
 	/* cloudabi_sys_thread_exit */
-	case 53: {
+	case 50: {
 		struct cloudabi_sys_thread_exit_args *p = params;
 		uarg[0] = (intptr_t) p->lock; /* cloudabi_lock_t * */
 		iarg[1] = p->scope; /* cloudabi_scope_t */
@@ -494,7 +466,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg
 		break;
 	}
 	/* cloudabi_sys_thread_yield */
-	case 54: {
+	case 51: {
 		*n_args = 0;
 		break;
 	}
@@ -1224,64 +1196,13 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d
 			break;
 		};
 		break;
-	/* cloudabi_sys_sock_bind */
+	/* cloudabi64_sys_sock_recv */
 	case 45:
 		switch(ndx) {
 		case 0:
 			p = "cloudabi_fd_t";
 			break;
 		case 1:
-			p = "cloudabi_fd_t";
-			break;
-		case 2:
-			p = "userland const char *";
-			break;
-		case 3:
-			p = "size_t";
-			break;
-		default:
-			break;
-		};
-		break;
-	/* cloudabi_sys_sock_connect */
-	case 46:
-		switch(ndx) {
-		case 0:
-			p = "cloudabi_fd_t";
-			break;
-		case 1:
-			p = "cloudabi_fd_t";
-			break;
-		case 2:
-			p = "userland const char *";
-			break;
-		case 3:
-			p = "size_t";
-			break;
-		default:
-			break;
-		};
-		break;
-	/* cloudabi_sys_sock_listen */
-	case 47:
-		switch(ndx) {
-		case 0:
-			p = "cloudabi_fd_t";
-			break;
-		case 1:
-			p = "cloudabi_backlog_t";
-			break;
-		default:
-			break;
-		};
-		break;
-	/* cloudabi64_sys_sock_recv */
-	case 48:
-		switch(ndx) {
-		case 0:
-			p = "cloudabi_fd_t";
-			break;
-		case 1:
 			p = "userland const cloudabi64_recv_in_t *";
 			break;
 		case 2:
@@ -1292,7 +1213,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d
 		};
 		break;
 	/* cloudabi64_sys_sock_send */
-	case 49:
+	case 46:
 		switch(ndx) {
 		case 0:
 			p = "cloudabi_fd_t";
@@ -1308,7 +1229,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d
 		};
 		break;
 	/* cloudabi_sys_sock_shutdown */
-	case 50:
+	case 47:
 		switch(ndx) {
 		case 0:
 			p = "cloudabi_fd_t";
@@ -1321,7 +1242,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d
 		};
 		break;
 	/* cloudabi_sys_sock_stat_get */
-	case 51:
+	case 48:
 		switch(ndx) {
 		case 0:
 			p = "cloudabi_fd_t";
@@ -1337,7 +1258,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d
 		};
 		break;
 	/* cloudabi64_sys_thread_create */
-	case 52:
+	case 49:
 		switch(ndx) {
 		case 0:
 			p = "userland cloudabi64_threadattr_t *";
@@ -1347,7 +1268,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d
 		};
 		break;
 	/* cloudabi_sys_thread_exit */
-	case 53:
+	case 50:
 		switch(ndx) {
 		case 0:
 			p = "userland cloudabi_lock_t *";
@@ -1360,7 +1281,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d
 		};
 		break;
 	/* cloudabi_sys_thread_yield */
-	case 54:
+	case 51:
 		break;
 	default:
 		break;
@@ -1595,53 +1516,38 @@ systrace_return_setargdesc(int sysnum, int ndx, char *
 		if (ndx == 0 || ndx == 1)
 			p = "cloudabi_fd_t";
 		break;
-	/* cloudabi_sys_sock_bind */
+	/* cloudabi64_sys_sock_recv */
 	case 45:
 		if (ndx == 0 || ndx == 1)
 			p = "void";
 		break;
-	/* cloudabi_sys_sock_connect */
+	/* cloudabi64_sys_sock_send */
 	case 46:
 		if (ndx == 0 || ndx == 1)
 			p = "void";
 		break;
-	/* cloudabi_sys_sock_listen */
+	/* cloudabi_sys_sock_shutdown */
 	case 47:
 		if (ndx == 0 || ndx == 1)
 			p = "void";
 		break;
-	/* cloudabi64_sys_sock_recv */
+	/* cloudabi_sys_sock_stat_get */
 	case 48:
 		if (ndx == 0 || ndx == 1)
 			p = "void";
 		break;
-	/* cloudabi64_sys_sock_send */
+	/* cloudabi64_sys_thread_create */
 	case 49:
 		if (ndx == 0 || ndx == 1)
-			p = "void";
-		break;
-	/* cloudabi_sys_sock_shutdown */
-	case 50:
-		if (ndx == 0 || ndx == 1)
-			p = "void";
-		break;
-	/* cloudabi_sys_sock_stat_get */
-	case 51:
-		if (ndx == 0 || ndx == 1)
-			p = "void";
-		break;
-	/* cloudabi64_sys_thread_create */
-	case 52:
-		if (ndx == 0 || ndx == 1)
 			p = "cloudabi_tid_t";
 		break;
 	/* cloudabi_sys_thread_exit */
-	case 53:
+	case 50:
 		if (ndx == 0 || ndx == 1)
 			p = "void";
 		break;
 	/* cloudabi_sys_thread_yield */
-	case 54:
+	case 51:
 	default:
 		break;
 	};

Modified: head/sys/contrib/cloudabi/cloudabi_types_common.h
==============================================================================
--- head/sys/contrib/cloudabi/cloudabi_types_common.h	Fri Aug 25 10:57:17 2017	(r322884)
+++ head/sys/contrib/cloudabi/cloudabi_types_common.h	Fri Aug 25 11:01:39 2017	(r322885)
@@ -249,47 +249,42 @@ typedef uint16_t cloudabi_riflags_t;
 #define CLOUDABI_SOCK_RECV_WAITALL 0x0010
 
 typedef uint64_t cloudabi_rights_t;
-#define CLOUDABI_RIGHT_FD_DATASYNC            0x0000000000000001
-#define CLOUDABI_RIGHT_FD_READ                0x0000000000000002
-#define CLOUDABI_RIGHT_FD_SEEK                0x0000000000000004
-#define CLOUDABI_RIGHT_FD_STAT_PUT_FLAGS      0x0000000000000008
-#define CLOUDABI_RIGHT_FD_SYNC                0x0000000000000010
-#define CLOUDABI_RIGHT_FD_TELL                0x0000000000000020
-#define CLOUDABI_RIGHT_FD_WRITE               0x0000000000000040
-#define CLOUDABI_RIGHT_FILE_ADVISE            0x0000000000000080
-#define CLOUDABI_RIGHT_FILE_ALLOCATE          0x0000000000000100
-#define CLOUDABI_RIGHT_FILE_CREATE_DIRECTORY  0x0000000000000200
-#define CLOUDABI_RIGHT_FILE_CREATE_FILE       0x0000000000000400
-#define CLOUDABI_RIGHT_FILE_CREATE_FIFO       0x0000000000000800
-#define CLOUDABI_RIGHT_FILE_LINK_SOURCE       0x0000000000001000
-#define CLOUDABI_RIGHT_FILE_LINK_TARGET       0x0000000000002000
-#define CLOUDABI_RIGHT_FILE_OPEN              0x0000000000004000
-#define CLOUDABI_RIGHT_FILE_READDIR           0x0000000000008000
-#define CLOUDABI_RIGHT_FILE_READLINK          0x0000000000010000
-#define CLOUDABI_RIGHT_FILE_RENAME_SOURCE     0x0000000000020000
-#define CLOUDABI_RIGHT_FILE_RENAME_TARGET     0x0000000000040000
-#define CLOUDABI_RIGHT_FILE_STAT_FGET         0x0000000000080000
-#define CLOUDABI_RIGHT_FILE_STAT_FPUT_SIZE    0x0000000000100000
-#define CLOUDABI_RIGHT_FILE_STAT_FPUT_TIMES   0x0000000000200000
-#define CLOUDABI_RIGHT_FILE_STAT_GET          0x0000000000400000
-#define CLOUDABI_RIGHT_FILE_STAT_PUT_TIMES    0x0000000000800000
-#define CLOUDABI_RIGHT_FILE_SYMLINK           0x0000000001000000
-#define CLOUDABI_RIGHT_FILE_UNLINK            0x0000000002000000
-#define CLOUDABI_RIGHT_MEM_MAP                0x0000000004000000
-#define CLOUDABI_RIGHT_MEM_MAP_EXEC           0x0000000008000000
-#define CLOUDABI_RIGHT_POLL_FD_READWRITE      0x0000000010000000
-#define CLOUDABI_RIGHT_POLL_MODIFY            0x0000000020000000
-#define CLOUDABI_RIGHT_POLL_PROC_TERMINATE    0x0000000040000000
-#define CLOUDABI_RIGHT_POLL_WAIT              0x0000000080000000
-#define CLOUDABI_RIGHT_PROC_EXEC              0x0000000100000000
-#define CLOUDABI_RIGHT_SOCK_ACCEPT            0x0000000200000000
-#define CLOUDABI_RIGHT_SOCK_BIND_DIRECTORY    0x0000000400000000
-#define CLOUDABI_RIGHT_SOCK_BIND_SOCKET       0x0000000800000000
-#define CLOUDABI_RIGHT_SOCK_CONNECT_DIRECTORY 0x0000001000000000
-#define CLOUDABI_RIGHT_SOCK_CONNECT_SOCKET    0x0000002000000000
-#define CLOUDABI_RIGHT_SOCK_LISTEN            0x0000004000000000
-#define CLOUDABI_RIGHT_SOCK_SHUTDOWN          0x0000008000000000
-#define CLOUDABI_RIGHT_SOCK_STAT_GET          0x0000010000000000
+#define CLOUDABI_RIGHT_FD_DATASYNC           0x0000000000000001
+#define CLOUDABI_RIGHT_FD_READ               0x0000000000000002
+#define CLOUDABI_RIGHT_FD_SEEK               0x0000000000000004
+#define CLOUDABI_RIGHT_FD_STAT_PUT_FLAGS     0x0000000000000008
+#define CLOUDABI_RIGHT_FD_SYNC               0x0000000000000010
+#define CLOUDABI_RIGHT_FD_TELL               0x0000000000000020
+#define CLOUDABI_RIGHT_FD_WRITE              0x0000000000000040
+#define CLOUDABI_RIGHT_FILE_ADVISE           0x0000000000000080
+#define CLOUDABI_RIGHT_FILE_ALLOCATE         0x0000000000000100
+#define CLOUDABI_RIGHT_FILE_CREATE_DIRECTORY 0x0000000000000200
+#define CLOUDABI_RIGHT_FILE_CREATE_FILE      0x0000000000000400
+#define CLOUDABI_RIGHT_FILE_CREATE_FIFO      0x0000000000000800
+#define CLOUDABI_RIGHT_FILE_LINK_SOURCE      0x0000000000001000
+#define CLOUDABI_RIGHT_FILE_LINK_TARGET      0x0000000000002000
+#define CLOUDABI_RIGHT_FILE_OPEN             0x0000000000004000
+#define CLOUDABI_RIGHT_FILE_READDIR          0x0000000000008000
+#define CLOUDABI_RIGHT_FILE_READLINK         0x0000000000010000
+#define CLOUDABI_RIGHT_FILE_RENAME_SOURCE    0x0000000000020000
+#define CLOUDABI_RIGHT_FILE_RENAME_TARGET    0x0000000000040000
+#define CLOUDABI_RIGHT_FILE_STAT_FGET        0x0000000000080000

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



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