From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: Having troubles binding an SR-IOV VF to uio_pci_generic on Amazon instance Date: Tue, 29 Sep 2015 23:54:54 +0300 Message-ID: <20150929235122-mutt-send-email-mst@redhat.com> References: <56079527.3000802@cloudius-systems.com> <20150927123914-mutt-send-email-mst@redhat.com> <560ABF25.9030300@cloudius-systems.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "dev@dpdk.org" To: Vlad Zolotarov Return-path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 5135058EF for ; Tue, 29 Sep 2015 22:54:58 +0200 (CEST) Content-Disposition: inline In-Reply-To: <560ABF25.9030300@cloudius-systems.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, Sep 29, 2015 at 07:41:09PM +0300, Vlad Zolotarov wrote: > The security breach motivation u brought in "[RFC PATCH] uio: > uio_pci_generic: Add support for MSI interrupts" thread seems a bit weak > since one u let the userland access to the bar it may do any funny thing > using the DMA engine of the device. This kind of stuff should be prevented > using the iommu and if it's enabled then any funny tricks using MSI/MSI-X > configuration will be prevented too. > > I'm about to send the patch to main Linux mailing list. Let's continue this > discussion there. > Basically UIO shouldn't be used with devices capable of DMA. Use VFIO for that (yes, this implies an emulated or PV IOMMU). I don't think this can change. > > > >I think that DPDK should be fixed to not require uio_pci_generic > >for VF devices (or any devices without INT#x). > > > >If DPDK requires a place-holder driver, the pci-stub driver should > >do this adequately. See ./drivers/pci/pci-stub.c > >