<div dir="ltr">Hi Michal,<div>yes it is essentially a "follow on" or "another case of" what I already submitted in</div><div><a href="https://www.redhat.com/archives/libvir-list/2017-August/msg00312.html">https://www.redhat.com/archives/libvir-list/2017-August/msg00312.html</a><br></div><div><br></div><div>I didn't want to add walls of text each time, but yeah due to image locking.</div><div>Let me know if I should submit a v2 which states so more explicitly.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 17, 2017 at 1:23 PM, Michal Privoznik <span dir="ltr"><<a href="mailto:mprivozn@redhat.com" target="_blank">mprivozn@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 08/17/2017 10:55 AM, Christian Ehrhardt wrote:<br>
> Testing qemu-2.10-rc3 shows issues like:<br>
>   qemu-system-aarch64: -drive file=/home/ubuntu/vm-start-<wbr>stop/vms/<br>
>   7936-0_CODE.fd,if=pflash,<wbr>format=raw,unit=1: Failed to unlock byte 100<br>
><br>
> There is an apparmor deny due to qemu now locking those files:<br>
>  apparmor="DENIED" operation="file_lock" [...]<br>
>  name="/home/ubuntu/vm-start-<wbr>stop/vms/7936-0_CODE.fd"<br>
>  name="/var/lib/uvtool/libvirt/<wbr>images/kvmguest-artful-normal.<wbr>qcow"<br>
>  [...] comm="qemu-system-aarch64" requested_mask="k" denied_mask="k"<br>
><br>
> The profile needs to allow locking for loader and nvram files via<br>
> the locking (k) rule.<br>
><br>
> Signed-off-by: Christian Ehrhardt <<a href="mailto:christian.ehrhardt@canonical.com">christian.ehrhardt@canonical.<wbr>com</a>><br>
> ---<br>
>  src/security/virt-aa-helper.c | 4 ++--<br>
>  1 file changed, 2 insertions(+), 2 deletions(-)<br>
><br>
> diff --git a/src/security/virt-aa-helper.<wbr>c b/src/security/virt-aa-helper.<wbr>c<br>
> index ab82f12..2308323 100644<br>
> --- a/src/security/virt-aa-helper.<wbr>c<br>
> +++ b/src/security/virt-aa-helper.<wbr>c<br>
> @@ -1029,11 +1029,11 @@ get_files(vahControl * ctl)<br>
>              goto cleanup;<br>
><br>
>      if (ctl->def->os.loader && ctl->def->os.loader->path)<br>
> -        if (vah_add_file(&buf, ctl->def->os.loader->path, "r") != 0)<br>
> +        if (vah_add_file(&buf, ctl->def->os.loader->path, "rk") != 0)<br>
>              goto cleanup;<br>
><br>
>      if (ctl->def->os.loader && ctl->def->os.loader->nvram)<br>
> -        if (vah_add_file(&buf, ctl->def->os.loader->nvram, "rw") != 0)<br>
> +        if (vah_add_file(&buf, ctl->def->os.loader->nvram, "rwk") != 0)<br>
>              goto cleanup;<br>
><br>
>      for (i = 0; i < ctl->def->ngraphics; i++) {<br>
><br>
<br>
</div></div>Is this result of qemu image locking? I'm not against this patch just<br>
asking.<br>
<span class="HOEnZb"><font color="#888888"><br>
Michal<br>
</font></span></blockquote></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>