]> git.ipfire.org Git - thirdparty/libvirt.git/commit
apparmor: avoid denials on libpmem initialization
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>
Wed, 8 Apr 2020 14:47:58 +0000 (16:47 +0200)
committerChristian Ehrhardt <christian.ehrhardt@canonical.com>
Wed, 15 Apr 2020 08:33:23 +0000 (10:33 +0200)
commit8f61fd6bf2dc7e1107e010fdc14bab9ecfde43af
treea4c6d9ab50209a78b607212dfef2ce253b10b112
parent2923e7a3dd984c46202703d390dce3ff4ea4048c
apparmor: avoid denials on libpmem initialization

With libpmem support compiled into qemu it will trigger the following
denials on every startup.
  apparmor="DENIED" operation="open" name="/"
  apparmor="DENIED" operation="open" name="/sys/bus/nd/devices/"

This is due to [1] that tries to auto-detect if the platform supports
auto flush for all region.

Once we know all the paths that are potentially needed if this feature
is really used we can add them conditionally in virt-aa-helper and labelling
calls in case </pmem> is enabled.

But until then the change here silences the denial warnings seen above.

[1]: https://github.com/pmem/pmdk/blob/master/src/libpmem2/auto_flush_linux.c#L131

Bug: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1871354

Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Acked-by: Jamie Strandboge <jamie@canonical.com>
src/security/apparmor/libvirt-qemu