git: 1f9d71ee32cf - main - Regen for writev syscall

From: Dmitry Chagin <dchagin_at_FreeBSD.org>
Date: Sun, 20 Aug 2023 07:37:47 UTC
The branch main has been updated by dchagin:

URL: https://cgit.FreeBSD.org/src/commit/?id=1f9d71ee32cf74ece18f36b31c7e9ea1613be730

commit 1f9d71ee32cf74ece18f36b31c7e9ea1613be730
Author:     Dmitry Chagin <dchagin@FreeBSD.org>
AuthorDate: 2023-08-20 07:36:31 +0000
Commit:     Dmitry Chagin <dchagin@FreeBSD.org>
CommitDate: 2023-08-20 07:36:31 +0000

    Regen for writev syscall
---
 sys/amd64/linux/linux_proto.h             | 7 +++++++
 sys/amd64/linux/linux_syscall.h           | 2 +-
 sys/amd64/linux/linux_syscalls.c          | 2 +-
 sys/amd64/linux/linux_sysent.c            | 2 +-
 sys/amd64/linux/linux_systrace_args.c     | 8 ++++----
 sys/amd64/linux32/linux32_proto.h         | 2 +-
 sys/amd64/linux32/linux32_sysent.c        | 1 +
 sys/amd64/linux32/linux32_systrace_args.c | 4 ++--
 sys/arm64/linux/linux_proto.h             | 7 +++++++
 sys/arm64/linux/linux_syscall.h           | 2 +-
 sys/arm64/linux/linux_syscalls.c          | 2 +-
 sys/arm64/linux/linux_sysent.c            | 2 +-
 sys/arm64/linux/linux_systrace_args.c     | 8 ++++----
 sys/i386/linux/linux_proto.h              | 7 +++++++
 sys/i386/linux/linux_syscall.h            | 2 +-
 sys/i386/linux/linux_syscalls.c           | 2 +-
 sys/i386/linux/linux_sysent.c             | 2 +-
 sys/i386/linux/linux_systrace_args.c      | 8 ++++----
 18 files changed, 46 insertions(+), 24 deletions(-)

diff --git a/sys/amd64/linux/linux_proto.h b/sys/amd64/linux/linux_proto.h
index 80b5998e2f26..2a9dbf6fbe12 100644
--- a/sys/amd64/linux/linux_proto.h
+++ b/sys/amd64/linux/linux_proto.h
@@ -114,6 +114,11 @@ struct linux_pwrite_args {
 	char nbyte_l_[PADL_(l_size_t)]; l_size_t nbyte; char nbyte_r_[PADR_(l_size_t)];
 	char offset_l_[PADL_(l_loff_t)]; l_loff_t offset; char offset_r_[PADR_(l_loff_t)];
 };
+struct linux_writev_args {
+	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
+	char iovp_l_[PADL_(struct iovec *)]; struct iovec * iovp; char iovp_r_[PADR_(struct iovec *)];
+	char iovcnt_l_[PADL_(u_int)]; u_int iovcnt; char iovcnt_r_[PADR_(u_int)];
+};
 struct linux_access_args {
 	char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)];
 	char amode_l_[PADL_(l_int)]; l_int amode; char amode_r_[PADR_(l_int)];
@@ -1417,6 +1422,7 @@ int	linux_rt_sigreturn(struct thread *, struct linux_rt_sigreturn_args *);
 int	linux_ioctl(struct thread *, struct linux_ioctl_args *);
 int	linux_pread(struct thread *, struct linux_pread_args *);
 int	linux_pwrite(struct thread *, struct linux_pwrite_args *);
+int	linux_writev(struct thread *, struct linux_writev_args *);
 int	linux_access(struct thread *, struct linux_access_args *);
 int	linux_pipe(struct thread *, struct linux_pipe_args *);
 int	linux_select(struct thread *, struct linux_select_args *);
@@ -1715,6 +1721,7 @@ int	linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *);
 #define	LINUX_SYS_AUE_linux_ioctl	AUE_IOCTL
 #define	LINUX_SYS_AUE_linux_pread	AUE_PREAD
 #define	LINUX_SYS_AUE_linux_pwrite	AUE_PWRITE
