liburing fixes
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
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");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```--- src/sanitize.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
src/sanitize.c +2 -1
@@ -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
PATCH 2/2 liburing: Don't use `IOURINGINLINE` on `__io_uring_prep_poll_mask`
In reply to Ammar FaiziNot exported for FFI.
--- src/include/liburing.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
src/include/liburing.h +1 -1
@@ -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
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_PIPEinsanitize.c.- Don't use
IOURINGINLINEon__io_uring_prep_poll_maskas 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: 6d3d27bc42733f5a407424c76aadcc84bd4b0cf0Best regards,
Signature · 1 line
Jens Axboe