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

guoren
2025-03-25T12:23:28Z

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 --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 {
--
2.40.1