From: Ming Lei <[email protected]>
To: Jens Axboe <[email protected]>
Cc: io-uring <[email protected]>,
"[email protected]" <[email protected]>
Subject: Re: [PATCH] ublk: read any SQE values upfront
Date: Thu, 6 Apr 2023 10:53:35 +0800 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
On Wed, Apr 05, 2023 at 08:03:57PM -0600, Jens Axboe wrote:
> Since SQE memory is shared with userspace, we should only be reading it
> once. We cannot read it multiple times, particularly when it's read once
> for validation and then read again for the actual use.
>
> ublk_ch_uring_cmd() is safe when called as a retry operation, as the
> memory backing is stable at that point. But for normal issue, we want
> to ensure that we only read ublksrv_io_cmd once. Wrap the function in
> a helper that reads the value into an on-stack copy of the struct.
>
> Cc: [email protected] # 6.0+
> Signed-off-by: Jens Axboe <[email protected]>
Reviewed-by: Ming Lei <[email protected]>
Thanks,
Ming
prev parent reply other threads:[~2023-04-06 2:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-06 2:03 [PATCH] ublk: read any SQE values upfront Jens Axboe
2023-04-06 2:53 ` Ming Lei [this message]
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 \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/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