]> git.lizzy.rs Git - torbrowser-launcher.git/commitdiff
AppArmor: allow usage of cgroups
authorintrigeri <intrigeri@boum.org>
Sun, 16 May 2021 14:00:51 +0000 (14:00 +0000)
committerintrigeri <intrigeri@boum.org>
Sun, 16 May 2021 14:00:51 +0000 (14:00 +0000)
Firefox uses cgroups to determine how many CPUs are available,
and gather other information it needs about the CPUs.

I did not investigate what are the consequences of Firefox
lacking this information. I suspect performance, and thus UX,
may be impacted.

closes #547

apparmor/torbrowser.Browser.firefox

index 0dae62850857a9c72f3366c072e6bf241ee649ed..f5ddc4a5f85a634314e080e674ec9b89f854fa54 100644 (file)
@@ -38,6 +38,7 @@ profile torbrowser_firefox @{torbrowser_firefox_executable} {
   /dev/ r,
   /dev/shm/ r,
 
+  owner @{PROC}/@{pid}/cgroup r,
   owner @{PROC}/@{pid}/environ r,
   owner @{PROC}/@{pid}/fd/ r,
   owner @{PROC}/@{pid}/mountinfo r,
@@ -101,6 +102,7 @@ profile torbrowser_firefox @{torbrowser_firefox_executable} {
   /sys/devices/system/cpu/present r,
   /sys/devices/system/node/ r,
   /sys/devices/system/node/node[0-9]*/meminfo r,
+  /sys/fs/cgroup/cpu,cpuacct/user.slice/cpu.cfs_quota_us r,
   deny /sys/devices/virtual/block/*/uevent r,
 
   # Should use abstractions/gstreamer instead once merged upstream