From: Paolo Bonzini <pbonzini@redhat.com>
To: James Bottomley <James.Bottomley@HansenPartnership.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: Fri, 24 May 2013 10:32:23 +0200 [thread overview]
Message-ID: <519F2597.9030208@redhat.com> (raw)
In-Reply-To: <1369382613.1945.19.camel@dabdike>
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:
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 may be fine for stable
and -rc, but IMHO it calls for a better implementation in 3.11.
(Besides, I did it like this because it is what Tejun suggested).
Paolo
next prev parent reply other threads:[~2013-05-24 8:32 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 [this message]
2013-05-24 21:41 ` Paolo Bonzini
2013-05-25 4:14 ` James Bottomley
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=519F2597.9030208@redhat.com \
--to=pbonzini@redhat.com \
--cc=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=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).