Skip to contentSkip to conversation

liburing fixes

PATCH Applied Ammar Faizi 2 participants 4 messages Jul 25, 2025 io_uring

lore
Share & tools
lore
#0 lore raw

cover liburing fixes

Hi Jens,

Hopefully, not too late for 2.12. Two small final fixes here:

- Fix build error when using address sanitizer due to missing IORING_OP_PIPE in sanitize.c.

- Don't use IOURINGINLINE on __io_uring_prep_poll_mask as it is not a function that should be exported in the FFI API.

---

Ammar Faizi (2):
sanitize: Fix missing IORING_OP_PIPE
liburing: Don't use IOURINGINLINE on __io_uring_prep_poll_mask

 src/include/liburing.h | 2 +-
 src/sanitize.c         | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

base-commit: ec856cecab2ed4bcbdba2b06a8c7cb5a52083c28

Signature · 1 line
Ammar Faizi
#1 lore raw

PATCH 1/2 sanitize: Fix missing `IORING_OP_PIPE`

Fix build error due to missing IORING_OP_PIPE.

```
 sanitize.c:122:17: error: static assertion failed due to requirement \
 'IORING_OP_WRITEV_FIXED + 1 == IORING_OP_LAST': Need an implementation \
 for all IORING_OP_* codes
  122 |         _Static_assert(IORING_OP_WRITEV_FIXED + 1 == IORING_OP_LAST,\
                               "Need an implementation for all IORING_OP_* codes");
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
Fixes eca641e0ea37 ("Add support for IORING_OP_PIPE")
Cc Michael de Lang <[email protected]>
---
 src/sanitize.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
src/sanitize.c +2 -1
index 48f794545999..383b7d64bbf2 100644
@@ -119,7 +119,8 @@ static inline void initialize_sanitize_handlers()
 	sanitize_handlers[IORING_OP_EPOLL_WAIT] = sanitize_sqe_addr;
 	sanitize_handlers[IORING_OP_READV_FIXED] = sanitize_sqe_addr;
 	sanitize_handlers[IORING_OP_WRITEV_FIXED] = sanitize_sqe_addr;
-	_Static_assert(IORING_OP_WRITEV_FIXED + 1 == IORING_OP_LAST, "Need an implementation for all IORING_OP_* codes");
+	sanitize_handlers[IORING_OP_PIPE] = sanitize_sqe_addr;
+	_Static_assert(IORING_OP_PIPE + 1 == IORING_OP_LAST, "Need an implementation for all IORING_OP_* codes");
 	sanitize_handlers_initialized = true;
 }
 
Signature · 1 line
Ammar Faizi
#2 lore raw

PATCH 2/2 liburing: Don't use `IOURINGINLINE` on `__io_uring_prep_poll_mask`

In reply to Ammar Faizi

Not exported for FFI.

Cc Christian Mazakas <[email protected]>
---
 src/include/liburing.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/include/liburing.h +1 -1
index dda0d5c4facd..83434f6eca65 100644
@@ -704,7 +704,7 @@ IOURINGINLINE void io_uring_prep_sendmsg(struct io_uring_sqe *sqe, int fd,
 	sqe->msg_flags = flags;
 }
 
-IOURINGINLINE unsigned __io_uring_prep_poll_mask(unsigned poll_mask)
+static inline unsigned __io_uring_prep_poll_mask(unsigned poll_mask)
 	LIBURING_NOEXCEPT
 {
 #if __BYTE_ORDER == __BIG_ENDIAN
Signature · 1 line
Ammar Faizi
maintainer Applied
#3 lore raw
In reply to Ammar Faizi
Quoted 9 lines · Ammar Faizi

Hopefully, not too late for 2.12. Two small final fixes here:

- Fix build error when using address sanitizer due to missing IORING_OP_PIPE in sanitize.c.

- Don't use IOURINGINLINE on __io_uring_prep_poll_mask as it is not a function that should be exported in the FFI API.

[...]

Applied, thanks!

[1/2] sanitize: Fix missing IORING_OP_PIPE

      commit: ed54d3b7e324220f70dac48b83df4e61763bf844
[2/2] liburing: Don't use `IOURINGINLINE` on `__io_uring_prep_poll_mask`
      commit: 6d3d27bc42733f5a407424c76aadcc84bd4b0cf0

Best regards,

Signature · 1 line
Jens Axboe