From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f179.google.com (mail-wi0-f179.google.com [209.85.212.179]) by dpdk.org (Postfix) with ESMTP id 269F78E67 for ; Thu, 1 Oct 2015 11:15:52 +0200 (CEST) Received: by wicfx3 with SMTP id fx3so23164628wic.1 for ; Thu, 01 Oct 2015 02:15:52 -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; bh=qzAg4ck4PV6FF+npFI5ES89ucHcwjOVP9PaWwAn5VFc=; b=crb29KLQtMOaEapaiM7XgtwDG4DCqJKrT1OvXGDbikVq5iPlfDkxAMBfmXQ1CmDyt5 sUTGglfK5iniZxnhAmq4yc3w1ViO2KzedvsGkdnm8MBuXKU86cRcF1lnIxWaHPJWXmji RVoiepqDsL0XAamkpmEuM+Fw9ffThm6tBJgY6pnmcaAK1KiPQsmOmzkvVB0kdwP4+wzQ 8lk11YGk2xM4wJcufX3m5CVN5Xp0xjsXtKrhpKg4zXgaqA/HGYPQhf/Q/xgZuecDDXFF VU7wQ5rlBGTY74AMvcO+FgpVot9mUj7NZkYjO5p1J1twid6z1rylsSQIl7PBqnIneml6 KfcQ== X-Gm-Message-State: ALoCoQngJ6fkmG2HBYmfpkLFu6w+SETz5ZRqjK4Y0VDiEzxHspZKdMVr8mQFDxazgGk+XyF8hvt4 X-Received: by 10.194.204.195 with SMTP id la3mr8975284wjc.77.1443690952006; Thu, 01 Oct 2015 02:15:52 -0700 (PDT) Received: from avi.cloudius ([37.142.229.250]) by smtp.googlemail.com with ESMTPSA id go5sm2158521wib.3.2015.10.01.02.15.50 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Oct 2015 02:15:50 -0700 (PDT) To: "Michael S. Tsirkin" References: <560BCD2F.5060505@cloudius-systems.com> <20150930150115-mutt-send-email-mst@redhat.com> <560BD284.7040505@cloudius-systems.com> <20150930151632-mutt-send-email-mst@redhat.com> <560BDE24.8000308@scylladb.com> <20150930165359-mutt-send-email-mst@redhat.com> <560BF782.4070308@scylladb.com> <20150930175848-mutt-send-email-mst@redhat.com> <560C0171.7080507@scylladb.com> <20150930204016.GA29975@redhat.com> <20151001113828-mutt-send-email-mst@redhat.com> <560CF44A.60102@scylladb.com> From: Avi Kivity Message-ID: <560CF9C5.8050901@scylladb.com> Date: Thu, 1 Oct 2015 12:15:49 +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: <560CF44A.60102@scylladb.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] Having troubles binding an SR-IOV VF to uio_pci_generic on Amazon instance 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: Thu, 01 Oct 2015 09:15:52 -0000 On 10/01/2015 11:52 AM, Avi Kivity wrote: > > > On 10/01/2015 11:44 AM, Michael S. Tsirkin wrote: >> On Wed, Sep 30, 2015 at 11:40:16PM +0300, Michael S. Tsirkin wrote: >>>> And for what, to prevent >>>> root from touching memory via dma that they can access in a million other >>>> ways? >>> So one can be reasonably sure a kernel oops is not a result of a >>> userspace bug. >> Actually, I thought about this overnight, and it should be possible to >> drive it securely from userspace, without hypervisor changes. > > Also without the performance that was the whole reason from doing it > in userspace in the first place. > > I still don't understand your objection to the patch: > >> MSI messages are memory writes so any generic device capable >> of MSI is capable of corrupting kernel memory. >> This means that a bug in userspace will lead to kernel memory corruption >> and crashes. This is something distributions can't support. > And this: > What userspace can't be allowed to do: > > access BAR > write rings > It can access the BAR by mmap()ing the resourceN files under sysfs. You're not denying userspace the ability to oops the kernel, just the ability to do useful things with hardware.