[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2c62b5c7-582a-c710-0436-4ac5e8fd8b39@redhat.com>
Date: Fri, 4 Jun 2021 18:10:51 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: Jason Gunthorpe <jgg@...dia.com>
Cc: Alex Williamson <alex.williamson@...hat.com>,
"Tian, Kevin" <kevin.tian@...el.com>,
Jean-Philippe Brucker <jean-philippe@...aro.org>,
"Jiang, Dave" <dave.jiang@...el.com>,
"Raj, Ashok" <ashok.raj@...el.com>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
Jonathan Corbet <corbet@....net>,
Robin Murphy <robin.murphy@....com>,
LKML <linux-kernel@...r.kernel.org>,
"iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>,
David Gibson <david@...son.dropbear.id.au>,
Kirti Wankhede <kwankhede@...dia.com>,
David Woodhouse <dwmw2@...radead.org>,
Jason Wang <jasowang@...hat.com>
Subject: Re: [RFC] /dev/ioasid uAPI proposal
On 04/06/21 18:03, Jason Gunthorpe wrote:
> On Fri, Jun 04, 2021 at 05:57:19PM +0200, Paolo Bonzini wrote:
>> I don't want a security proof myself; I want to trust VFIO to make the right
>> judgment and I'm happy to defer to it (via the KVM-VFIO device).
>>
>> Given how KVM is just a device driver inside Linux, VMs should be a slightly
>> more roundabout way to do stuff that is accessible to bare metal; not a way
>> to gain extra privilege.
>
> Okay, fine, lets turn the question on its head then.
>
> VFIO should provide a IOCTL VFIO_EXECUTE_WBINVD so that userspace VFIO
> application can make use of no-snoop optimizations. The ability of KVM
> to execute wbinvd should be tied to the ability of that IOCTL to run
> in a normal process context.
>
> So, under what conditions do we want to allow VFIO to giave a process
> elevated access to the CPU:
Ok, I would definitely not want to tie it *only* to CAP_SYS_RAWIO (i.e.
#2+#3 would be worse than what we have today), but IIUC the proposal
(was it yours or Kevin's?) was to keep #2 and add #1 with an
enable/disable ioctl, which then would be on VFIO and not on KVM. I
assumed Alex was more or less okay with it, given he included me in the
discussion.
If later y'all switch to "it's always okay to issue the enable/disable
ioctl", I guess the rationale would be documented in the commit message.
Paolo
>>> 1) User has access to a device that can issue no-snoop TLPS
>>> 2) User has access to an IOMMU that can not block no-snoop (today)
>>> 3) Require CAP_SYS_RAW_IO
>>> 4) Anyone
>
> Jason
>
Powered by blists - more mailing lists