+#define	LINUX_SYS_AUE_linux_writev	AUE_WRITEV
 #define	LINUX_SYS_AUE_linux_access	AUE_ACCESS
 #define	LINUX_SYS_AUE_linux_pipe	AUE_PIPE
 #define	LINUX_SYS_AUE_linux_select	AUE_SELECT
diff --git a/sys/amd64/linux/linux_syscall.h b/sys/amd64/linux/linux_syscall.h
index 45ba487f3a93..4755c673ab0f 100644
--- a/sys/amd64/linux/linux_syscall.h
+++ b/sys/amd64/linux/linux_syscall.h
@@ -24,7 +24,7 @@
 #define	LINUX_SYS_linux_pread	17
 #define	LINUX_SYS_linux_pwrite	18
 #define	LINUX_SYS_readv	19
-#define	LINUX_SYS_writev	20
+#define	LINUX_SYS_linux_writev	20
 #define	LINUX_SYS_linux_access	21
 #define	LINUX_SYS_linux_pipe	22
 #define	LINUX_SYS_linux_select	23
diff --git a/sys/amd64/linux/linux_syscalls.c b/sys/amd64/linux/linux_syscalls.c
index 57f65a0a6cbf..201daec24f67 100644
--- a/sys/amd64/linux/linux_syscalls.c
+++ b/sys/amd64/linux/linux_syscalls.c
@@ -26,7 +26,7 @@ const char *linux_syscallnames[] = {
 	"linux_pread",			/* 17 = linux_pread */
 	"linux_pwrite",			/* 18 = linux_pwrite */
 	"readv",			/* 19 = readv */
-	"writev",			/* 20 = writev */
+	"linux_writev",			/* 20 = linux_writev */
 	"linux_access",			/* 21 = linux_access */
 	"linux_pipe",			/* 22 = linux_pipe */
 	"linux_select",			/* 23 = linux_select */
diff --git a/sys/amd64/linux/linux_sysent.c b/sys/amd64/linux/linux_sysent.c
index 79557b3780b3..694a22060125 100644
--- a/sys/amd64/linux/linux_sysent.c
+++ b/sys/amd64/linux/linux_sysent.c
@@ -36,7 +36,7 @@ struct sysent linux_sysent[] = {
 	{ .sy_narg = AS(linux_pread_args), .sy_call = (sy_call_t *)linux_pread, .sy_auevent = AUE_PREAD, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 17 = linux_pread */
 	{ .sy_narg = AS(linux_pwrite_args), .sy_call = (sy_call_t *)linux_pwrite, .sy_auevent = AUE_PWRITE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 18 = linux_pwrite */
 	{ .sy_narg = AS(readv_args), .sy_call = (sy_call_t *)sys_readv, .sy_auevent = AUE_READV, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 19 = readv */
-	{ .sy_narg = AS(writev_args), .sy_call = (sy_call_t *)sys_writev, .sy_auevent = AUE_WRITEV, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 20 = writev */
+	{ .sy_narg = AS(linux_writev_args), .sy_call = (sy_call_t *)linux_writev, .sy_auevent = AUE_WRITEV, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 20 = linux_writev */
 	{ .sy_narg = AS(linux_access_args), .sy_call = (sy_call_t *)linux_access, .sy_auevent = AUE_ACCESS, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 21 = linux_access */
 	{ .sy_narg = AS(linux_pipe_args), .sy_call = (sy_call_t *)linux_pipe, .sy_auevent = AUE_PIPE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 22 = linux_pipe */
 	{ .sy_narg = AS(linux_select_args), .sy_call = (sy_call_t *)linux_select, .sy_auevent = AUE_SELECT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 23 = linux_select */
diff --git a/sys/amd64/linux/linux_systrace_args.c b/sys/amd64/linux/linux_systrace_args.c
index 5edef91239d3..9d53132063fa 100644
--- a/sys/amd64/linux/linux_systrace_args.c
+++ b/sys/amd64/linux/linux_systrace_args.c
@@ -189,9 +189,9 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
 		*n_args = 3;
 		break;
 	}
-	/* writev */
+	/* linux_writev */
 	case 20: {
-		struct writev_args *p = params;
+		struct linux_writev_args *p = params;
 		iarg[a++] = p->fd; /* int */
 		uarg[a++] = (intptr_t)p->iovp; /* struct iovec * */
 		uarg[a++] = p->iovcnt; /* u_int */
@@ -3073,7 +3073,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
 			break;
 		};
 		break;
-	/* writev */
+	/* linux_writev */
 	case 20:
 		switch (ndx) {
 		case 0:
@@ -7293,7 +7293,7 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
 		if (ndx == 0 || ndx == 1)
 			p = "int";
 		break;
-	/* writev */
+	/* linux_writev */
 	case 20:
 		if (ndx == 0 || ndx == 1)
 			p = "int";
diff --git a/sys/amd64/linux32/linux32_proto.h b/sys/amd64/linux32/linux32_proto.h
index 4934b22c1ca1..bf599df05c22 100644
--- a/sys/amd64/linux32/linux32_proto.h
+++ b/sys/amd64/linux32/linux32_proto.h
@@ -464,7 +464,7 @@ struct linux_readv_args {
 };
 struct linux_writev_args {
 	char fd_l_[PADL_(l_ulong)]; l_ulong fd; char fd_r_[PADR_(l_ulong)];
-	char iovp_l_[PADL_(struct l_iovec32 *)]; struct l_iovec32 * iovp; char iovp_r_[PADR_(struct l_iovec32 *)];
+	char iovp_l_[PADL_(struct iovec32 *)]; struct iovec32 * iovp; char iovp_r_[PADR_(struct iovec32 *)];
 	char iovcnt_l_[PADL_(l_ulong)]; l_ulong iovcnt; char iovcnt_r_[PADR_(l_ulong)];
 };
 struct linux_getsid_args {
diff --git a/sys/amd64/linux32/linux32_sysent.c b/sys/amd64/linux32/linux32_sysent.c
index b5513743bbee..a3570b9bfe5b 100644
--- a/sys/amd64/linux32/linux32_sysent.c
+++ b/sys/amd64/linux32/linux32_sysent.c
@@ -8,6 +8,7 @@
 #include <sys/sysent.h>
 #include <sys/sysproto.h>
 #include <compat/linux/linux_sysproto.h>
+#include <compat/freebsd32/freebsd32_util.h>
 #include <amd64/linux32/linux.h>
 #include <amd64/linux32/linux32_proto.h>
 
diff --git a/sys/amd64/linux32/linux32_systrace_args.c b/sys/amd64/linux32/linux32_systrace_args.c
index 82736cb221bf..ef00e9121233 100644
--- a/sys/amd64/linux32/linux32_systrace_args.c
+++ b/sys/amd64/linux32/linux32_systrace_args.c
@@ -979,7 +979,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
 	case 146: {
 		struct linux_writev_args *p = params;
 		iarg[a++] = p->fd; /* l_ulong */
-		uarg[a++] = (intptr_t)p->iovp; /* struct l_iovec32 * */
+		uarg[a++] = (intptr_t)p->iovp; /* struct iovec32 * */
 		iarg[a++] = p->iovcnt; /* l_ulong */
 		*n_args = 3;
 		break;
@@ -4753,7 +4753,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
 			p = "l_ulong";
 			break;
 		case 1:
-			p = "userland struct l_iovec32 *";
+			p = "userland struct iovec32 *";
 			break;
 		case 2:
 			p = "l_ulong";
diff --git a/sys/arm64/linux/linux_proto.h b/sys/arm64/linux/linux_proto.h
index f239bcb1463b..f24b7f25669d 100644
--- a/sys/arm64/linux/linux_proto.h
+++ b/sys/arm64/linux/linux_proto.h
@@ -275,6 +275,11 @@ struct linux_write_args {
 	char buf_l_[PADL_(char *)]; char * buf; char buf_r_[PADR_(char *)];
 	char nbyte_l_[PADL_(l_size_t)]; l_size_t nbyte; char nbyte_r_[PADR_(l_size_t)];
 };
+struct linux_writev_args {
+	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
+	char iovp_l_[PADL_(struct iovec *)]; struct iovec * iovp; char iovp_r_[PADR_(struct iovec *)];
+	char iovcnt_l_[PADL_(u_int)]; u_int iovcnt; char iovcnt_r_[PADR_(u_int)];
+};
 struct linux_pread_args {
 	char fd_l_[PADL_(l_uint)]; l_uint fd; char fd_r_[PADR_(l_uint)];
 	char buf_l_[PADL_(char *)]; char * buf; char buf_r_[PADR_(char *)];
@@ -1260,6 +1265,7 @@ int	linux_pipe2(struct thread *, struct linux_pipe2_args *);
 int	linux_getdents64(struct thread *, struct linux_getdents64_args *);
 int	linux_lseek(struct thread *, struct linux_lseek_args *);
 int	linux_write(struct thread *, struct linux_write_args *);
+int	linux_writev(struct thread *, struct linux_writev_args *);
 int	linux_pread(struct thread *, struct linux_pread_args *);
 int	linux_pwrite(struct thread *, struct linux_pwrite_args *);
 int	linux_preadv(struct thread *, struct linux_preadv_args *);
@@ -1509,6 +1515,7 @@ int	linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *);
 #define	LINUX_SYS_AUE_linux_getdents64	AUE_GETDIRENTRIES
 #define	LINUX_SYS_AUE_linux_lseek	AUE_LSEEK
 #define	LINUX_SYS_AUE_linux_write	AUE_NULL
+#define	LINUX_SYS_AUE_linux_writev	AUE_WRITEV
 #define	LINUX_SYS_AUE_linux_pread	AUE_PREAD
 #define	LINUX_SYS_AUE_linux_pwrite	AUE_PWRITE
 #define	LINUX_SYS_AUE_linux_preadv	AUE_NULL
diff --git a/sys/arm64/linux/linux_syscall.h b/sys/arm64/linux/linux_syscall.h
index 3307005a74c0..f331bec5dc4f 100644
--- a/sys/arm64/linux/linux_syscall.h
+++ b/sys/arm64/linux/linux_syscall.h
@@ -62,7 +62,7 @@
 #define	LINUX_SYS_read	63
 #define	LINUX_SYS_linux_write	64
 #define	LINUX_SYS_readv	65
-#define	LINUX_SYS_writev	66
+#define	LINUX_SYS_linux_writev	66
 #define	LINUX_SYS_linux_pread	67
 #define	LINUX_SYS_linux_pwrite	68
 #define	LINUX_SYS_linux_preadv	69
diff --git a/sys/arm64/linux/linux_syscalls.c b/sys/arm64/linux/linux_syscalls.c
index 86b3c012c0b2..8bf57f971c54 100644
--- a/sys/arm64/linux/linux_syscalls.c
+++ b/sys/arm64/linux/linux_syscalls.c
@@ -72,7 +72,7 @@ const char *linux_syscallnames[] = {
 	"read",			/* 63 = read */
 	"linux_write",			/* 64 = linux_write */
 	"readv",			/* 65 = readv */
-	"writev",			/* 66 = writev */
+	"linux_writev",			/* 66 = linux_writev */
 	"linux_pread",			/* 67 = linux_pread */
 	"linux_pwrite",			/* 68 = linux_pwrite */
 	"linux_preadv",			/* 69 = linux_preadv */
diff --git a/sys/arm64/linux/linux_sysent.c b/sys/arm64/linux/linux_sysent.c
index 940391dd175e..3bc2e2ad96d9 100644
--- a/sys/arm64/linux/linux_sysent.c
+++ b/sys/arm64/linux/linux_sysent.c
@@ -82,7 +82,7 @@ struct sysent linux_sysent[] = {
 	{ .sy_narg = AS(read_args), .sy_call = (sy_call_t *)sys_read, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 63 = read */
 	{ .sy_narg = AS(linux_write_args), .sy_call = (sy_call_t *)linux_write, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 64 = linux_write */
 	{ .sy_narg = AS(readv_args), .sy_call = (sy_call_t *)sys_readv, .sy_auevent = AUE_READV, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 65 = readv */
-	{ .sy_narg = AS(writev_args), .sy_call = (sy_call_t *)sys_writev, .sy_auevent = AUE_WRITEV, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 66 = writev */
+	{ .sy_narg = AS(linux_writev_args), .sy_call = (sy_call_t *)linux_writev, .sy_auevent = AUE_WRITEV, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 66 = linux_writev */
 	{ .sy_narg = AS(linux_pread_args), .sy_call = (sy_call_t *)linux_pread, .sy_auevent = AUE_PREAD, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 67 = linux_pread */
 	{ .sy_narg = AS(linux_pwrite_args), .sy_call = (sy_call_t *)linux_pwrite, .sy_auevent = AUE_PWRITE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 68 = linux_pwrite */
 	{ .sy_narg = AS(linux_preadv_args), .sy_call = (sy_call_t *)linux_preadv, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 69 = linux_preadv */
diff --git a/sys/arm64/linux/linux_systrace_args.c b/sys/arm64/linux/linux_systrace_args.c
index 06f973cebe37..60daffbb420f 100644
--- a/sys/arm64/linux/linux_systrace_args.c
+++ b/sys/arm64/linux/linux_systrace_args.c
@@ -510,9 +510,9 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
 		*n_args = 3;
 		break;
 	}
-	/* writev */
+	/* linux_writev */
 	case 66: {
-		struct writev_args *p = params;
+		struct linux_writev_args *p = params;
 		iarg[a++] = p->fd; /* int */
 		uarg[a++] = (intptr_t)p->iovp; /* struct iovec * */
 		uarg[a++] = p->iovcnt; /* u_int */
@@ -3235,7 +3235,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
 			break;
 		};
 		break;
-	/* writev */
+	/* linux_writev */
 	case 66:
 		switch (ndx) {
 		case 0:
@@ -6543,7 +6543,7 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
 		if (ndx == 0 || ndx == 1)
 			p = "int";
 		break;
-	/* writev */
+	/* linux_writev */
 	case 66:
 		if (ndx == 0 || ndx == 1)
 			p = "int";
diff --git a/sys/i386/linux/linux_proto.h b/sys/i386/linux/linux_proto.h
index 5b58629d7b92..5baec9364d5b 100644
--- a/sys/i386/linux/linux_proto.h
+++ b/sys/i386/linux/linux_proto.h
@@ -461,6 +461,11 @@ struct linux_msync_args {
 	char len_l_[PADL_(l_size_t)]; l_size_t len; char len_r_[PADR_(l_size_t)];
 	char fl_l_[PADL_(l_int)]; l_int fl; char fl_r_[PADR_(l_int)];
 };
+struct linux_writev_args {
+	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
+	char iovp_l_[PADL_(struct iovec *)]; struct iovec * iovp; char iovp_r_[PADR_(struct iovec *)];
+	char iovcnt_l_[PADL_(u_int)]; u_int iovcnt; char iovcnt_r_[PADR_(u_int)];
+};
 struct linux_getsid_args {
 	char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
 };
@@ -1803,6 +1808,7 @@ int	linux_llseek(struct thread *, struct linux_llseek_args *);
 int	linux_getdents(struct thread *, struct linux_getdents_args *);
 int	linux_select(struct thread *, struct linux_select_args *);
 int	linux_msync(struct thread *, struct linux_msync_args *);
+int	linux_writev(struct thread *, struct linux_writev_args *);
 int	linux_getsid(struct thread *, struct linux_getsid_args *);
 int	linux_fdatasync(struct thread *, struct linux_fdatasync_args *);
 int	linux_sysctl(struct thread *, struct linux_sysctl_args *);
@@ -2168,6 +2174,7 @@ int	linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *);
 #define	LINUX_SYS_AUE_linux_getdents	AUE_GETDIRENTRIES
 #define	LINUX_SYS_AUE_linux_select	AUE_SELECT
 #define	LINUX_SYS_AUE_linux_msync	AUE_MSYNC
+#define	LINUX_SYS_AUE_linux_writev	AUE_WRITEV
 #define	LINUX_SYS_AUE_linux_getsid	AUE_GETSID
 #define	LINUX_SYS_AUE_linux_fdatasync	AUE_NULL
 #define	LINUX_SYS_AUE_linux_sysctl	AUE_SYSCTL
diff --git a/sys/i386/linux/linux_syscall.h b/sys/i386/linux/linux_syscall.h
index aafcd849634f..96aa0fbc1815 100644
--- a/sys/i386/linux/linux_syscall.h
+++ b/sys/i386/linux/linux_syscall.h
@@ -135,7 +135,7 @@
 #define	LINUX_SYS_flock	143
 #define	LINUX_SYS_linux_msync	144
 #define	LINUX_SYS_readv	145
-#define	LINUX_SYS_writev	146
+#define	LINUX_SYS_linux_writev	146
 #define	LINUX_SYS_linux_getsid	147
 #define	LINUX_SYS_linux_fdatasync	148
 #define	LINUX_SYS_linux_sysctl	149
diff --git a/sys/i386/linux/linux_syscalls.c b/sys/i386/linux/linux_syscalls.c
index b6076e9115c2..ebb3fafca78d 100644
--- a/sys/i386/linux/linux_syscalls.c
+++ b/sys/i386/linux/linux_syscalls.c
@@ -152,7 +152,7 @@ const char *linux_syscallnames[] = {
 	"flock",			/* 143 = flock */
 	"linux_msync",			/* 144 = linux_msync */
 	"readv",			/* 145 = readv */
-	"writev",			/* 146 = writev */
+	"linux_writev",			/* 146 = linux_writev */
 	"linux_getsid",			/* 147 = linux_getsid */
 	"linux_fdatasync",			/* 148 = linux_fdatasync */
 	"linux_sysctl",			/* 149 = linux_sysctl */
diff --git a/sys/i386/linux/linux_sysent.c b/sys/i386/linux/linux_sysent.c
index be84f04ac9be..c293f2173e8c 100644
--- a/sys/i386/linux/linux_sysent.c
+++ b/sys/i386/linux/linux_sysent.c
@@ -162,7 +162,7 @@ struct sysent linux_sysent[] = {
 	{ .sy_narg = AS(flock_args), .sy_call = (sy_call_t *)sys_flock, .sy_auevent = AUE_FLOCK, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 143 = flock */
 	{ .sy_narg = AS(linux_msync_args), .sy_call = (sy_call_t *)linux_msync, .sy_auevent = AUE_MSYNC, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 144 = linux_msync */
 	{ .sy_narg = AS(readv_args), .sy_call = (sy_call_t *)sys_readv, .sy_auevent = AUE_READV, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 145 = readv */
-	{ .sy_narg = AS(writev_args), .sy_call = (sy_call_t *)sys_writev, .sy_auevent = AUE_WRITEV, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 146 = writev */
+	{ .sy_narg = AS(linux_writev_args), .sy_call = (sy_call_t *)linux_writev, .sy_auevent = AUE_WRITEV, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 146 = linux_writev */
 	{ .sy_narg = AS(linux_getsid_args), .sy_call = (sy_call_t *)linux_getsid, .sy_auevent = AUE_GETSID, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 147 = linux_getsid */
 	{ .sy_narg = AS(linux_fdatasync_args), .sy_call = (sy_call_t *)linux_fdatasync, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 148 = linux_fdatasync */
 	{ .sy_narg = AS(linux_sysctl_args), .sy_call = (sy_call_t *)linux_sysctl, .sy_auevent = AUE_SYSCTL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 149 = linux_sysctl */
diff --git a/sys/i386/linux/linux_systrace_args.c b/sys/i386/linux/linux_systrace_args.c
index b6470cb66583..0bd681c68b6c 100644
--- a/sys/i386/linux/linux_systrace_args.c
+++ b/sys/i386/linux/linux_systrace_args.c
@@ -1005,9 +1005,9 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
 		*n_args = 3;
 		break;
 	}
-	/* writev */
+	/* linux_writev */
 	case 146: {
-		struct writev_args *p = params;
+		struct linux_writev_args *p = params;
 		iarg[a++] = p->fd; /* int */
 		uarg[a++] = (intptr_t)p->iovp; /* struct iovec * */
 		uarg[a++] = p->iovcnt; /* u_int */
@@ -4822,7 +4822,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
 			break;
 		};
 		break;
-	/* writev */
+	/* linux_writev */
 	case 146:
 		switch (ndx) {
 		case 0:
@@ -9214,7 +9214,7 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
 		if (ndx == 0 || ndx == 1)
 			p = "int";
 		break;
-	/* writev */
+	/* linux_writev */
 	case 146:
 		if (ndx == 0 || ndx == 1)
 			p = "int";