[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <173947043564.300246.6895423669336979822.b4-ty@kernel.dk>
Date: Thu, 13 Feb 2025 11:13:55 -0700
From: Jens Axboe <axboe@...nel.dk>
To: Pavel Begunkov <asml.silence@...il.com>,
Caleb Sander Mateos <csander@...estorage.com>
Cc: Riley Thomasson <riley@...estorage.com>, io-uring@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/2] uring_cmd SQE corruptions
On Wed, 12 Feb 2025 13:45:44 -0700, Caleb Sander Mateos wrote:
> In our application issuing NVMe passthru commands, we have observed
> nvme_uring_cmd fields being corrupted between when userspace initializes
> the io_uring SQE and when nvme_uring_cmd_io() processes it.
>
> We hypothesized that the uring_cmd's were executing asynchronously after
> the io_uring_enter() syscall returned, yet were still reading the SQE in
> the userspace-mapped SQ. Since io_uring_enter() had already incremented
> the SQ head index, userspace reused the SQ slot for a new SQE once the
> SQ wrapped around to it.
>
> [...]
Applied, thanks!
[1/2] io_uring/uring_cmd: don't assume io_uring_cmd_data layout
commit: 34cae91215c6f65bed2a124fb9283da6ec0b8dd9
[2/2] io_uring/uring_cmd: switch sqe to async_data on EAGAIN
commit: e663da62ba8672aaa66843f1af8b20e3bb1a0515
Best regards,
--
Jens Axboe
Powered by blists - more mailing lists