]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
security: apparmor: Allow QEMU read /proc/sys/vm/max_map_count
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 20 Aug 2024 10:00:16 +0000 (12:00 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 20 Aug 2024 12:44:04 +0000 (14:44 +0200)
In its commit v9.0.0-rc0~1^2 QEMU started to read
/proc/sys/vm/max_map_count file to set up coroutine limits better
(something about VMAs, mmap(), see the commit for more info).
Allow the file in apparmor profile.

Resolves: https://gitlab.com/libvirt/libvirt/-/issues/660
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
src/security/apparmor/libvirt-qemu.in

index 8b92915281fae3f7904795abbe018a923b3f748c..8f1725655410972b6bb04f81f2beefa32845da8a 100644 (file)
@@ -34,6 +34,7 @@
   # only modify its comm value or those in its thread group.
   owner @{PROC}/@{pid}/task/@{tid}/comm rw,
   @{PROC}/sys/kernel/cap_last_cap r,
+  @{PROC}/sys/vm/max_map_count r,
   @{PROC}/sys/vm/overcommit_memory r,
   # detect hardware capabilities via qemu_getauxval
   owner @{PROC}/*/auxv r,