From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by dpdk.org (Postfix) with ESMTP id 7BC4F5921 for ; Tue, 6 Oct 2015 17:41:33 +0200 (CEST) Received: by wicfx3 with SMTP id fx3so164972714wic.0 for ; Tue, 06 Oct 2015 08:41:33 -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=3F4b+puBd6nhBsxa0Yo8efxeY0AbVIarx0Z7rHZN1Fk=; b=lOzQJm+jpHeQ6QLaj+DzON2jT5g4vgxQ1UXxKuFDh1qC35Pda2Vm+ECf+kmZkgfWOQ kjQDZBFKC30exv37bks2WJHuVqaqmXph0zMUQD8X6wgcsUvvUeytSZOJ5cQ0F+ebedAI 5xrijgg/1OtR1UAFNn14tONB29E1jYKd4skoG1VVRd8uPbjFM+qFZrFFgEFPAGflDeIz drd2jPcrHUA5LGXz8OsgEQUQXn8IY+PG6qAFfs+Tjz/7PtUEqkkmGIdX/MgsZfpqxAAt FIpEELPXfNWwxAfvmT8f3yWF9fkGmZxtNX7UscWBOj4enG+ZejGVaAp9eyIRcRFTcczl 3SaQ== X-Gm-Message-State: ALoCoQnm1DqlYUcvwmUlKVEXheekRggRnHOFlVZKI5ztCkywC3OT6wt3IcUYweAQ5kqah6qovQbT X-Received: by 10.180.86.165 with SMTP id q5mr6050148wiz.52.1444146093086; Tue, 06 Oct 2015 08:41:33 -0700 (PDT) Received: from avi.cloudius-systems.com ([37.142.229.250]) by smtp.googlemail.com with ESMTPSA id ry1sm33275132wjb.24.2015.10.06.08.41.30 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 06 Oct 2015 08:41:31 -0700 (PDT) To: "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> <5613BB7D.3060202@scylladb.com> <20151006170037-mutt-send-email-mst@redhat.com> From: Avi Kivity Message-ID: <5613EBAA.7030802@scylladb.com> Date: Tue, 6 Oct 2015 18:41:30 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <20151006170037-mutt-send-email-mst@redhat.com> 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 15:41:33 -0000 On 10/06/2015 05:07 PM, Michael S. Tsirkin wrote: > On Tue, Oct 06, 2015 at 03:15:57PM +0300, Avi Kivity wrote: >> 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. > Poking at msix tables won't cause memory corruption unless msix and bus > mastering is enabled. It's a given that bus mastering is enabled. It's true that msix is unlikely to be enabled, unless msix support is added. > It's true root can enable msix and bus mastering > through sysfs - but that's easy to block or detect. Even if you don't > buy a security story, it seems less likely to trigger as a result > of a userspace bug. If you're doing DMA, that's the least of your worries. Still, zero-mapping the msix space seems reasonable, and can protect userspace from silly stuff. It can't be considered to have anything to do with security though, as long as users can simply DMA to every bit of RAM in the system they want to.