From: "hch@lst.de" <hch@lst.de>
To: Bart Van Assche <Bart.VanAssche@sandisk.com>
Cc: "bfields@fieldses.org" <bfields@fieldses.org>,
"hch@lst.de" <hch@lst.de>,
"jlayton@poochiereds.net" <jlayton@poochiereds.net>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
"osandov@fb.com" <osandov@fb.com>, "axboe@fb.com" <axboe@fb.com>,
"axboe@kernel.dk" <axboe@kernel.dk>,
"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH 06/19] nfsd: Check private request size before submitting a SCSI request
Date: Fri, 26 May 2017 08:10:03 +0200 [thread overview]
Message-ID: <20170526061003.GF18424@lst.de> (raw)
In-Reply-To: <1495743585.2615.6.camel@sandisk.com>
On Thu, May 25, 2017 at 08:19:47PM +0000, Bart Van Assche wrote:
> On Thu, 2017-05-25 at 14:48 -0400, J . Bruce Fields wrote:
> > On Thu, May 25, 2017 at 11:43:14AM -0700, Bart Van Assche wrote:
> > > Since using scsi_req() is only allowed against request queues for
> > > which struct scsi_request is the first member of their private
> > > request data, refuse to submit SCSI commands against a queue for
> > > which this is not the case.
> >
> > Is it possible we could catch this earlier and avoid giving out the
> > layout in the first place?
>
> Hello Christoph,
>
> According to what I see in commit 8650b8a05850 you are the author of this
> code? Can the blk_queue_scsi_pdu(q) test fail in nfsd4_scsi_identify_device()?
If the user explicitly asked for a scsi layout export of a non-scsi
device it can.
> If so, can nfsd4_layout_verify() be modified in such a way that it prevents
> that nfsd4_scsi_proc_getdeviceinfo() is ever called for a non-SCSI queue?
> Can you recommend an approach?
Not easily. The only thing we could do is an export time check, that
would refuse the scsi layout export if the device is not capable.
I can look into that, but it will take some time so for now I think we
should go ahead with your series.
next prev parent reply other threads:[~2017-05-26 6:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20170525184327.23570-1-bart.vanassche@sandisk.com>
2017-05-25 18:43 ` [PATCH 06/19] nfsd: Check private request size before submitting a SCSI request Bart Van Assche
2017-05-25 18:48 ` J . Bruce Fields
2017-05-25 20:19 ` Bart Van Assche
2017-05-26 6:10 ` hch [this message]
2017-05-26 15:47 ` bfields
2017-05-26 6:10 ` 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=20170526061003.GF18424@lst.de \
--to=hch@lst.de \
--cc=Bart.VanAssche@sandisk.com \
--cc=axboe@fb.com \
--cc=axboe@kernel.dk \
--cc=bfields@fieldses.org \
--cc=jlayton@poochiereds.net \
--cc=linux-block@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=osandov@fb.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).