From: Keith Busch <kbusch@kernel.org>
To: Kanchan Joshi <joshi.k@samsung.com>
Cc: hch@lst.de, axboe@kernel.dk, sagi@grimberg.me,
linux-nvme@lists.infradead.org, vincentfu@gmail.com,
ankit.kumar@samsung.com, joshiiitr@gmail.com,
gost.dev@samsung.com, stable@vger.kernel.org,
Vincent Fu <vincent.fu@samsung.com>
Subject: Re: [PATCH v2 1/2] nvme: fix memory corruption for passthrough metadata
Date: Thu, 7 Sep 2023 09:41:39 -0600 [thread overview]
Message-ID: <ZPnvM3kNSHVA8x6Y@kbusch-mbp> (raw)
In-Reply-To: <20230906154815.GA23984@green245>
On Wed, Sep 06, 2023 at 09:18:15PM +0530, Kanchan Joshi wrote:
> Would you really prefer to have nvme_add_user_metadata() changed to do
> away with allocation and use userspace meta-buffer directly?
I mean, sure, if it's possible. We can avoid a costly copy if the user
metabuffer is aligned and physically contiguous.
> Even with that route, extended-lba-with-short-unaligned-buffer remains
> unhandled. That will still require similar checks that I would like
> to avoid but cannnot.
>
> So how about this -
There's lots of bad things you can do with this interface. Example,
provide an unaligned single byte user buffer and send an Identify
command.
We never provided opcode decoding sanity checks before because it's a
bad maintenance burden, adds performance killing overhead, couldn't
catch all the cases anyway due to vendor specific and future opcodes,
and harms the flexibility of the interface. The burden is usually on the
user for these kinds of priviledged interfaces: if you abuse it, "you
get to keep both pieces" territory.
next prev parent reply other threads:[~2023-09-07 16:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20230814070548epcas5p34eb8f36ab460ee2bf55030ce856844b9@epcas5p3.samsung.com>
[not found] ` <20230814070213.161033-1-joshi.k@samsung.com>
2023-08-14 7:02 ` [PATCH v2 1/2] nvme: fix memory corruption for passthrough metadata Kanchan Joshi
2023-08-31 14:09 ` Vincent Fu
2023-09-01 7:06 ` KANCHAN JOSHI/Host Software /SSIR/Staff Engineer/Samsung Electronics
2023-09-01 14:45 ` Keith Busch
2023-09-05 5:18 ` Kanchan Joshi
2023-09-05 18:08 ` Keith Busch
2023-09-06 15:48 ` Kanchan Joshi
2023-09-07 15:41 ` Keith Busch [this message]
2023-09-07 20:35 ` Kanchan Joshi
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=ZPnvM3kNSHVA8x6Y@kbusch-mbp \
--to=kbusch@kernel.org \
--cc=ankit.kumar@samsung.com \
--cc=axboe@kernel.dk \
--cc=gost.dev@samsung.com \
--cc=hch@lst.de \
--cc=joshi.k@samsung.com \
--cc=joshiiitr@gmail.com \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
--cc=stable@vger.kernel.org \
--cc=vincent.fu@samsung.com \
--cc=vincentfu@gmail.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