From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-la0-f52.google.com (mail-la0-f52.google.com [209.85.215.52]) by dpdk.org (Postfix) with ESMTP id C02173787 for ; Tue, 6 Oct 2015 14:16:00 +0200 (CEST) Received: by lafb9 with SMTP id b9so54432337laf.0 for ; Tue, 06 Oct 2015 05:16:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=FvXkkQof40Kq6e8fBVEYuAPRFSwoH6GOChMVHqxR3Ps=; b=PPmVSseGjffuRZI2FxUYBrjtrvnZU9hwSw2sD0PaeaK197o8CqIOYvt6LRLBq9YyPY gLxkZrHLtPGw51g/JKhiYTHmjm8OC+UJx/2kT18lM2Vw5FWcvwBc7uPJO2gd1BpE0Bi9 s6GxcbjNQ3+kH9XUvId1cpEdlhziRwNC3K0TNlJq4c7LO9A5AjCefz5X23W9laSRAI+0 3GiyKZ75T4kr+8uYGhz667fnSE/71JL64gmeJ/HbdKlCBkjZLnP3rqoaz2HU4dEEQ2Av glNlU1eo9CFm2eplKwOiYXQ/eH8w9rn/QNFtEp0TBY1KJDpPnh9S+r7UKe3BFT8Dnvsp kJMw== X-Gm-Message-State: ALoCoQlaTFoQOgmZGMkhzDlHn0bAFiGL4i0ujQWmmJttXgwTvA1MINHT8GjZQaZwL//cnGKYW1ha X-Received: by 10.112.210.129 with SMTP id mu1mr14700004lbc.68.1444133760161; Tue, 06 Oct 2015 05:16:00 -0700 (PDT) Received: from avi.cloudius ([37.142.229.250]) by smtp.googlemail.com with ESMTPSA id v6sm5161003lby.49.2015.10.06.05.15.58 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 06 Oct 2015 05:15:59 -0700 (PDT) To: Stephen Hemminger , "Michael S. Tsirkin" References: <1443652138-31782-1-git-send-email-stephen@networkplumber.org> <1443652138-31782-3-git-send-email-stephen@networkplumber.org> <20151001104505-mutt-send-email-mst@redhat.com> <20151005215455.GA7608@redhat.com> <20151006013000-mutt-send-email-mst@redhat.com> <20151006083356.3da3defa@uryu.home.lan> From: Avi Kivity Message-ID: <5613BB7D.3060202@scylladb.com> Date: Tue, 6 Oct 2015 15:15:57 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20151006083356.3da3defa@uryu.home.lan> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, hjk@hansjkoch.de, gregkh@linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 12:16:01 -0000 On 10/06/2015 10:33 AM, 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. > > 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. 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. vfio's charter was explicitly aiming for modern setups with iommus. This could be revisited, but I agree it will have even more resistance, justified IMO. btw, (2) doesn't really add any insecurity. The user could already poke at the msix tables (as well as perform DMA); they just couldn't get a useful interrupt out of them. Maybe a module parameter "allow_insecure_dma" can be added to uio_pci_generic. Without the parameter, bus mastering and msix is disabled, with the parameter it is allowed. This requires the sysadmin to take a positive step in order to make use of their hardware.