From: Christoph Hellwig <hch@lst.de>
To: Keith Busch <kbusch@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>,
sagi@grimberg.me, joshi.k@samsung.com,
linux-nvme@lists.infradead.org
Subject: Re: [PATCH] nvme: don't allow unprivileged Write Zeroes passthrough on read-only FDs
Date: Thu, 1 Dec 2022 17:09:10 +0100 [thread overview]
Message-ID: <20221201160910.GA25530@lst.de> (raw)
In-Reply-To: <Y4jRSqY56zjjlVsx@kbusch-mbp.dhcp.thefacebook.com>
On Thu, Dec 01, 2022 at 09:07:38AM -0700, Keith Busch wrote:
> On Tue, Nov 29, 2022 at 10:00:16AM +0100, Christoph Hellwig wrote:
> > - if (nvme_is_write(c))
> > + if (nvme_is_write(c) || c->common.opcode == nvme_cmd_write_zeroes)
> > return mode & FMODE_WRITE;
>
> Write Uncorrectable should also be checked, and any future opcodes that
> can modify media. Maybe use Command Effects Log's LBCC field instead? We
> can preload known effects for older nvme's that don't support that log
> page.
Yes, that might be a better idea. I'll try to find some time in
the next days to implement that.
prev parent reply other threads:[~2022-12-01 16:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20221129090709epcas5p21176e0faa7914cea52aab2e8fa95c2db@epcas5p2.samsung.com>
2022-11-29 9:00 ` [PATCH] nvme: don't allow unprivileged Write Zeroes passthrough on read-only FDs Christoph Hellwig
2022-11-29 17:54 ` Chaitanya Kulkarni
2022-11-30 8:34 ` Sagi Grimberg
2022-11-30 23:20 ` Kanchan Joshi
2022-12-01 16:07 ` Keith Busch
2022-12-01 16:09 ` Christoph Hellwig [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=20221201160910.GA25530@lst.de \
--to=hch@lst.de \
--cc=joshi.k@samsung.com \
--cc=kbusch@kernel.org \
--cc=linux-nvme@lists.infradead.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.