]> xenbits.xensource.com Git - libvirt.git/commitdiff
apparmor: allow qemu to read max_segments
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>
Fri, 3 Nov 2017 08:46:58 +0000 (09:46 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 7 Nov 2017 15:57:32 +0000 (16:57 +0100)
Since qemu 2.9 via 9103f1ce "file-posix: Consider max_segments for
BlockLimits.max_transfer" this is a new access that is denied by the
qemu profile.

It is non fatal, but prevents the fix mentioned to actually work.
It should be safe to allow reading from that path.

Since qemu opens a symlink path we need to translate that for apparmor from
"/sys/dev/block/*/queue/max_segments" to
"/sys/devices/**/block/*/queue/max_segments"

Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
examples/apparmor/libvirt-qemu

index 97dd2d45a94e92f00ed2657cd48347057f20e7b6..064501f08ec65dd6eea9c51ac6d719badc22166b 100644 (file)
   # for rbd
   /etc/ceph/ceph.conf r,
 
+  # for file-posix getting limits since 9103f1ce
+  /sys/devices/**/block/*/queue/max_segments r,
+
   # for ppc device-tree access
   @{PROC}/device-tree/ r,
   @{PROC}/device-tree/** r,