Commit Graph

25 Commits

Author SHA1 Message Date
Jeff Moyer ce17df8151 io_uring/msg_ring: cleanup posting to IOPOLL vs !IOPOLL ring
JIRA: https://issues.redhat.com/browse/RHEL-64867

commit 59b28a6e37e650c0d601ed87875b6217140cda5d
Author: Jens Axboe <axboe@kernel.dk>
Date:   Thu Mar 28 10:42:40 2024 -0600

    io_uring/msg_ring: cleanup posting to IOPOLL vs !IOPOLL ring
    
    Move the posting outside the checking and locking, it's cleaner that
    way.
    
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2024-11-28 17:45:44 -05:00
Jeff Moyer fe71565921 io_uring/msg_ring: reuse ctx->submitter_task read using READ_ONCE instead of re-reading it
JIRA: https://issues.redhat.com/browse/RHEL-64867

commit a4d416dc60980f741f0bfa1f34a1059c498c1b4e
Author: linke li <lilinke99@qq.com>
Date:   Fri Apr 26 11:24:37 2024 +0800

    io_uring/msg_ring: reuse ctx->submitter_task read using READ_ONCE instead of re-reading it
    
    In io_msg_exec_remote(), ctx->submitter_task is read using READ_ONCE at
    the beginning of the function, checked, and then re-read from
    ctx->submitter_task, voiding all guarantees of the checks. Reuse the value
    that was read by READ_ONCE to ensure the consistency of the task struct
    throughout the function.
    
    Signed-off-by: linke li <lilinke99@qq.com>
    Link: https://lore.kernel.org/r/tencent_F9B2296C93928D6F68FF0C95C33475C68209@qq.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2024-11-28 17:43:44 -05:00
Jeff Moyer e1341eead3 io_uring: use io_file_from_index in io_msg_grab_file
JIRA: https://issues.redhat.com/browse/RHEL-12076

commit f432c8c8c12b84c5465b1ffddb6feb7d6b19c1ca
Author: Christoph Hellwig <hch@lst.de>
Date:   Tue Jun 20 13:32:34 2023 +0200

    io_uring: use io_file_from_index in io_msg_grab_file
    
    Use io_file_from_index instead of open coding it.
    
    Signed-off-by: Christoph Hellwig <hch@lst.de>
    Link: https://lore.kernel.org/r/20230620113235.920399-8-hch@lst.de
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-11-02 15:31:55 -04:00
Jeff Moyer 298c0ffbcf io_uring/msg-ring: ensure flags passing works for task_work completions
JIRA: https://issues.redhat.com/browse/RHEL-12076

commit 8572df941cbef2b295282535b013828e7df39471
Author: Jens Axboe <axboe@kernel.dk>
Date:   Sat Jan 21 19:53:41 2023 -0700

    io_uring/msg-ring: ensure flags passing works for task_work completions
    
    If the target ring is using IORING_SETUP_SINGLE_ISSUER and we're posting
    a message from a different thread, then we need to ensure that the
    fallback task_work that posts the CQE knwos about the flags passing as
    well. If not we'll always be posting 0 as the flags.
    
    Fixes: 3563d7ed58a5 ("io_uring/msg_ring: Pass custom flags to the cqe")
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-11-02 15:31:09 -04:00
Jeff Moyer 09385895f3 io_uring/msg_ring: Pass custom flags to the cqe
JIRA: https://issues.redhat.com/browse/RHEL-12076

commit cbeb47a7b5f003429ded32b1fb3a7108ce5c1b54
Author: Breno Leitao <leitao@debian.org>
Date:   Tue Jan 3 08:05:07 2023 -0800

    io_uring/msg_ring: Pass custom flags to the cqe
    
    This patch adds a new flag (IORING_MSG_RING_FLAGS_PASS) in the message
    ring operations (IORING_OP_MSG_RING). This new flag enables the sender
    to specify custom flags, which will be copied over to cqe->flags in the
    receiving ring.  These custom flags should be specified using the
    sqe->file_index field.
    
    This mechanism provides additional flexibility when sending messages
    between rings.
    
    Signed-off-by: Breno Leitao <leitao@debian.org>
    Link: https://lore.kernel.org/r/20230103160507.617416-1-leitao@debian.org
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-11-02 15:31:07 -04:00
Jeff Moyer 44784d2adc io_uring/msg_ring: let target know allocated index
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2068237

