From: Keith Busch <kbusch@kernel.org>
To: Andrea Parri <parri.andrea@gmail.com>
Cc: "Justin Tee" <justintee8345@gmail.com>,
"Naresh Gottumukkala" <nareshgottumukkala83@gmail.com>,
"Paul Ely" <paul.ely@broadcom.com>,
"Christoph Hellwig" <hch@lst.de>,
"Sagi Grimberg" <sagi@grimberg.me>,
"Chaitanya Kulkarni" <kch@nvidia.com>,
"James Smart" <jsmart833426@gmail.com>,
"Johannes Thumshirn" <johannes.thumshirn@wdc.com>,
"Damien Le Moal" <dlemoal@kernel.org>,
"Manivannan Sadhasivam" <mani@kernel.org>,
"Krzysztof Wilczy´nski" <kwilczynski@kernel.org>,
"Niklas Cassel" <cassel@kernel.org>,
linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 0/4] nvmet: fix read data, status and length checks in fc, zns and pci-epf
Date: Thu, 22 Oct 2026 09:16:10 -0600 [thread overview]
Message-ID: <atoouj9RiG1Ik5I5@kbusch-mbp> (raw)
In-Reply-To: <20261022132934.3592924-1-parri.andrea@gmail.com>
On Thu, Oct 22, 2026 at 03:29:29PM +0200, Andrea Parri wrote:
> A connected host can currently receive stale target memory through two
> nvmet transports, and ZNS answers a Zone Management Receive whose NUMD
> byte count wraps.
>
> The FC transport sends a read buffer even when the command completes with
> an error. Some errors occur before the command handler initializes that
> buffer, so the host receives data left in the allocation.
>
> The PCI endpoint transport allocates each read segment at the length of
> the host's SGL data descriptor and sends every segment in full, even when
> the descriptors describe more than the command transfers. The excess
> reaches the host uninitialized, on any successful read.
>
> Patch 1 makes the FC transport send read data only for successful
> commands, matching the TCP and RDMA transports. Patch 2 rejects NUMD
> values whose byte count wraps the u32 length calculation instead of
> accepting the wrapped request.
>
> Patch 3 fixes a related PCI endpoint bug that patch 4 depends on. The
> transport reports every error it detects itself as a successful
> completion, because nvmet_pci_epf_complete_iod() reloads the status from
> a CQE that only the nvmet core fills in, so even a write whose data
> could not be fetched is reported as written. Patch 4 then makes the
> transport reject SGLs whose data descriptors do not add up to the
> command's data length.
>
> Patches 1 and 2 were tested on top of nvme-7.4 over the loop, tcp, rdma
> (rdma_rxe) and fc (fcloop) transports, with a zoned null_blk namespace
> for patch 2. Without them, a failed Identify over fc returns data and a
> wrapping NUMD is accepted; with them, neither occurs on any of the four
> transports.
Looks good to me. Applied to nvme-7.4.
prev parent reply other threads:[~2026-10-22 15:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-22 13:29 Andrea Parri
2026-10-22 13:29 ` [PATCH v2 1/4] nvmet-fc: only send read data for successful commands Andrea Parri
2026-10-22 13:29 ` [PATCH v2 2/4] nvmet: zns: reject a NUMD whose byte count wraps Andrea Parri
2026-10-22 13:29 ` [PATCH v2 3/4] nvmet: pci-epf: report transport errors in command completions Andrea Parri
2026-10-22 13:29 ` [PATCH v2 4/4] nvmet: pci-epf: require SGLs to match the command data length Andrea Parri
2026-10-22 15:16 ` Keith Busch [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 \
--in-reply-to=atoouj9RiG1Ik5I5@kbusch-mbp \
--to=kbusch@kernel.org \
--cc=cassel@kernel.org \
--cc=dlemoal@kernel.org \
--cc=hch@lst.de \
--cc=johannes.thumshirn@wdc.com \
--cc=jsmart833426@gmail.com \
--cc=justintee8345@gmail.com \
--cc=kch@nvidia.com \
--cc=kwilczynski@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=mani@kernel.org \
--cc=nareshgottumukkala83@gmail.com \
--cc=parri.andrea@gmail.com \
--cc=paul.ely@broadcom.com \
--cc=sagi@grimberg.me \
/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
all inboxes | Powered by JetHome®