# vim:syntax=apparmor # ------------------------------------------------------------------ # # Copyright (C) 2019-2021 Mikhail Morfikov # # This program is free software; you can redistribute it and/or # modify it under the terms of version 2 of the GNU General Public # License published by the Free Software Foundation. # # ------------------------------------------------------------------ abi , include @{exec_path} = /{usr/,}bin/cpupower profile cpupower @{exec_path} { include # Needed to read the /dev/cpu/[0-9]*/msr device, and hence remove the following error: # Could not read perf-bias value[-1] capability sys_rawio, # Needed to operate on CPU IDLE states capability sys_admin, @{exec_path} mr, /{usr/,}bin/{,ba,da}sh rix, /{usr/,}bin/kmod rCx -> kmod, /{usr/,}bin/man rPx, @{sys}/devices/system/cpu/{cpufreq,cpuidle}/ r, @{sys}/devices/system/cpu/{cpufreq,cpuidle}/** r, @{sys}/devices/system/cpu/cpu[0-9]*/{cpufreq,cpuidle}/ r, @{sys}/devices/system/cpu/cpu[0-9]*/{cpufreq,cpuidle}/** r, @{sys}/devices/system/cpu/cpufreq/policy[0-9]*/scaling_{min,max}_freq rw, @{sys}/devices/system/cpu/cpufreq/policy[0-9]*/scaling_governor rw, @{sys}/devices/system/cpu/cpufreq/policy[0-9]*/scaling_setspeed rw, @{sys}/devices/system/cpu/cpu[0-9]*/cpuidle/state[0-9]/disable rw, @{sys}/devices/system/cpu/cpu[0-9]*/topology/{physical_package_id,core_id} r, @{sys}/devices/system/cpu/cpu[0-9]*/online r, /dev/cpu/[0-9]*/msr r, profile kmod { include /{usr/,}bin/kmod mr, @{PROC}/cmdline r, #@{PROC}/modules r, /etc/modprobe.d/ r, /etc/modprobe.d/*.conf r, } include if exists }