diff mbox series

[RFC,V3,28/43] rv64ilp32_abi: iov_iter: Resize kvec to match iov_iter's size

Message ID 20250325121624.523258-29-guoren@kernel.org (mailing list archive)
State New
Headers show
Series rv64ilp32_abi: Build CONFIG_64BIT kernel-self with ILP32 ABI | expand

Commit Message

Guo Ren March 25, 2025, 12:16 p.m. UTC
From: "Guo Ren (Alibaba DAMO Academy)" <guoren@kernel.org>

As drivers/vhost/vringh.c uses BUILD_BUG_ON(sizeof(struct iovec)
!= sizeof(struct kvec)), make them the same.

Signed-off-by: Guo Ren (Alibaba DAMO Academy) <guoren@kernel.org>
---
 include/linux/uio.h | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox series

Patch

diff --git a/include/linux/uio.h b/include/linux/uio.h
index 8ada84e85447..0e1ca023374c 100644
--- a/include/linux/uio.h
+++ b/include/linux/uio.h
@@ -17,7 +17,13 @@  typedef unsigned int __bitwise iov_iter_extraction_t;
 
 struct kvec {
 	void *iov_base; /* and that should *never* hold a userland pointer */
+#if defined(CONFIG_64BIT) && (BITS_PER_LONG == 32)
+	u32  __pad1;
+#endif
 	size_t iov_len;
+#if defined(CONFIG_64BIT) && (BITS_PER_LONG == 32)
+	u32  __pad2;
+#endif
 };
 
 enum iter_type {