commit 5da28edd7bd5518f97175ecea77615bb729a7a28
Author: Pavel Begunkov <asml.silence@gmail.com>
Date:   Thu Mar 16 12:11:42 2023 +0000

    io_uring/msg_ring: let target know allocated index
    
    msg_ring requests transferring files support auto index selection via
    IORING_FILE_INDEX_ALLOC, however they don't return the selected index
    to the target ring and there is no other good way for the userspace to
    know where is the receieved file.
    
    Return the index for allocated slots and 0 otherwise, which is
    consistent with other fixed file installing requests.
    
    Cc: stable@vger.kernel.org # v6.0+
    Fixes: e6130eba8a848 ("io_uring: add support for passing fixed file descriptors")
    Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
    Link: https://github.com/axboe/liburing/issues/809
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-05-05 15:26:30 -04:00
Jeff Moyer 1ccd248ca2 io_uring/msg_ring: fix remote queue to disabled ring
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2068237

commit 8579538c89e33ce78be2feb41e07489c8cbf8f31
Author: Pavel Begunkov <asml.silence@gmail.com>
Date:   Fri Jan 20 16:38:06 2023 +0000

    io_uring/msg_ring: fix remote queue to disabled ring
    
    IORING_SETUP_R_DISABLED rings don't have the submitter task set, so
    it's not always safe to use ->submitter_task. Disallow posting msg_ring
    messaged to disabled rings. Also add task NULL check for loosy sync
    around testing for IORING_SETUP_R_DISABLED.
    
    Cc: stable@vger.kernel.org
    Fixes: 6d043ee1164ca ("io_uring: do msg_ring in target task via tw")
    Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-05-05 15:25:30 -04:00
Jeff Moyer 82ef218488 io_uring/msg_ring: fix flagging remote execution
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2068237

commit 56d8e3180c065c9b78ed77afcd0cf99677a4e22f
Author: Pavel Begunkov <asml.silence@gmail.com>
Date:   Fri Jan 20 16:38:05 2023 +0000

    io_uring/msg_ring: fix flagging remote execution
    
    There is a couple of problems with queueing a tw in io_msg_ring_data()
    for remote execution. First, once we queue it the target ring can
    go away and so setting IORING_SQ_TASKRUN there is not safe. Secondly,
    the userspace might not expect IORING_SQ_TASKRUN.
    
    Extract a helper and uniformly use TWA_SIGNAL without TWA_SIGNAL_NO_IPI
    tricks for now, just as it was done in the original patch.
    
    Cc: stable@vger.kernel.org
    Fixes: 6d043ee1164ca ("io_uring: do msg_ring in target task via tw")
    Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-05-05 15:25:30 -04:00
Jeff Moyer 7ed092ded5 io_uring/msg_ring: fix missing lock on overflow for IOPOLL
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2068237

commit e12d7a46f65ae4b7d58a5e0c1cbfa825cf8d830d
Author: Jens Axboe <axboe@kernel.dk>
Date:   Thu Jan 19 09:04:40 2023 -0700

    io_uring/msg_ring: fix missing lock on overflow for IOPOLL
    
    If the target ring is configured with IOPOLL, then we always need to hold
    the target ring uring_lock before posting CQEs. We could just grab it
    unconditionally, but since we don't expect many target rings to be of this
    type, make grabbing the uring_lock conditional on the ring type.
    
    Link: https://lore.kernel.org/io-uring/Y8krlYa52%2F0YGqkg@ip-172-31-85-199.ec2.internal/
    Reported-by: Xingyuan Mo <hdthky0@gmail.com>
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-05-05 15:25:30 -04:00
Jeff Moyer c9e19615e2 io_uring/msg_ring: move double lock/unlock helpers higher up
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2068237

commit 423d5081d0451faa59a707e57373801da5b40141
Author: Jens Axboe <axboe@kernel.dk>
Date:   Thu Jan 19 09:01:27 2023 -0700

    io_uring/msg_ring: move double lock/unlock helpers higher up
    
    In preparation for needing them somewhere else, move them and get rid of
    the unused 'issue_flags' for the unlock side.
    
    No functional changes in this patch.
    
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-05-05 15:25:29 -04:00
Jeff Moyer f99edaa7af io_uring/msg_ring: flag target ring as having task_work, if needed
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2068237

commit 761c61c15903db41343532882b0443addb8c2faf
Author: Jens Axboe <axboe@kernel.dk>
Date:   Thu Dec 8 09:36:02 2022 -0700

    io_uring/msg_ring: flag target ring as having task_work, if needed
    
    Before the recent change, we didn't even wake the targeted task when
    posting the cqe remotely. Now we do wake it, but we do want to ensure
    that the recipient knows there's potential work there that needs to
    get processed to get the CQE posted.
    
    OR in IORING_SQ_TASKRUN for that purpose.
    
    Link: https://lore.kernel.org/io-uring/2843c6b4-ba9a-b67d-e0f4-957f42098489@kernel.dk/
    Fixes: 6d043ee1164c ("io_uring: do msg_ring in target task via tw")
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-05-05 15:25:22 -04:00
Jeff Moyer 771d60cece io_uring: do msg_ring in target task via tw
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2068237

commit 6d043ee1164ca3305738131f170e560587070fa9
Author: Pavel Begunkov <asml.silence@gmail.com>
Date:   Wed Dec 7 03:53:36 2022 +0000

    io_uring: do msg_ring in target task via tw
    
    While executing in a context of one io_uring instance msg_ring
    manipulates another ring. We're trying to keep CQEs posting contained in
    the context of the ring-owner task, use task_work to send the request to
    the target ring's task when we're modifying its CQ or trying to install
    a file. Note, we can't safely use io_uring task_work infra and have to
    use task_work directly.
    
    Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
    Link: https://lore.kernel.org/r/4d76c7b28ed5d71b520de4482fbb7f660f21cd80.1670384893.git.asml.silence@gmail.com
    [axboe: use TWA_SIGNAL_NO_IPI]
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-05-05 15:25:21 -04:00
Jeff Moyer 74450e33c9 io_uring: extract a io_msg_install_complete helper
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2068237

commit 172113101641cf1f9628c528ec790cb809f2b704
Author: Pavel Begunkov <asml.silence@gmail.com>
Date:   Wed Dec 7 03:53:35 2022 +0000

    io_uring: extract a io_msg_install_complete helper
    
    Extract a helper called io_msg_install_complete() from io_msg_send_fd(),
    will be used later.
    
    Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
    Link: https://lore.kernel.org/r/1500ca1054cc4286a3ee1c60aacead57fcdfa02a.1670384893.git.asml.silence@gmail.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-05-05 15:25:21 -04:00
Jeff Moyer de845c40fc io_uring: get rid of double locking
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2068237

commit 11373026f2960390d5e330df4e92735c4265c440
Author: Pavel Begunkov <asml.silence@gmail.com>
Date:   Wed Dec 7 03:53:34 2022 +0000

    io_uring: get rid of double locking
    
    We don't need to take both uring_locks at once, msg_ring can be split in
    two parts, first getting a file from the filetable of the first ring and
    then installing it into the second one.
    
    Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
    Link: https://lore.kernel.org/r/a80ecc2bc99c3b3f2cf20015d618b7c51419a797.1670384893.git.asml.silence@gmail.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-05-05 15:25:21 -04:00
Jeff Moyer bb28555a60 io_uring: improve io_double_lock_ctx fail handling
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2068237

commit 4c979eaefa4356d385b7c7d2877dc04d7fe88969
Author: Pavel Begunkov <asml.silence@gmail.com>
Date:   Wed Dec 7 03:53:27 2022 +0000

    io_uring: improve io_double_lock_ctx fail handling
    
    msg_ring will fail the request if it can't lock rings, instead punt it
    to io-wq as was originally intended.
    
    Cc: stable@vger.kernel.org
    Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
    Link: https://lore.kernel.org/r/4697f05afcc37df5c8f89e2fe6d9c7c19f0241f9.1670384893.git.asml.silence@gmail.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-05-05 15:25:18 -04:00
Jeff Moyer ac9e612458 io_uring: dont remove file from msg_ring reqs
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2068237

commit ef0ec1ad03119b8b46b035dad42bca7d6da7c2e5
Author: Pavel Begunkov <asml.silence@gmail.com>
Date:   Wed Dec 7 03:53:26 2022 +0000

    io_uring: dont remove file from msg_ring reqs
    
    We should not be messing with req->file outside of core paths. Clearing
    it makes msg_ring non reentrant, i.e. luckily io_msg_send_fd() fails the
    request on failed io_double_lock_ctx() but clearly was originally
    intended to do retries instead.
    
    Cc: stable@vger.kernel.org
    Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
    Link: https://lore.kernel.org/r/e5ac9edadb574fe33f6d727cb8f14ce68262a684.1670384893.git.asml.silence@gmail.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-05-05 15:25:18 -04:00
Jeff Moyer 660b53ff29 io_uring: remove overflow param from io_post_aux_cqe
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2068237

commit b529c96a896b7bea8464a58d350836cc106d70bd
Author: Dylan Yudaken <dylany@meta.com>
Date:   Thu Nov 24 01:35:58 2022 -0800

    io_uring: remove overflow param from io_post_aux_cqe
    
    The only call sites which would not allow overflow are also call sites
    which would use the io_aux_cqe as they care about ordering.
    
    So remove this parameter from io_post_aux_cqe.
    
    Signed-off-by: Dylan Yudaken <dylany@meta.com>
    Link: https://lore.kernel.org/r/20221124093559.3780686-9-dylany@meta.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-05-05 15:25:13 -04:00
Jeff Moyer 255869b6c2 io_uring/msg_ring: Fix NULL pointer dereference in io_msg_send_fd()
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2068237

commit 16bbdfe5fb0e78e0acb13e45fc127e9a296913f2
Author: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Date:   Wed Oct 19 10:12:18 2022 -0700

    io_uring/msg_ring: Fix NULL pointer dereference in io_msg_send_fd()
    
    Syzkaller produced the below call trace:
    
     BUG: KASAN: null-ptr-deref in io_msg_ring+0x3cb/0x9f0
     Write of size 8 at addr 0000000000000070 by task repro/16399
    
     CPU: 0 PID: 16399 Comm: repro Not tainted 6.1.0-rc1 #28
     Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.11.0-2.el7
     Call Trace:
      <TASK>
      dump_stack_lvl+0xcd/0x134
      ? io_msg_ring+0x3cb/0x9f0
      kasan_report+0xbc/0xf0
      ? io_msg_ring+0x3cb/0x9f0
      kasan_check_range+0x140/0x190
      io_msg_ring+0x3cb/0x9f0
      ? io_msg_ring_prep+0x300/0x300
      io_issue_sqe+0x698/0xca0
      io_submit_sqes+0x92f/0x1c30
      __do_sys_io_uring_enter+0xae4/0x24b0
    ....
     RIP: 0033:0x7f2eaf8f8289
     RSP: 002b:00007fff40939718 EFLAGS: 00000246 ORIG_RAX: 00000000000001aa
     RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f2eaf8f8289
     RDX: 0000000000000000 RSI: 0000000000006f71 RDI: 0000000000000004
     RBP: 00007fff409397a0 R08: 0000000000000000 R09: 0000000000000039
     R10: 0000000000000000 R11: 0000000000000246 R12: 00000000004006d0
     R13: 00007fff40939880 R14: 0000000000000000 R15: 0000000000000000
      </TASK>
     Kernel panic - not syncing: panic_on_warn set ...
    
    We don't have a NULL check on file_ptr in io_msg_send_fd() function,
    so when file_ptr is NUL src_file is also NULL and get_file()
    dereferences a NULL pointer and leads to above crash.
    
    Add a NULL check to fix this issue.
    
    Fixes: e6130eba8a84 ("io_uring: add support for passing fixed file descriptors")
    Reported-by: syzkaller <syzkaller@googlegroups.com>
    Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
    Link: https://lore.kernel.org/r/20221019171218.1337614-1-harshit.m.mogalapalli@oracle.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-05-05 15:24:11 -04:00
Jeff Moyer a9e7ae542e io_uring/msg_ring: check file type before putting
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2068237

commit fc7222c3a9f56271fba02aabbfbae999042f1679
Author: Jens Axboe <axboe@kernel.dk>
Date:   Thu Sep 15 11:44:35 2022 -0600

    io_uring/msg_ring: check file type before putting
    
    If we're invoked with a fixed file, follow the normal rules of not
    calling io_fput_file(). Fixed files are permanently registered to the
    ring, and do not need putting separately.
    
    Cc: stable@vger.kernel.org
    Fixes: aa184e8671f0 ("io_uring: don't attempt to IOPOLL for MSG_RING requests")
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-05-05 15:23:00 -04:00
Jeff Moyer 95438cbb8c io_uring: make io_kiocb_to_cmd() typesafe
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2068237

