Skip to content

[GIT PULL] syscall: update io_uring_enter2() signature#1401

Merged
axboe merged 1 commit intoaxboe:masterfrom
calebsander:fix/io_uring_enter2-signature
May 14, 2025
Merged

[GIT PULL] syscall: update io_uring_enter2() signature#1401
axboe merged 1 commit intoaxboe:masterfrom
calebsander:fix/io_uring_enter2-signature

Conversation

@calebsander
Copy link
Contributor

Since kernel 5.11, io_uring_enter2() accepts a IORING_ENTER_EXT_ARG flag allowing a struct io_uring_getevents_arg * to be passed in place of the sigset_t * argument. Kernel 6.12 adds the IORING_ENTER_EXT_ARG_REG flag, which interprets the argument as an offset into a region of struct io_uring_reg_wait's registered with IORING_REGISTER_CQWAIT_REG.

Kernel 5.11 was released over 4 years ago, so it seems more accurate for the argument type to be a void * rather than a sigset_t *. Change the argument type and rename it from "sig" to "arg" to match the man page. Using void * removes the need for a confusing pointer cast for callers passing struct io_uring_getevents_arg *.


git request-pull output:

The following changes since commit 47eacd321f107eb53b1d872d5a376ba7885e8e76:

  Merge branch 'master' of https://github.com/Sberm/liburing (2025-05-07 17:03:21 -0600)

are available in the Git repository at:

  git@github.com:calebsander/liburing.git fix/io_uring_enter2-signature

for you to fetch changes up to 99dbb397550f7318a0c14900e4435795602f028c:

  syscall: update io_uring_enter2() signature (2025-05-14 10:45:28 -0600)

----------------------------------------------------------------
Caleb Sander Mateos (1):
      syscall: update io_uring_enter2() signature

 man/io_uring_enter.2       | 25 ++++++++++---------------
 src/arch/generic/syscall.h |  4 ++--
 src/arch/syscall-defs.h    |  4 ++--
 src/include/liburing.h     |  2 +-
 src/syscall.c              |  4 ++--
 test/wait-timeout.c        |  2 +-
 6 files changed, 18 insertions(+), 23 deletions(-)

By submitting this pull request, I acknowledge that:

  1. I have followed the above pull request guidelines.
  2. I have the rights to submit this work under the same license.
  3. I agree to a Developer Certificate of Origin (see https://developercertificate.org for more information).

Since kernel 5.11, io_uring_enter2() accepts a IORING_ENTER_EXT_ARG flag
allowing a struct io_uring_getevents_arg * to be passed in place of the
sigset_t * argument. Kernel 6.12 adds the IORING_ENTER_EXT_ARG_REG flag,
which interprets the argument as an offset into a region of
struct io_uring_reg_wait's registered with IORING_REGISTER_CQWAIT_REG.

Kernel 5.11 was released over 4 years ago, so it seems more accurate for
the argument type to be a void * rather than a sigset_t *. Change the
argument type and rename it from "sig" to "arg" to match the man page.
Using void * removes the need for a confusing pointer cast for callers
passing struct io_uring_getevents_arg *.

Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
@axboe axboe merged commit 4ee26f8 into axboe:master May 14, 2025
16 checks passed
@calebsander calebsander deleted the fix/io_uring_enter2-signature branch May 14, 2025 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants