From nobody Sun Aug 20 07:37:55 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RT6sH6XNmz4qsHb; Sun, 20 Aug 2023 07:37:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RT6sH3ZHxz3DhS; Sun, 20 Aug 2023 07:37:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692517075; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GRe9HtK6HHe8u/7zf7tPuJOlYul8TAI8haE/GRD8dZA=; b=FmCXChqBnP2fMEbGFeKzdMo9WUfzIs+MkQybyvuWbChDOO9bbsEMzKCBlbzdujREGTU9Ey xm2/7PJm2knA1gnAQ7fIHDCFYaBpi0UjVz8HocXqTREEHUYmy500D6Ad3bftAQENYkH3dQ 5ih0ob+f8cV2yKvbGgr9JXguhRmuwqtxOuFgj47zOW8iYOlUFg4vfwQ2uCzBvw0Gu1FRFV OPmYEERSqJfOvkxHcCKWXJyNQvHUqv4RPdAVFiK+8Y0IccD0XeIEbx2oMcGFsRvrKc7PN5 qFwug/NQ1z4vO9X0hIFYy6IPPE82zFE4qdFUAIY1uFfntjlM3LQza6XW9UeseQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692517075; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GRe9HtK6HHe8u/7zf7tPuJOlYul8TAI8haE/GRD8dZA=; b=EDo/4gnUlBdXLJX4gId+XPJuIOeP3LOuaH9QV4LHeuhdNvexT87YjHGAe2L9jqsIB25ICJ zoXygIycPrQy4PBEvxGnkxYvdcC1d3CrgJbnkbOKDZRRuXIN+R0BlpaX+KfDr6nfo29Qfz yfIskZDWXF9E8TbcA2VvLAmfkz4Z/C8Dfxo+zEqfA9HsCeutsUT07wvaWYk4o7wQpk/UTH +DbQaAUYz4DcoVtVmf/LjFbVeOChWqFYW3COIw8LC//m2ZQNlNAxtb78LhgImA7w427Vii x5KwjSyizsO94hcr8PbPYzKS0r44ltFLcdIfPflGUaHjfeG9P/QXz3cXNBQHUA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1692517075; a=rsa-sha256; cv=none; b=lAeJEwKpARlOOBAN2SmwaGN66/QelY+4Jp5C80xy+jLzuUapLgqW74+trIfhWI7qEsICRe gQuWURIdTWn6MKFBlomnqEAzZrPaXW4rE1Nge4WLUhZPKVktgAdm+G3w7wmvaF2h5bt9Ge OrqGloYBUtPG1R6j6WDxJctjoHN7PGHVbDRkmqlMDjedJI5GlE2xKZ+8PiNMqtXPXb5izc gpr7qXZYlh0fPHeHDsRK/jfBqzKEB/nn5PJ8rj1boc/U3nIcXY55/MgugfGMg+17OXKR7w YpAPPvQXTJi0MH8f9a0Xoare/bons1rdC+a99ZvDoBDjTAgttw7k5QtDmmIYYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RT6sH239VzWhq; Sun, 20 Aug 2023 07:37:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37K7btEK050034; Sun, 20 Aug 2023 07:37:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37K7btKK050031; Sun, 20 Aug 2023 07:37:55 GMT (envelope-from git) Date: Sun, 20 Aug 2023 07:37:55 GMT Message-Id: <202308200737.37K7btKK050031@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 524c9accdcc6 - main - linux(4): Replace linux32_copyiniov by freebsd32_copyiniov List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 524c9accdcc6dddb0bac23ae6120763af3458464 Auto-Submitted: auto-generated The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=524c9accdcc6dddb0bac23ae6120763af3458464 commit 524c9accdcc6dddb0bac23ae6120763af3458464 Author: Dmitry Chagin AuthorDate: 2023-08-20 07:36:32 +0000 Commit: Dmitry Chagin CommitDate: 2023-08-20 07:36:32 +0000 linux(4): Replace linux32_copyiniov by freebsd32_copyiniov MFC after: 1 month --- sys/amd64/linux32/linux.h | 10 ---------- sys/amd64/linux32/linux32_machdep.c | 30 ------------------------------ sys/compat/linux/linux_socket.c | 5 +++-- 3 files changed, 3 insertions(+), 42 deletions(-) diff --git a/sys/amd64/linux32/linux.h b/sys/amd64/linux32/linux.h index 382d010f9ed8..395548b3c93f 100644 --- a/sys/amd64/linux32/linux.h +++ b/sys/amd64/linux32/linux.h @@ -388,16 +388,6 @@ struct l_user_desc { (((desc)->b >> LINUX_ENTRY_B_USEABLE) & 1) #ifdef _KERNEL -struct iovec; -struct uio; - -struct l_iovec32 { - uint32_t iov_base; - l_size_t iov_len; -}; - -int linux32_copyiniov(struct l_iovec32 *iovp32, l_ulong iovcnt, - struct iovec **iovp, int error); int linux_copyout_rusage(struct rusage *ru, void *uaddr); #endif /* _KERNEL */ diff --git a/sys/amd64/linux32/linux32_machdep.c b/sys/amd64/linux32/linux32_machdep.c index e0364f1e00d1..f6b14d8e4653 100644 --- a/sys/amd64/linux32/linux32_machdep.c +++ b/sys/amd64/linux32/linux32_machdep.c @@ -111,36 +111,6 @@ linux_copyout_rusage(struct rusage *ru, void *uaddr) return (copyout(&lru, uaddr, sizeof(struct l_rusage))); } -CTASSERT(sizeof(struct l_iovec32) == 8); - -int -linux32_copyiniov(struct l_iovec32 *iovp32, l_ulong iovcnt, struct iovec **iovp, - int error) -{ - struct l_iovec32 iov32; - struct iovec *iov; - uint32_t iovlen; - int i; - - *iovp = NULL; - if (iovcnt > UIO_MAXIOV) - return (error); - iovlen = iovcnt * sizeof(struct iovec); - iov = malloc(iovlen, M_IOV, M_WAITOK); - for (i = 0; i < iovcnt; i++) { - error = copyin(&iovp32[i], &iov32, sizeof(struct l_iovec32)); - if (error) { - free(iov, M_IOV); - return (error); - } - iov[i].iov_base = PTRIN(iov32.iov_base); - iov[i].iov_len = iov32.iov_len; - } - *iovp = iov; - return(0); - -} - int linux_readv(struct thread *td, struct linux_readv_args *uap) { diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c index 834c2c938925..a5ed5c5c62db 100644 --- a/sys/compat/linux/linux_socket.c +++ b/sys/compat/linux/linux_socket.c @@ -57,6 +57,7 @@ #endif #ifdef COMPAT_LINUX32 +#include #include #include #else @@ -1384,7 +1385,7 @@ linux_sendmsg_common(struct thread *td, l_int s, struct l_msghdr *msghdr, return (error); #ifdef COMPAT_LINUX32 - error = linux32_copyiniov(PTRIN(msg.msg_iov), msg.msg_iovlen, + error = freebsd32_copyiniov(PTRIN(msg.msg_iov), msg.msg_iovlen, &iov, EMSGSIZE); #else error = copyiniov(msg.msg_iov, msg.msg_iovlen, &iov, EMSGSIZE); @@ -1794,7 +1795,7 @@ linux_recvmsg_common(struct thread *td, l_int s, struct l_msghdr *msghdr, return (error); #ifdef COMPAT_LINUX32 - error = linux32_copyiniov(PTRIN(msg->msg_iov), msg->msg_iovlen, + error = freebsd32_copyiniov(PTRIN(msg->msg_iov), msg->msg_iovlen, &iov, EMSGSIZE); #else error = copyiniov(msg->msg_iov, msg->msg_iovlen, &iov, EMSGSIZE);