Pull io_uring updates from Jens Axboe: "Mostly just come fixes and cleanups, but one feature as well. In detail: - Harden the check for handling IOPOLL based on return (Pavel) - Various minor optimizations (Pavel) - Drop remnants of SCM_RIGHTS fd passing support, now that it's no longer supported since 6.7 (me) - Fix for a case where bytes_done wasn't initialized properly on a failure condition for read/write requests (me) - Move the register related code to a separate file (me) - Add support for returning the provided ring buffer head (me) - Add support for adding a direct descriptor to the normal file table (me, Christian Brauner) - Fix for ensuring pending task_work for a ring with DEFER_TASKRUN is run even if we timeout waiting (me)" * tag 'for-6.8/io_uring-2024-01-08' of git://git.kernel.dk/linux: io_uring: ensure local task_work is run on wait timeout io_uring/kbuf: add method for returning provided buffer ring head io_uring/rw: ensure io->bytes_done is always initialized io_uring: drop any code related to SCM_RIGHTS io_uring/unix: drop usage of io_uring socket io_uring/register: move io_uring_register(2) related code to register.c io_uring/openclose: add support for IORING_OP_FIXED_FD_INSTALL io_uring/cmd: inline io_uring_cmd_get_task io_uring/cmd: inline io_uring_cmd_do_in_task_lazy io_uring: split out cmd api into a separate header io_uring: optimise ltimeout for inline execution io_uring: don't check iopoll if request completes
Showing the changes to include/uapi (1 of 26 files). Show all
Unified · Split
| @@ -71,6 +71,7 @@ struct io_uring_sqe { · 70 unmodified lines | ||
| 71 | 71 | __u32 uring_cmd_flags; |
| 72 | 72 | __u32 waitid_flags; |
| 73 | 73 | __u32 futex_flags; |
| 74 | + __u32 install_fd_flags; | |
| 74 | 75 | }; |
| 75 | 76 | __u64 user_data; /* data to be passed back at completion time */ |
| 76 | 77 | /* pack this to avoid bogus arm OABI complaints */ |
| @@ -253,6 +254,7 @@ enum io_uring_op { · 176 unmodified lines | ||
| 253 | 254 | IORING_OP_FUTEX_WAIT, |
| 254 | 255 | IORING_OP_FUTEX_WAKE, |
| 255 | 256 | IORING_OP_FUTEX_WAITV, |
| 257 | + IORING_OP_FIXED_FD_INSTALL, | |
| 256 | 258 | |
| 257 | 259 | /* this goes last, obviously */ |
| 258 | 260 | IORING_OP_LAST, |
| @@ -386,6 +388,13 @@ enum { · 127 unmodified lines | ||
| 386 | 388 | /* Pass through the flags from sqe->file_index to cqe->flags */ |
| 387 | 389 | #define IORING_MSG_RING_FLAGS_PASS (1U << 1) |
| 388 | 390 | |
| 391 | +/* | |
| 392 | + * IORING_OP_FIXED_FD_INSTALL flags (sqe->install_fd_flags) | |
| 393 | + * | |
| 394 | + * IORING_FIXED_FD_NO_CLOEXEC Don't mark the fd as O_CLOEXEC | |
| 395 | + */ | |
| 396 | +#define IORING_FIXED_FD_NO_CLOEXEC (1U << 0) | |
| 397 | + | |
| 389 | 398 | /* |
| 390 | 399 | * IO completion data structure (Completion Queue Entry) |
| 391 | 400 | */ |
| @@ -558,6 +567,9 @@ enum { · 166 unmodified lines | ||
| 558 | 567 | /* register a range of fixed file slots for automatic slot allocation */ |
| 559 | 568 | IORING_REGISTER_FILE_ALLOC_RANGE = 25, |
| 560 | 569 | |
| 570 | + /* return status information for a buffer group */ | |
| 571 | + IORING_REGISTER_PBUF_STATUS = 26, | |
| 572 | + | |
| 561 | 573 | /* this goes last */ |
| 562 | 574 | IORING_REGISTER_LAST, |
| 563 | 575 | |
| @@ -684,6 +696,13 @@ struct io_uring_buf_reg { · 120 unmodified lines | ||
| 684 | 696 | __u64 resv[3]; |
| 685 | 697 | }; |
| 686 | 698 | |
| 699 | +/* argument for IORING_REGISTER_PBUF_STATUS */ | |
| 700 | +struct io_uring_buf_status { | |
| 701 | + __u32 buf_group; /* input */ | |
| 702 | + __u32 head; /* output */ | |
| 703 | + __u32 resv[8]; | |
| 704 | +}; | |
| 705 | + | |
| 687 | 706 | /* |
| 688 | 707 | * io_uring_restriction->opcode values |
| 689 | 708 | */ |