From: Paolo Bonzini <pbonzini@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: tj@kernel.org, msnitzer@redhat.com, ksievers@redhat.com,
jbottomley@parallels.com, axboe@kernel.dk
Subject: [RFC PATCH 0/4] SG_IO filtering via sysfs and minimal whitelist
Date: Mon, 27 May 2013 15:50:18 +0200 [thread overview]
Message-ID: <1369662622-5959-1-git-send-email-pbonzini@redhat.com> (raw)
On Wed, 12 Sep 2012 09:05:41 +0100, James Bottomley wrote:
> This is why the whole filter thing was mutable via sysfs. That way the
> admin could set this up per device. It sounds like this is what you
> want to fix, rather than opening up more holes in an already leaky
> security apparatus. The ideal is that we would be much more restrictive
> by default and give root the ability to override this both globally and
> per-device to conform to whatever policy it has for the virtual
> environments.
>
> The patch which removed all of the sysfs pieces was:
>
> commit 018e0446890661504783f92388ecce7138c1566d
> Author: Jens Axboe <jens.axboe@oracle.com>
> Date: Fri Jun 26 16:27:10 2009 +0200
>
> block: get rid of queue-private command filter
>
> So that's probably the place to start for putting it back properly.
[https://lkml.org/lkml/2012/9/12/76]
We've been running in circles for nine months now. Let's restart from
the maintainer's suggestion, which was probably dismissed too quickly.
This is still not a complete solution, because /dev/sgN does not have
access to its queue object. Still, it can be a base for discussion.
If accepted (in a complete form with access to the queue object for
non-block devices), this series removes the need to fix the opcode
conflicts as far as I'm concerned. We could just consider that a
feature of CONFIG_BLK_DEV_SG_FILTER_MMC.
Previously posted at https://lkml.org/lkml/2012/9/25/397 (short thread).
Rebased just fine, this one is compile-tested only.
Paolo
Paolo Bonzini (4):
block: add back queue-private command filter
scsi: create an all-zero filter for scanners
block: add back command filter modification via sysfs
scsi: lock out SG_IO by default to unprivileged users
Documentation/block/queue-sysfs.txt | 16 +++++
block/Kconfig | 22 ++++++
block/blk-sysfs.c | 43 ++++++++++++
block/bsg.c | 2 +-
block/scsi_ioctl.c | 131 +++++++++++++++++++++++++++++++-----
drivers/scsi/scsi_scan.c | 8 ++-
drivers/scsi/sg.c | 7 +-
include/linux/blkdev.h | 31 ++++++++-
8 files changed, 238 insertions(+), 22 deletions(-)
--
1.8.1.4
next reply other threads:[~2013-05-27 13:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-27 13:50 Paolo Bonzini [this message]
2013-05-27 13:50 ` [RFC PATCH 1/4] block: add back queue-private command filter Paolo Bonzini
2013-05-27 13:50 ` [RFC PATCH 2/4] scsi: create an all-zero filter for scanners Paolo Bonzini
2013-05-27 13:50 ` [RFC PATCH 3/4] block: add back command filter modification via sysfs Paolo Bonzini
2013-05-27 13:50 ` [RFC PATCH 4/4] scsi: lock out SG_IO by default to unprivileged users Paolo Bonzini
[not found] <1369662622-5959-1-git-send-email-pbonzini__802.478011655872$1369666532$gmane$org@redhat.com>
2013-06-25 21:19 ` [RFC PATCH 0/4] SG_IO filtering via sysfs and minimal whitelist Paolo Bonzini
2013-07-05 13:54 ` 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=1369662622-5959-1-git-send-email-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=axboe@kernel.dk \
--cc=jbottomley@parallels.com \
--cc=ksievers@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=msnitzer@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
all inboxes | Powered by JetHome®