From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: linux-kernel@vger.kernel.org, tj@kernel.org,
FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>,
Doug Gilbert <dgilbert@interlog.com>,
linux-scsi@vger.kernel.org, Jens Axboe <axboe@kernel.dk>
Subject: Re: [PATCH v3 part1 1/4] sg_io: pass request_queue to blk_verify_command
Date: Sat, 25 May 2013 00:14:07 -0400 [thread overview]
Message-ID: <1369455247.1893.2.camel@dabdike> (raw)
In-Reply-To: <519F2597.9030208@redhat.com>
On Fri, 2013-05-24 at 10:32 +0200, Paolo Bonzini wrote:
> Il 24/05/2013 10:03, James Bottomley ha scritto:
> >>>>> > >>> Does anyone in the real world actually care about this bug?
> >>>> > >>
> >>>> > >> Yes, or I would move on and not waste so much time on this.
> >>> > >
> >>> > > Fine, so produce a simple fix for this bug which we can discuss that's
> >>> > > not tied to this feature.
> >> >
> >> > Honestly, I have no idea how this is even possible.
> > Really? It looks to me like a simple block on the commands for disk
> > devices in the opcode switch would do it (with a corresponding change to
> > sg.c:sg_allow_access).
>
> Which switch? What I can do is something like this in blk_verify_command:
not in blk_verify_command: outside of it, in the three places it's used.
> if (q->sgio_type == TYPE_ROM)
> return 0;
> if (rq->cmd[0] == 0xA4)
> return -EPERM;
> if (!is_write &&
> (req->cmd[0] == ... || rq->cmd[0] == ...))
> return -EPERM;
>
> But then the particular patch you're replying to is still necessary,
> and you're slowing down blk_verify_command.
It's a set if if switches in non performance critical code.
> It may be fine for stable
> and -rc, but IMHO it calls for a better implementation in 3.11.
What goes into stable should be what goes into the real kernel and it
helps separate the bug fix from feature argument.
James
> (Besides, I did it like this because it is what Tejun suggested).
next prev parent reply other threads:[~2013-05-25 4:14 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1369317503-4095-1-git-send-email-pbonzini@redhat.com>
2013-05-23 13:58 ` [PATCH v3 part1 1/4] sg_io: pass request_queue to blk_verify_command Paolo Bonzini
2013-05-24 7:36 ` James Bottomley
2013-05-24 7:43 ` Paolo Bonzini
2013-05-24 7:50 ` James Bottomley
2013-05-24 7:53 ` Paolo Bonzini
2013-05-24 8:03 ` James Bottomley
2013-05-24 8:32 ` Paolo Bonzini
2013-05-24 21:41 ` Paolo Bonzini
2013-05-25 4:14 ` James Bottomley [this message]
2013-05-25 6:18 ` Paolo Bonzini
2013-05-23 13:58 ` [PATCH v3 part1 2/4] sg_io: prepare to introduce per-class command filters Paolo Bonzini
2013-05-23 13:58 ` [PATCH v3 part1 3/4] sg_io: use different default filters for each device class Paolo Bonzini
2013-05-23 13:58 ` [PATCH v3 part1 4/4] sg_io: resolve conflicts between commands assigned to multiple classes (CVE-2012-4542) Paolo Bonzini
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=1369455247.1893.2.camel@dabdike \
--to=james.bottomley@hansenpartnership.com \
--cc=axboe@kernel.dk \
--cc=dgilbert@interlog.com \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=tj@kernel.org \
/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).