<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 11, 2018 at 2:48 PM, Erik Skultety <span dir="ltr"><<a href="mailto:eskultet@redhat.com" target="_blank">eskultet@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Mon, Jun 11, 2018 at 01:52:54PM +0200, Christian Ehrhardt wrote:<br>
> The base vfio has not much functionality but to provide a custom<br>
> container by opening this path.<br>
> See <a href="https://www.kernel.org/doc/Documentation/vfio.txt" rel="noreferrer" target="_blank">https://www.kernel.org/doc/<wbr>Documentation/vfio.txt</a> for more.<br>
><br>
> Systems with static hostdevs will get /dev/vfio/vfio by virt-aa-hotplug<br>
> right from the beginning. But if the guest initially had no hostdev at<br>
> all it will run into the following deny before the security module<br>
> labelling callbacks will make the actual vfio device (like /dev/vfio/93)<br>
> known.<br>
><br>
> Access by qemu is "wr" even thou in theory it could maybe be "r":<br>
<br>
</span>^this sentence is not necessary for the commit message and should be dropped.<br></blockquote><div><br></div><div>Agreed will be dropped on a V2 or when pushing the change.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
> [ 2652.756712] audit: type=1400 audit(1491303691.719:25):<br>
>   apparmor="DENIED" operation="open"<br>
>   profile="libvirt-17a61b87-<wbr>5132-497c-b928-421ac2ee0c8a"<br>
>   name="/dev/vfio/vfio" pid=8486 comm="qemu-system-x86"<br>
>   requested_mask="wr" denied_mask="wr" fsuid=64055 ouid=0<br>
><br>
> Bug-Ubuntu: <a href="https://bugs.launchpad.net/bugs/1678322" rel="noreferrer" target="_blank">https://bugs.launchpad.net/<wbr>bugs/1678322</a><br>
> Bug-Ubuntu: <a href="https://bugs.launchpad.net/bugs/1775777" rel="noreferrer" target="_blank">https://bugs.launchpad.net/<wbr>bugs/1775777</a><br>
><br>
> Signed-off-by: Christian Ehrhardt <<a href="mailto:christian.ehrhardt@canonical.com">christian.ehrhardt@canonical.<wbr>com</a>><br>
> Signed-off-by: Stefan Bader <<a href="mailto:stefan.bader@canonical.com">stefan.bader@canonical.com</a>><br>
> ---<br>
>  examples/apparmor/libvirt-qemu | 3 +++<br>
>  1 file changed, 3 insertions(+)<br>
><br>
> diff --git a/examples/apparmor/libvirt-<wbr>qemu b/examples/apparmor/libvirt-<wbr>qemu<br>
> index 2c47652250..874aca2092 100644<br>
> --- a/examples/apparmor/libvirt-<wbr>qemu<br>
> +++ b/examples/apparmor/libvirt-<wbr>qemu<br>
> @@ -193,6 +193,9 @@<br>
>    deny /dev/shm/lttng-ust-wait-* r,<br>
>    deny /run/shm/lttng-ust-wait-* r,<br>
><br>
> +  # for vfio hotplug on systems without static vfio (LP: #1775777)<br>
> +  /dev/vfio/vfio rw,<br>
<br>
</span>Per the kernel doc you linked in the commit message I think this is fine.<br>
<br>
Reviewed-by: Erik Skultety <<a href="mailto:eskultet@redhat.com">eskultet@redhat.com</a>><br></blockquote><div><br></div><div><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Thanks, will add the reviewed-by on a V2 or when pushing the change.</span> </div><div><br></div><div>I'll leave it out for discussion as-is a bit more ...</div></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><span style="color:rgb(136,136,136);font-size:12.8px">Christian Ehrhardt</span><div style="color:rgb(136,136,136);font-size:12.8px">Software Engineer, Ubuntu Server</div><div style="color:rgb(136,136,136);font-size:12.8px">Canonical Ltd</div></div></div></div></div>
</div></div>