lkml.org 
[lkml]   [2015]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 0/3] uio: add MSI/MSI-X support to uio_pci_generic driver
From
Date


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


\
 
 \ /
  Last update: 2015-10-06 18:21    [W:0.219 / U:1.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site