]> git.ipfire.org Git - thirdparty/libvirt.git/commit
vircgroup: introduce virCgroupV2AllowDevice
authorPavel Hrdina <phrdina@redhat.com>
Wed, 24 Apr 2019 10:10:08 +0000 (12:10 +0200)
committerPavel Hrdina <phrdina@redhat.com>
Fri, 15 Nov 2019 11:58:39 +0000 (12:58 +0100)
commit5d4965191291ae0fb216196043ad33ca058bdc8e
tree24e1559dc9d2fb9286fd7ecab7aa34f87b1853cf
parentb18b0ce6099d2d6ba1b19de842629d38631a8f79
vircgroup: introduce virCgroupV2AllowDevice

In order to allow device we need to create key and value which will be
used to update BPF map.  virBPFUpdateElem() can override existing
entries in BPF map so we need to check if that entry exists in order to
track number of entries in our map.

This can add rule for specific device but major and minor can be both
-1 which follows the same behavior as in cgroup v1.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/util/vircgroupv2.c