public inbox for io-uring@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] io_uring: don't use int for ABI
@ 2025-07-02 20:31 Pavel Begunkov
  2025-07-02 23:19 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Pavel Begunkov @ 2025-07-02 20:31 UTC (permalink / raw)
  To: io-uring; +Cc: asml.silence

__kernel_rwf_t is defined as int, the actual size of which is
implementation defined. It won't go well if some compiler / archs
ever defines it as i64, so replace it with __u32, hoping that
there is no one using i16 for it.

Cc: stable@vger.kernel.org
Fixes: 2b188cc1bb857 ("Add io_uring IO interface")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
---
 include/uapi/linux/io_uring.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/uapi/linux/io_uring.h b/include/uapi/linux/io_uring.h
index 85600ad0ac08..fe45564579ab 100644
--- a/include/uapi/linux/io_uring.h
+++ b/include/uapi/linux/io_uring.h
@@ -50,7 +50,7 @@ struct io_uring_sqe {
 	};
 	__u32	len;		/* buffer size or number of iovecs */
 	union {
-		__kernel_rwf_t	rw_flags;
+		__u32		rw_flags;
 		__u32		fsync_flags;
 		__u16		poll_events;	/* compatibility */
 		__u32		poll32_events;	/* word-reversed for BE */
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] io_uring: don't use int for ABI
  2025-07-02 20:31 [PATCH 1/1] io_uring: don't use int for ABI Pavel Begunkov
@ 2025-07-02 23:19 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2025-07-02 23:19 UTC (permalink / raw)
  To: io-uring, Pavel Begunkov


On Wed, 02 Jul 2025 21:31:54 +0100, Pavel Begunkov wrote:
> __kernel_rwf_t is defined as int, the actual size of which is
> implementation defined. It won't go well if some compiler / archs
> ever defines it as i64, so replace it with __u32, hoping that
> there is no one using i16 for it.
> 
> 

Applied, thanks!

[1/1] io_uring: don't use int for ABI
      commit: cf73d9970ea4f8cace5d8f02d2565a2723003112

Best regards,
-- 
Jens Axboe




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-07-02 23:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-02 20:31 [PATCH 1/1] io_uring: don't use int for ABI Pavel Begunkov
2025-07-02 23:19 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox