]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virt-aa-helper: generate rules for nvdimm memory
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>
Tue, 20 Mar 2018 10:13:54 +0000 (11:13 +0100)
committerChristian Ehrhardt <christian.ehrhardt@canonical.com>
Thu, 22 Mar 2018 08:42:01 +0000 (09:42 +0100)
commitac254f342ff59b18792394ce9b01b1c8c2da7e28
tree463c36b666f59772d3d6570314096dd46e4afca8
parent26bb6d76ec0951affd98f1e8e31855c3534e39fa
virt-aa-helper: generate rules for nvdimm memory

nvdimm memory is backed by a path on the host. This currently works only via
hotplug where the AppArmor label is created via the domain label callbacks.

This adds the virt-aa-helper support for nvdimm memory devices to generate
rules for the needed paths from the initial guest definition as well.

Example in domain xml:
  <memory model='nvdimm'>
    <source>
      <path>/tmp/nvdimm-base</path>
    </source>
    <target>
     <size unit='KiB'>524288</size>
     <node>0</node>
    </target>
  </memory>
Works to start now and creates:
  "/tmp/nvdimm-base" rw,

Fixes: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1757085
Acked-by: Jamie Strandboge <jamie@canonical.com>
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
src/security/virt-aa-helper.c
tests/virt-aa-helper-test