linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: keith.busch@intel.com (Keith Busch)
Subject: [PATCH] NVMe: Fix 0-length integrity payload
Date: Tue, 23 Feb 2016 17:32:31 +0000	[thread overview]
Message-ID: <20160223173231.GC21865@localhost.localdomain> (raw)
In-Reply-To: <56CC92D8.4060204@dev.mellanox.co.il>

On Tue, Feb 23, 2016@07:11:52PM +0200, Sagi Grimberg wrote:
> 
> >A cheeky user could send a passthrough IO command with a metadata pointer,
> >but on a namespace without metadata. With metadata length of 0, kmalloc
> >returns ZERO_SIZE_PTR. Since that is not NULL, the driver would have
> >set this as the bio's integrity payload, which causes an access fault
> >on completion.
> >
> >This patch ignores the users metadata buffer if the namespace format
> >does not support separate metadata. This is preferred over returning an
> >invalid error to work with existing user space applications.
> 
> So having user-space get it wrong forever is preferable? Although I
> assume that this is the equivalent of a strip operation which is
> perfectly valid. The one difference is that strip validates the meta
> data by definition...

Yeah, some have had it wrong for years, but it worked from their
perspective. Now it crashes the machine, so this just reinstates the
previously established behavior. That seemed better than forcing users to
fix their apps. They don't like "fixing" in reaction to kernel changes.
Though I'd argue their command was nonsense in the first place, and
probably doesn't do what they think they're doing.

  reply	other threads:[~2016-02-23 17:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-23 16:36 [PATCH] NVMe: Fix 0-length integrity payload Keith Busch
2016-02-23 17:11 ` Sagi Grimberg
2016-02-23 17:32   ` Keith Busch [this message]
2016-02-24  8:35 ` Christoph Hellwig

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=20160223173231.GC21865@localhost.localdomain \
    --to=keith.busch@intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).