git: aad4b799f78a - main - linux(4): Add a writev syscall wrapper

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

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

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

    linux(4): Add a writev syscall wrapper
    
    Adding a writev syscall wrapper is needed due to Linux family of write
    syscalls doesn't distinguish between in kernel blocking operations
    and always returns EAGAIN while FreeBSD can return ENOBUFS.
    
    MFC after:              1 month
---
 sys/amd64/linux/syscalls.master   | 4 ++--
 sys/amd64/linux32/syscalls.master | 3 ++-
 sys/arm64/linux/syscalls.master   | 4 ++--
 sys/i386/linux/syscalls.master    | 4 ++--
 4 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/sys/amd64/linux/syscalls.master b/sys/amd64/linux/syscalls.master
index 885192963728..88caaa49367b 100644
--- a/sys/amd64/linux/syscalls.master
+++ b/sys/amd64/linux/syscalls.master
@@ -176,8 +176,8 @@
 		    u_int iovcnt
 		);
 	}
-20	AUE_WRITEV	NOPROTO {
-		int writev(
+20	AUE_WRITEV	STD {
+		int linux_writev(
 		    int fd,
 		    struct iovec *iovp,
 		    u_int iovcnt
diff --git a/sys/amd64/linux32/syscalls.master b/sys/amd64/linux32/syscalls.master
index aa3e420053f4..5ebbe3f6e55d 100644
--- a/sys/amd64/linux32/syscalls.master
+++ b/sys/amd64/linux32/syscalls.master
@@ -33,6 +33,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>
 
@@ -775,7 +776,7 @@
 146	AUE_WRITEV	STD  {
 		int linux_writev(
 		    l_ulong fd,
-		    struct l_iovec32 *iovp,
+		    struct iovec32 *iovp,
 		    l_ulong iovcnt
 		);
 	}
diff --git a/sys/arm64/linux/syscalls.master b/sys/arm64/linux/syscalls.master
index 90c6fcfc4642..daaeeef1acc2 100644
--- a/sys/arm64/linux/syscalls.master
+++ b/sys/arm64/linux/syscalls.master
@@ -406,8 +406,8 @@
 		    u_int iovcnt
 		);
 	}
-66	AUE_WRITEV	NOPROTO	{
-		int writev(
+66	AUE_WRITEV	STD	{
+		int linux_writev(
 		    int fd,
 		    struct iovec *iovp,
 		    u_int iovcnt
diff --git a/sys/i386/linux/syscalls.master b/sys/i386/linux/syscalls.master
index 81473ef776aa..6144deeb31ab 100644
--- a/sys/i386/linux/syscalls.master
+++ b/sys/i386/linux/syscalls.master
@@ -790,8 +790,8 @@
 		    u_int iovcnt
 		);
 	}
-146	AUE_WRITEV	NOPROTO {
-		int writev(
+146	AUE_WRITEV	STD {
+		int linux_writev(
 		    int fd,
 		    struct iovec *iovp,
 		    u_int iovcnt