Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1240439
| From | "Michael S. Tsirkin" <mst@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X |
| Date | 2015-10-06 15:50 +0200 |
| Message-ID | <qgAMV-7L3-9@gated-at.bofh.it> (permalink) |
| References | (2 earlier) <qeHzc-76i-15@gated-at.bofh.it> <qglXB-37e-29@gated-at.bofh.it> <qgmJY-4k3-21@gated-at.bofh.it> <qgmJY-4k3-19@gated-at.bofh.it> <qgv0S-7Vp-23@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Oct 06, 2015 at 08:33:56AM +0100, Stephen Hemminger wrote: > Other than implementation objections, so far the two main arguments > against this reduce to: > 1. If you allow UIO ioctl then it opens an API hook for all the crap out > of tree UIO drivers to do what they want. > 2. If you allow UIO MSI-X then you are expanding the usage of userspace > device access in an insecure manner. That's not all. Without MSI one can detect insecure usage by detecting userspace enabling bus mastering. This can be detected simply using lspci. Or one can also imagine a configuration where this ability is disabled, is logged, or taints kernel. This seems like something that might be worth having for some locked-down systems. OTOH enabling MSI requires enabling bus mastering so suddenly we have no idea whether device can be/is used in a safe way. > > Another alternative which I explored was making a version of VFIO that > works without IOMMU. It solves #1 but actually increases the likely negative > response to arguent #2. No - because VFIO has limited protection against device misuse by userspace, by limiting access to sub-ranges of device BARs and config space. For a device that doesn't do DMA, that will be enough to make it secure to use. That's a pretty weak excuse to support userspace drivers for PCI devices without an IOMMU, but it's the best I heard so far. Is that worth the security trade-off? I'm still not sure. > This would keep same API, and avoid having to > modify UIO. But we would still have the same (if not more resistance) > from IOMMU developers who believe all systems have to be secure against > root. "Secure against root" is a confusing way to put it IMHO. We are talking about memory protection. So that's not IOMMU developers IIUC. I believe most kernel developers will agree it's not a good idea to let userspace corrupt kernel memory. Otherwise, the driver can't be supported, and maintaining upstream drivers that can't be supported serves no useful purpose. Anyone can load out of tree ones just as well. VFIO already supports MSI so VFIO developers already have a lot of experience with these issues. Getting their input would be valuable. -- MST -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/2] uio_msi: device driver Stephen Hemminger <stephen@networkplumber.org> - 2015-10-01 00:30 +0200
[PATCH 2/2] uio: new driver to support PCI MSI-X Stephen Hemminger <stephen@networkplumber.org> - 2015-10-01 00:30 +0200
Re: [PATCH 2/2] uio: new driver to support PCI MSI-X "Michael S. Tsirkin" <mst@redhat.com> - 2015-10-01 10:40 +0200
Re: [PATCH 2/2] uio: new driver to support PCI MSI-X "Michael S. Tsirkin" <mst@redhat.com> - 2015-10-01 12:40 +0200
Re: [PATCH 2/2] uio: new driver to support PCI MSI-X "Michael S. Tsirkin" <mst@redhat.com> - 2015-10-01 18:10 +0200
Re: [PATCH 2/2] uio: new driver to support PCI MSI-X Stephen Hemminger <stephen@networkplumber.org> - 2015-10-01 17:00 +0200
Re: [PATCH 2/2] uio: new driver to support PCI MSI-X "Michael S. Tsirkin" <mst@redhat.com> - 2015-10-01 17:30 +0200
Re: [PATCH 2/2] uio: new driver to support PCI MSI-X "Michael S. Tsirkin" <mst@redhat.com> - 2015-10-01 18:40 +0200
Re: [PATCH 2/2] uio: new driver to support PCI MSI-X Stephen Hemminger <stephen@networkplumber.org> - 2015-10-01 19:30 +0200
Re: [PATCH 2/2] uio: new driver to support PCI MSI-X "Michael S. Tsirkin" <mst@redhat.com> - 2015-10-01 20:30 +0200
Re: [PATCH 2/2] uio: new driver to support PCI MSI-X "Michael S. Tsirkin" <mst@redhat.com> - 2015-10-06 00:00 +0200
Re: [dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X "Michael S. Tsirkin" <mst@redhat.com> - 2015-10-06 00:50 +0200
Re: [dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X Stephen Hemminger <stephen@networkplumber.org> - 2015-10-06 09:40 +0200
Re: [dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X Avi Kivity <avi@scylladb.com> - 2015-10-06 14:20 +0200
Re: [dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X "Michael S. Tsirkin" <mst@redhat.com> - 2015-10-06 16:10 +0200
Re: [dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X Avi Kivity <avi@scylladb.com> - 2015-10-06 17:50 +0200
Re: [dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X Thomas Monjalon <thomas.monjalon@6wind.com> - 2015-10-16 19:20 +0200
Re: [dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X Stephen Hemminger <stephen@networkplumber.org> - 2015-10-16 19:30 +0200
Re: [dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X "Michael S. Tsirkin" <mst@redhat.com> - 2015-10-06 15:50 +0200
Re: [dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X Vlad Zolotarov <vladz@cloudius-systems.com> - 2015-10-06 10:30 +0200
Re: [dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X "Michael S. Tsirkin" <mst@redhat.com> - 2015-10-06 16:00 +0200
Re: [dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X Vlad Zolotarov <vladz@cloudius-systems.com> - 2015-10-06 16:50 +0200
Re: [dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X "Michael S. Tsirkin" <mst@redhat.com> - 2015-10-06 17:10 +0200
Re: [dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X Vlad Zolotarov <vladz@cloudius-systems.com> - 2015-10-06 18:50 +0200
Re: [dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X Alexander Duyck <alexander.duyck@gmail.com> - 2015-10-02 01:50 +0200
Re: [dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X Stephen Hemminger <stephen@networkplumber.org> - 2015-10-02 02:10 +0200
Re: [dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X Alexander Duyck <alexander.duyck@gmail.com> - 2015-10-02 04:40 +0200
Re: [dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X Stephen Hemminger <stephen@networkplumber.org> - 2015-10-02 02:10 +0200
Re: [dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X Alexander Duyck <alexander.duyck@gmail.com> - 2015-10-02 03:30 +0200
[PATCH 1/2] uio: add support for ioctls Stephen Hemminger <stephen@networkplumber.org> - 2015-10-01 00:30 +0200
Re: [PATCH 0/2] uio_msi: device driver "Michael S. Tsirkin" <mst@redhat.com> - 2015-10-01 10:40 +0200
Re: [dpdk-dev] [PATCH 0/2] uio_msi: device driver Avi Kivity <avi@scylladb.com> - 2015-10-01 13:00 +0200
Re: [dpdk-dev] [PATCH 0/2] uio_msi: device driver Stephen Hemminger <stephen@networkplumber.org> - 2015-10-01 17:00 +0200
Re: [dpdk-dev] [PATCH 0/2] uio_msi: device driver Alexander Duyck <alexander.duyck@gmail.com> - 2015-10-01 21:50 +0200
Re: [dpdk-dev] [PATCH 0/2] uio_msi: device driver Stephen Hemminger <stephen@networkplumber.org> - 2015-10-02 00:10 +0200
Re: [dpdk-dev] [PATCH 0/2] uio_msi: device driver Alexander Duyck <alexander.duyck@gmail.com> - 2015-10-02 01:10 +0200
Re: [dpdk-dev] [PATCH 0/2] uio_msi: device driver Stephen Hemminger <stephen@networkplumber.org> - 2015-10-02 01:40 +0200
Re: [dpdk-dev] [PATCH 0/2] uio_msi: device driver Alexander Duyck <alexander.duyck@gmail.com> - 2015-10-02 01:50 +0200
Re: [dpdk-dev] [PATCH 0/2] uio_msi: device driver Stephen Hemminger <stephen@networkplumber.org> - 2015-10-02 02:10 +0200
Re: [dpdk-dev] [PATCH 0/2] uio_msi: device driver Alexander Duyck <alexander.duyck@gmail.com> - 2015-10-02 03:40 +0200
Re: [dpdk-dev] [PATCH 0/2] uio_msi: device driver Vlad Zolotarov <vladz@cloudius-systems.com> - 2015-10-04 19:00 +0200
Re: [dpdk-dev] [PATCH 0/2] uio_msi: device driver Greg KH <gregkh@linux-foundation.org> - 2015-10-04 21:10 +0200
Re: [dpdk-dev] [PATCH 0/2] uio_msi: device driver Vlad Zolotarov <vladz@cloudius-systems.com> - 2015-10-04 22:50 +0200
csiph-web