From: hch@lst.de (Christoph Hellwig)
Subject: [PATCH] nvme: fix uninitialized prp2 value on small transfers
Date: Sun, 27 Aug 2017 18:00:41 +0200 [thread overview]
Message-ID: <20170827160041.GA21416@lst.de> (raw)
In-Reply-To: <1503842197-29978-1-git-send-email-jschoenh@amazon.de>
On Sun, Aug 27, 2017@03:56:37PM +0200, Jan H. Sch?nherr wrote:
> The value of iod->first_dma ends up as prp2 in NVMe commands. In case
> there is not enough data to cross a page boundary, iod->first_dma is
> never initialized and contains random data.
>
> Comply with the NVMe specification and fill in 0 in that case.
Zeroing it out is fine with me, but NVMe 1.3 says:
PRP Entry 2 (PRP2): This field:
a) is reserved if the data transfer does not cross a memory page boundary.
so I don't think the specification requires it to be zeroed.
What kind of controller do you have that wants PRP2 zeroed for transfers
that don't cross a page boundary?
next prev parent reply other threads:[~2017-08-27 16:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-27 13:56 [PATCH] nvme: fix uninitialized prp2 value on small transfers Jan H. Schönherr
2017-08-27 16:00 ` Christoph Hellwig [this message]
2017-08-27 16:56 ` Jan H. Schönherr
[not found] ` <CADL4p-oxDfu0srX90+u9d0HfXLCNpFk2NdcoeaWEmMjRnwHX2w@mail.gmail.com>
2017-08-28 7:41 ` Sagi Grimberg
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=20170827160041.GA21416@lst.de \
--to=hch@lst.de \
/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