apparmor.d -> profiles
This commit is contained in:
parent
c408a878b7
commit
e9b8e62fcd
726 changed files with 0 additions and 0 deletions
64
profiles/cpupower
Normal file
64
profiles/cpupower
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
# 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 <abi/3.0>,
|
||||
|
||||
include <tunables/global>
|
||||
|
||||
@{exec_path} = /{usr/,}bin/cpupower
|
||||
profile cpupower @{exec_path} {
|
||||
include <abstractions/base>
|
||||
|
||||
# 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 <abstractions/base>
|
||||
|
||||
/{usr/,}bin/kmod mr,
|
||||
|
||||
@{PROC}/cmdline r,
|
||||
#@{PROC}/modules r,
|
||||
|
||||
/etc/modprobe.d/ r,
|
||||
/etc/modprobe.d/*.conf r,
|
||||
|
||||
}
|
||||
|
||||
include if exists <local/cpupower>
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue