Linux io-uring development
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Pavel Begunkov <asml.silence@gmail.com>, io-uring@vger.kernel.org
Subject: Re: [PATCH 1/4] io_uring/uring_cmd: get rid of using req->imu
Date: Sat, 19 Oct 2024 15:56:26 -0600	[thread overview]
Message-ID: <c463cfa3-1182-43f3-af80-dcb7dea40ca8@kernel.dk> (raw)
In-Reply-To: <19d5a8bd-60cd-496f-a7ba-ffde5dd2e906@gmail.com>

On 10/18/24 1:34 PM, Pavel Begunkov wrote:
> On 10/18/24 19:38, Jens Axboe wrote:
>> It's pretty pointless to use io_kiocb as intermediate storage for this,
>> so split the validity check and the actual usage.
> 
> The table is uring_lock protected, if we don't resolve in advance
> we should take care of locking when importing.
> 
> Another concern is adding a gap b/w setting a rsrc node and looking
> up a buffer. That should be fine, but worth mentioning that when
> you grab a rsrc node it also prevent destruction of all objects that
> are created after this point.

Yeah the last part should be fine, the first one surely not! I also
notice that the check for too large an index now happens after
the array_index_nospec(), that's also an issue.

I'll spin a v2. We should just put it all in one place.

-- 
Jens Axboe


  reply	other threads:[~2024-10-19 21:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-18 18:38 [PATCHSET for-next 0/4] Get rid of io_kiocb->imu Jens Axboe
2024-10-18 18:38 ` [PATCH 1/4] io_uring/uring_cmd: get rid of using req->imu Jens Axboe
2024-10-18 19:34   ` Pavel Begunkov
2024-10-19 21:56     ` Jens Axboe [this message]
2024-10-18 18:38 ` [PATCH 2/4] io_uring/rw: " Jens Axboe
2024-10-18 18:38 ` [PATCH 3/4] io_uring/net: move send zc fixed buffer import to issue path Jens Axboe
2024-10-18 18:38 ` [PATCH 4/4] io_uring: kill 'imu' from struct io_kiocb Jens Axboe
  -- strict thread matches above, loose matches on Subject: below --
2024-10-22  2:03 [PATCHSET v2 for-next 0/4] Get rid of io_kiocb->imu Jens Axboe
2024-10-22  2:03 ` [PATCH 1/4] io_uring/uring_cmd: get rid of using req->imu Jens Axboe
2024-10-22  2:43   ` Ming Lei
2024-10-22  2:59     ` Jens Axboe
2024-10-22  8:34       ` Anuj Gupta
2024-10-22 13:18         ` Jens Axboe
2024-10-22 13:24           ` Jens Axboe
2024-10-22 13:32 [PATCHSET v3 for-next 0/4] Get rid of io_kiocb->imu Jens Axboe
2024-10-22 13:32 ` [PATCH 1/4] io_uring/uring_cmd: get rid of using req->imu Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c463cfa3-1182-43f3-af80-dcb7dea40ca8@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=asml.silence@gmail.com \
    --cc=io-uring@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox