linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] add per-device sysfs knob to enable unrestricted, unprivileged SG_IO
@ 2012-11-13 17:25 Paolo Bonzini
  2012-11-13 17:25 ` [PATCH v3 1/2] sg_io: pass request_queue to blk_verify_command Paolo Bonzini
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Paolo Bonzini @ 2012-11-13 17:25 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-scsi, Alan Cox, James Bottomley, Jens Axboe, Ric Wheeler,
	Tejun Heo

Privilege restrictions for SG_IO right now apply without distinction to
all devices, based on the single capability CAP_SYS_RAWIO.  This is a very
broad capability, and makes it difficult to give SG_IO access to trusted
clients that need access to persistent reservations, trim/discard, or
vendor-specific commands.  One problem here is that CAP_SYS_RAWIO allows
to escape a partition and issue commands that affect the full disk,
thus making DAC almost useless.

For simplicity, this series attempts to solve one case only: you want
to pass through almost everything, but still run as confined as possible.
This is for example the case for virtualization, where more complex
filtering can be done just as easily in userspace, in the virtual
machine monitor.  (This does mean the filter can be subverted if the
guest can escape the QEMU jail, but a more generic approach involving
a bitmap was NACKed).

Ok for 3.8?

v2->v3: change bitmap filter to boolean

Paolo Bonzini (2):
  sg_io: pass request_queue to blk_verify_command
  sg_io: introduce unpriv_sgio queue flag

 block/blk-sysfs.c      |   32 ++++++++++++++++++++++++++++++++
 block/bsg.c            |    2 +-
 block/scsi_ioctl.c     |    9 +++++----
 drivers/scsi/sg.c      |    3 ++-
 include/linux/blkdev.h |    6 +++++-
 5 files changed, 45 insertions(+), 7 deletions(-)

-- 
1.7.4.1

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-01-04 18:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-13 17:25 [PATCH v3 0/2] add per-device sysfs knob to enable unrestricted, unprivileged SG_IO Paolo Bonzini
2012-11-13 17:25 ` [PATCH v3 1/2] sg_io: pass request_queue to blk_verify_command Paolo Bonzini
2012-11-13 17:38   ` Tejun Heo
2012-11-13 17:25 ` [PATCH v3 2/2] sg_io: introduce unpriv_sgio queue flag Paolo Bonzini
2012-11-13 17:38   ` Tejun Heo
2012-12-17 14:27 ` [PATCH v3 0/2] add per-device sysfs knob to enable unrestricted, unprivileged SG_IO Paolo Bonzini
2013-01-04 18:48   ` Ping^2 " Paolo Bonzini

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).