]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu_cgroup: Don't deny devices from cgroupDeviceACL
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 15 Mar 2022 11:45:54 +0000 (12:45 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 16 Mar 2022 12:22:17 +0000 (13:22 +0100)
commit86dc94fbb60833e18174384b7cf999e8e421c929
tree8f8942da6fa2ae9c9686e8450cc2b0f741c370d0
parenta388b32ffdb27651cc7383a7183a5578cb21172e
qemu_cgroup: Don't deny devices from cgroupDeviceACL

On domain startup a couple of devices are allowed in the devices
controller no matter the domain configuration. The aim is to
allow devices crucial for QEMU or one of its libraries, or user
is passing through a device (e.g. through additional cmd line
arguments) and wants QEMU to access it.

However, during unplug it may happen that a device is configured
to use one of such devices and since we deny /dev nodes on
hotplug we would deny such device too. For example,
/dev/urandom belongs onto the list of implicit devices and users
can hotplug and hotunplug an RNG device with /dev/urandom as
backend.

The fix is fortunately simple - just consult the list of implicit
devices before removing the device from the namespace.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
src/qemu/qemu_cgroup.c