kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] kvm: Lock down device assignment
@ 2011-12-20  3:19 Alex Williamson
  2011-12-20  3:19 ` [PATCH 1/2] kvm: Remove ability to assign a device without iommu support Alex Williamson
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Alex Williamson @ 2011-12-20  3:19 UTC (permalink / raw)
  To: avi, kvm; +Cc: linux-kernel, jan.kiszka

Two patches to try to better secure the device assignment ioctl.
This firt patch makes KVM_DEV_ASSIGN_ENABLE_IOMMU a mandatory
option when assigning a device.  I don't believe we have any
users of this option, so I think we can skip any deprecation
period, especially since it's existence is rather dangerous.

The second patch introduces some file permission checking that Avi
suggested.  If a user has been granted read/write permission to
the PCI sysfs BAR resource files, this is a good indication that
they have access to the device.  We can't call sys_faccessat
directly (not exported), but the important bits are self contained
enough to include directly.  This still works with sudo and libvirt
usage, the latter already grants qemu permission to these files.
Thanks,

Alex

---

Alex Williamson (2):
      kvm: Device assignment permission checks
      kvm: Remove ability to assign a device without iommu support


 virt/kvm/assigned-dev.c |   73 +++++++++++++++++++++++++++++++++++++++++------
 1 files changed, 63 insertions(+), 10 deletions(-)

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

end of thread, other threads:[~2011-12-20 14:28 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-20  3:19 [PATCH 0/2] kvm: Lock down device assignment Alex Williamson
2011-12-20  3:19 ` [PATCH 1/2] kvm: Remove ability to assign a device without iommu support Alex Williamson
2011-12-20  8:49   ` Sasha Levin
2011-12-20  9:03     ` Jan Kiszka
2011-12-20  9:08       ` Sasha Levin
2011-12-20  9:12         ` Jan Kiszka
2011-12-20  9:14           ` Avi Kivity
2011-12-20 14:28         ` Alex Williamson
2011-12-20  9:19   ` Avi Kivity
2011-12-20  3:19 ` [PATCH 2/2] kvm: Device assignment permission checks Alex Williamson
2011-12-20  9:23 ` [PATCH 0/2] kvm: Lock down device assignment Avi Kivity

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