From: Niklas Cassel <Niklas.Cassel@wdc.com>
To: "hch@lst.de" <hch@lst.de>
Cc: "Minwoo Im" <minwoo.im.dev@gmail.com>,
"javier@javigon.com" <javier@javigon.com>,
"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
"sagi@grimberg.me" <sagi@grimberg.me>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
"kbusch@kernel.org" <kbusch@kernel.org>,
"Javier González" <javier.gonz@samsung.com>
Subject: Re: [PATCH V6 1/2] nvme: enable char device per namespace
Date: Thu, 25 Mar 2021 08:39:40 +0000 [thread overview]
Message-ID: <YFxMSzjJMqdUiqxm@x1-carbon.lan> (raw)
In-Reply-To: <20210325082647.GA27622@lst.de>
On Thu, Mar 25, 2021 at 09:26:47AM +0100, hch@lst.de wrote:
> On Thu, Mar 25, 2021 at 11:09:51AM +0900, Minwoo Im wrote:
> > > I was still allowed to write to NSID2:
> > >
> > > sudo nvme zns report-zones -d 1 /dev/nvme0n2
> > > SLBA: 0x0 WP: 0x1 Cap: 0x3e000 State: IMP_OPENED Type: SEQWRITE_REQ Attrs: 0x0
> > >
> > > Should this really be allowed?
> >
> > I think this should not be allowed at all. Thanks for the testing!
>
> It should not be allowed, but it seems like a pre-existing problem
> as nvme_user_cmd does not verify the nsid.
>
> > > I was under the impression that Christoph's argument for implementing per
> > > namespace char devices, was that you should be able to do access control.
> > > Doesn't that mean that for the new char devices, we need to reject ioctls
> > > that specify a nvme_passthru_cmd.nsid != the NSID that the char device
> > > represents?
> > >
> > >
> > > Although, this is not really something new, as we already have the same
> > > behavior when it comes ioctls and the block devices. Perhaps we want to
> > > add the same verification there?
> >
> > I think there should be verifications.
>
> Yes.
Thanks Minwoo, Christoph,
I'll cook up a patch based on nvme/nvme-5.13.
Kind regards,
Niklas
next prev parent reply other threads:[~2021-03-25 8:41 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-01 19:24 [PATCH V6 0/2] nvme: enable char device per namespace javier
2021-03-01 19:24 ` [PATCH V6 1/2] " javier
2021-03-03 9:10 ` Christoph Hellwig
2021-03-03 10:02 ` Javier González
2021-03-09 11:31 ` Christoph Hellwig
2021-03-09 12:42 ` Javier González
2021-03-09 15:05 ` Christoph Hellwig
2021-03-09 21:18 ` Javier González
2021-03-24 12:29 ` Niklas Cassel
2021-03-25 2:09 ` Minwoo Im
2021-03-25 8:26 ` hch
2021-03-25 8:39 ` Niklas Cassel [this message]
2021-03-25 9:34 ` Minwoo Im
2021-03-25 12:25 ` Niklas Cassel
2021-03-25 12:33 ` Minwoo Im
2021-03-25 15:14 ` Keith Busch
2021-03-01 19:24 ` [PATCH V6 2/2] nvme: allow open for nvme-generic char device javier
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=YFxMSzjJMqdUiqxm@x1-carbon.lan \
--to=niklas.cassel@wdc.com \
--cc=hch@lst.de \
--cc=javier.gonz@samsung.com \
--cc=javier@javigon.com \
--cc=kbusch@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=minwoo.im.dev@gmail.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;
as well as URLs for NNTP newsgroup(s).