linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Minwoo Im <minwoo.im@samsung.com>
To: Keith Busch <kbusch@kernel.org>,
	Minwoo Im <minwoo.im.dev@gmail.com>,
	Christoph Hellwig <hch@lst.de>
Cc: Jens Axboe <axboe@fb.com>, Sagi Grimberg <sagi@grimberg.me>,
	"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
	Minwoo Im <minwoo.im@samsung.com>
Subject: Re: [PATCH] nvme: look up proper namespace in NVME_IOCTL_IO_CMD
Date: Sun, 06 Oct 2019 11:58:28 +0900	[thread overview]
Message-ID: <20191006025828epcms2p39e137f0294e73a53bbc9624d919c5a0d@epcms2p3> (raw)
In-Reply-To: <20190929191822.GA2995@lst.de>

> > > NVME_IOCTL_IO_CMD is deprecated because IO request for a chardev is
> > > unsafe.  But in case userspace gives nsid, kernel should at least look
> > > up the proper namespace instance instead getting the first entry and
> > > checking whether if it's the last one.
> >
> > This pretty much defeats the purpose of discouraging using this interface,
> and
> > possibly opens security issues if someone can issue IO to a device they
> > shouldn't be able to access.
> 
> It also breaks any old user relying on the fact that the nsid is
> ignored.

Oh Yes, It breaks the purpose for the deprecation. Will not try to use I/O
Weith chardev with nsid specified which can give improper nsid  from the
userspace


Thanks, Keith and Christoph

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

      parent reply	other threads:[~2019-10-06  2:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-28  2:15 [PATCH] nvme: look up proper namespace in NVME_IOCTL_IO_CMD Minwoo Im
2019-09-29 17:36 ` Keith Busch
2019-09-29 19:18   ` Christoph Hellwig
     [not found]   ` <CGME20190929191846epcas5p10576f659553b0a1f189dcdf0cefb5c97@epcms2p3>
2019-10-06  2:58     ` Minwoo Im [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=20191006025828epcms2p39e137f0294e73a53bbc9624d919c5a0d@epcms2p3 \
    --to=minwoo.im@samsung.com \
    --cc=axboe@fb.com \
    --cc=hch@lst.de \
    --cc=kbusch@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).