io-uring.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH liburing v2] man/io_uring_enter.2: add notes about direct open/accept
@ 2021-08-31 20:54 Pavel Begunkov
  2021-08-31 21:22 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Pavel Begunkov @ 2021-08-31 20:54 UTC (permalink / raw)
  To: Jens Axboe, io-uring

Add a few lines describing openat/openat2/accept bypassing normal file
tables and installing files right into the fixed file table.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
---

v2: s/non-negative/positive/ (Jens)
    mention fixed files restrictions

 man/io_uring_enter.2 | 48 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/man/io_uring_enter.2 b/man/io_uring_enter.2
index 9ccedef..e1ae707 100644
--- a/man/io_uring_enter.2
+++ b/man/io_uring_enter.2
@@ -511,6 +511,22 @@ field. See also
 .BR accept4(2)
 for the general description of the related system call. Available since 5.5.
 
+If the
+.I file_index
+field is set to a positive number, the file won't be installed into the
+normal file table as usual but will be placed into the fixed file table at index
+.I file_index - 1.
+In this case, instead of returning a file descriptor, the result will contain
+either 0 on success or an error. If there is already a file registered at this
+index, the request will fail with
+.B -EBADF.
+Only io_uring has access to such files and no other syscall can use them. See
+.B IOSQE_FIXED_FILE
+and
+.B IORING_REGISTER_FILES.
+
+Available since 5.15.
+
 .TP
 .B IORING_OP_ASYNC_CANCEL
 Attempt to cancel an already issued request.
@@ -634,6 +650,22 @@ is access mode of the file. See also
 .BR openat(2)
 for the general description of the related system call. Available since 5.6.
 
+If the
+.I file_index
+field is set to a positive number, the file won't be installed into the
+normal file table as usual but will be placed into the fixed file table at index
+.I file_index - 1.
+In this case, instead of returning a file descriptor, the result will contain
+either 0 on success or an error. If there is already a file registered at this
+index, the request will fail with
+.B -EBADF.
+Only io_uring has access to such files and no other syscall can use them. See
+.B IOSQE_FIXED_FILE
+and
+.B IORING_REGISTER_FILES.
+
+Available since 5.15.
+
 .TP
 .B IORING_OP_OPENAT2
 Issue the equivalent of a
@@ -654,6 +686,22 @@ should be set to the address of the open_how structure. See also
 .BR openat2(2)
 for the general description of the related system call. Available since 5.6.
 
+If the
+.I file_index
+field is set to a positive number, the file won't be installed into the
+normal file table as usual but will be placed into the fixed file table at index
+.I file_index - 1.
+In this case, instead of returning a file descriptor, the result will contain
+either 0 on success or an error. If there is already a file registered at this
+index, the request will fail with
+.B -EBADF.
+Only io_uring has access to such files and no other syscall can use them. See
+.B IOSQE_FIXED_FILE
+and
+.B IORING_REGISTER_FILES.
+
+Available since 5.15.
+
 .TP
 .B IORING_OP_CLOSE
 Issue the equivalent of a
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-31 21:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-31 20:54 [PATCH liburing v2] man/io_uring_enter.2: add notes about direct open/accept Pavel Begunkov
2021-08-31 21:22 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).