Re: [PATCH v3 0/3] uio: add MSI/MSI-X support to uio_pci_generic driver
From: Avi Kivity
Date: Tue Oct 06 2015 - 12:09:18 EST
On 10/06/2015 06:15 PM, Michael S. Tsirkin wrote:
While it is possible that userspace malfunctions and accidentally programs
MSI incorrectly, the risk is dwarfed by the ability of userspace to program
DMA incorrectly.
That seems to imply that for the upstream kernel this is not a valid usecase at all.
That is trivially incorrect, upstream pci_uio_generic is used with dpdk
for years. Are dpdk applications an invalid use case?
Again:
- security is not compromised. you need to be root to (ab)use this.
- all of the potentially compromising functionality has been there from
day 1
- uio_pci_generic is the only way to provide the required performance on
some configurations (where kernel drivers, or userspace drivers + iommu
are too slow)
- uio_pci_generic + msix is the only way to enable userspace drivers on
some configurations (SRIOV)
The proposed functionality does not increase the attack surface.
The proposed functionality marginally increases the bug surface.
The proposed functionality is a natural evolution of uio_pci_generic.
There is a new class of applications (network function virtualization)
which require this. They can't use the kernel drivers because they are
too slow. They can't use the iommu because it is either too slow, or
taken over by the hypervisor. They are willing to live with less kernel
protection, because they are a single user application anyway (and since
they use a kernel bypass, they don't really care that much about the
kernel).
The kernel serves more use-cases than a desktop or a multi-user
servers. Some of these users are willing to trade off protection for
performance or functionality (an extreme, yet similar, example is
linux-nommu, which allows any application to access any bit of memory,
due to the lack of protection hardware).
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/