<div dir="ltr"><div><div>Hi<br><br></div>What's the status with this patch? If I understand the discussion, it is needed, but not enough. Now that SELinux has been fixed (both in f24/f25 now), I can see only the ACL left: setfacl -m u:qemu:rw /dev/dri/renderD128 + this patch allows me to setup a system VM with virgl. (though tbh, I would be fine restricting virgl to qemu:///session only)<br><br></div><div>thanks<br></div><div><div><div><br><div class="gmail_quote"><div dir="ltr">On Sat, May 21, 2016 at 1:10 AM Cole Robinson <<a href="mailto:crobinso@redhat.com">crobinso@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 05/20/2016 03:54 AM, Ján Tomko wrote:<br class="gmail_msg">
> On Thu, May 19, 2016 at 01:52:00PM +0100, Daniel P. Berrange wrote:<br class="gmail_msg">
>> On Thu, May 19, 2016 at 08:36:35AM -0400, Cole Robinson wrote:<br class="gmail_msg">
>>> On 05/19/2016 08:21 AM, Daniel P. Berrange wrote:<br class="gmail_msg">
>>>> On Thu, May 19, 2016 at 01:29:07PM +0200, Ján Tomko wrote:<br class="gmail_msg">
>>>>> Allow access to /dev/dri/render* devices for domains<br class="gmail_msg">
>>>>> using <graphics type="spice"> with <gl enable="yes"/><br class="gmail_msg">
>>>>><br class="gmail_msg">
>>>>> <a href="https://bugzilla.redhat.com/show_bug.cgi?id=1337290" rel="noreferrer" class="gmail_msg" target="_blank">https://bugzilla.redhat.com/show_bug.cgi?id=1337290</a><br class="gmail_msg">
>>>><br class="gmail_msg">
>>>> Ignoring cgroups for a minute, how exactly does QEMU get access to<br class="gmail_msg">
>>>> the /dev/dri/render* devices in general ?  ie when QEMU is running<br class="gmail_msg">
>>>> as the 'qemu:qemu' user/group account, with selinux enforcing I<br class="gmail_msg">
>>>> don't see how it can possibly open these files, as we're not granting<br class="gmail_msg">
>>>> access to them in any of the security drivers. Given this, allowing<br class="gmail_msg">
>>>> them in cgroups seems like the least of our problems.<br class="gmail_msg">
>>>><br class="gmail_msg">
><br class="gmail_msg">
> I saw this more as "not denying access" instead of allowing access.<br class="gmail_msg">
> For dac/SELinux, if the user adds qemu to the video group/adds ACLs<br class="gmail_msg">
> or creates a SELinux rule for it (or the more realistic solution<br class="gmail_msg">
> mentioned by Cole), libvirt will not interfere. But it would deny "*:*"<br class="gmail_msg">
> devices, giving a "Permission denied" (which is also harder to debug<br class="gmail_msg">
> than the other two security measures)<br class="gmail_msg">
><br class="gmail_msg">
<br class="gmail_msg">
I agree with this, and the patch in general. Dave and Gerd confirmed that this<br class="gmail_msg">
is expected to be a shared resource, so I think extending the cgroups<br class="gmail_msg">
whitelist is going to happen eventually anyways.<br class="gmail_msg">
<br class="gmail_msg">
The svirt/dac issues are real and we need to figure that out, but it's kind of<br class="gmail_msg">
irrelevant at this stage; the word is out on this stuff and people are going<br class="gmail_msg">
to find a way to enable it one way or the other. I've already had discussions<br class="gmail_msg">
with 5 people this week about when support will be available in virt-manager.<br class="gmail_msg">
Heck I know people were already using the qemu command line passthrough magic<br class="gmail_msg">
to test GL with the qemu gtk frontend with older qemu. This is just one of<br class="gmail_msg">
those features that people are going to want to play with, integration issues<br class="gmail_msg">
be damned, so IMO better that we get out in front of it.<br class="gmail_msg">
<br class="gmail_msg">
What I'm afraid of specifically with this cgroups issue is people will work<br class="gmail_msg">
around it with a custom cgroup_device_acl, then some time later when we bump<br class="gmail_msg">
the default list to make some new qemu feature work, suddenly that old cgroup<br class="gmail_msg">
list doesn't cut it and the user get's weird errors with new qemu, which we<br class="gmail_msg">
have to debug. svirt and dac workarounds are less scary in that regard<br class="gmail_msg">
<br class="gmail_msg">
- Cole<br class="gmail_msg">
<br class="gmail_msg">
--<br class="gmail_msg">
libvir-list mailing list<br class="gmail_msg">
<a href="mailto:libvir-list@redhat.com" class="gmail_msg" target="_blank">libvir-list@redhat.com</a><br class="gmail_msg">
<a href="https://www.redhat.com/mailman/listinfo/libvir-list" rel="noreferrer" class="gmail_msg" target="_blank">https://www.redhat.com/mailman/listinfo/libvir-list</a><br class="gmail_msg">
</blockquote></div></div></div></div></div><div dir="ltr">-- <br></div><div data-smartmail="gmail_signature"><div dir="ltr">Marc-André Lureau<br></div></div>