commit f2ccb5aed7bce1d8b3ed5b3385759a5509663028
Author: Stefan Metzmacher <metze@samba.org>
Date:   Thu Aug 11 09:11:15 2022 +0200

    io_uring: make io_kiocb_to_cmd() typesafe
    
    We need to make sure (at build time) that struct io_cmd_data is not
    casted to a structure that's larger.
    
    Signed-off-by: Stefan Metzmacher <metze@samba.org>
    Link: https://lore.kernel.org/r/c024cdf25ae19fc0319d4180e2298bade8ed17b8.1660201408.git.metze@samba.org
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-04-29 08:43:02 -04:00
Jeff Moyer 6abae6e2c4 io_uring: add allow_overflow to io_post_aux_cqe
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2068237

commit 52120f0fadcbdaaa981c19327f1865a714e85268
Author: Dylan Yudaken <dylany@fb.com>
Date:   Thu Jun 30 02:12:26 2022 -0700

    io_uring: add allow_overflow to io_post_aux_cqe
    
    Some use cases of io_post_aux_cqe would not want to overflow as is, but
    might want to change the flags/result. For example multishot receive
    requires in order CQE, and so if there is an overflow it would need to
    stop receiving until the overflow is taken care of.
    
    Signed-off-by: Dylan Yudaken <dylany@fb.com>
    Link: https://lore.kernel.org/r/20220630091231.1456789-8-dylany@fb.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-04-29 07:15:02 -04:00
Jeff Moyer 810f383c81 io_uring: add support for passing fixed file descriptors
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2068237

commit e6130eba8a848a7a6ba6c534bd8f6d60749ae1a9
Author: Jens Axboe <axboe@kernel.dk>
Date:   Mon Jun 13 04:47:02 2022 -0600

    io_uring: add support for passing fixed file descriptors
    
    With IORING_OP_MSG_RING, one ring can send a message to another ring.
    Extend that support to also allow sending a fixed file descriptor to
    that ring, enabling one ring to pass a registered descriptor to another
    one.
    
    Arguments are extended to pass in:
    
    sqe->addr3      fixed file slot in source ring
    sqe->file_index fixed file slot in destination ring
    
    IORING_OP_MSG_RING is extended to take a command argument in sqe->addr.
    If set to zero (or IORING_MSG_DATA), it sends just a message like before.
    If set to IORING_MSG_SEND_FD, a fixed file descriptor is sent according
    to the above arguments.
    
    Two common use cases for this are:
    
    1) Server needs to be shutdown or restarted, pass file descriptors to
       another onei
    
    2) Backend is split, and one accepts connections, while others then get
      the fd passed and handle the actual connection.
    
    Both of those are classic SCM_RIGHTS use cases, and it's not possible to
    support them with direct descriptors today.
    
    By default, this will post a CQE to the target ring, similarly to how
    IORING_MSG_DATA does it. If IORING_MSG_RING_CQE_SKIP is set, no message
    is posted to the target ring. The issuer is expected to notify the
    receiver side separately.
    
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-04-29 07:07:02 -04:00
Jeff Moyer 8034d812f4 io_uring: kill extra io_uring_types.h includes
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2068237

commit 27a9d66fec77cff0e32d2ecd5d0ac7ef878a7bb0
Author: Pavel Begunkov <asml.silence@gmail.com>
Date:   Thu Jun 16 13:57:18 2022 +0100

    io_uring: kill extra io_uring_types.h includes
    
    io_uring/io_uring.h already includes io_uring_types.h, no need to
    include it every time. Kill it in a bunch of places, it prepares us for
    following patches.
    
    Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
    Link: https://lore.kernel.org/r/94d8c943fbe0ef949981c508ddcee7fc1c18850f.1655384063.git.asml.silence@gmail.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-04-29 06:19:02 -04:00
Jeff Moyer 14da90670c io_uring: don't expose io_fill_cqe_aux()
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2068237

commit d245bca6375bccfd589a6a7d5007df28575bb626
Author: Pavel Begunkov <asml.silence@gmail.com>
Date:   Fri Jun 17 09:48:00 2022 +0100

    io_uring: don't expose io_fill_cqe_aux()
    
    Deduplicate some code and add a helper for filling an aux CQE, locking
    and notification.
    
    Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
    Link: https://lore.kernel.org/r/b7c6557c8f9dc5c4cfb01292116c682a0ff61081.1655455613.git.asml.silence@gmail.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-04-29 06:13:02 -04:00
Jeff Moyer 6322b117f4 io_uring: move msg_ring into its own file
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2068237

commit 36404b09aa609e00f8f0108356830c22b99b3cbf
Author: Jens Axboe <axboe@kernel.dk>
Date:   Wed May 25 06:42:08 2022 -0600

    io_uring: move msg_ring into its own file
    
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-04-29 05:27:02 -04:00