[GIT PULL] syscall: update io_uring_enter2() signature#1401
Merged
axboe merged 1 commit intoaxboe:masterfrom May 14, 2025
calebsander:fix/io_uring_enter2-signature
Merged
[GIT PULL] syscall: update io_uring_enter2() signature#1401axboe merged 1 commit intoaxboe:masterfrom calebsander:fix/io_uring_enter2-signature
axboe merged 1 commit intoaxboe:masterfrom
calebsander:fix/io_uring_enter2-signature
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since kernel 5.11,
io_uring_enter2()accepts aIORING_ENTER_EXT_ARGflag allowing astruct io_uring_getevents_arg *to be passed in place of thesigset_t *argument. Kernel 6.12 adds theIORING_ENTER_EXT_ARG_REGflag, which interprets the argument as an offset into a region ofstruct io_uring_reg_wait's registered withIORING_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 asigset_t *. Change the argument type and rename it from "sig" to "arg" to match the man page. Usingvoid *removes the need for a confusing pointer cast for callers passingstruct io_uring_getevents_arg *.git request-pull output:
By submitting this pull request, I acknowledge that: