summaryrefslogtreecommitdiff
diff options
authorMichael Vogt <mvo@ubuntu.com>2022-04-11 08:58:46 +0200
committerGitHub <noreply@github.com>2022-04-11 08:58:46 +0200
commitcf47226ea92b2b7aefe203cfd1319927d5082a60 (patch)
treeb55e9f7b55629ec8528a1d4031224b2cf6eef105
parent7f3e416623c62d26ca0d7e9e247b0ec07bfde812 (diff)
parenta35b30de5794bd7aa94d9147fe908d55f934d57a (diff)
Merge pull request #11655 from tsunghanliu/fix-cpu-control-apparmor-rules
interfaces/cpu-control: fix apparmor rules of paths with CPU ID
-rw-r--r--interfaces/builtin/cpu_control.go22
1 files changed, 11 insertions, 11 deletions
diff --git a/interfaces/builtin/cpu_control.go b/interfaces/builtin/cpu_control.go
index 6c2e17826d..60a5721d1c 100644
--- a/interfaces/builtin/cpu_control.go
+++ b/interfaces/builtin/cpu_control.go
@@ -38,15 +38,15 @@ const cpuControlConnectedPlugAppArmor = `
/sys/module/cpu_boost/parameters/input_boost_freq rw,
/sys/module/cpu_boost/parameters/input_boost_ms rw,
-/sys/devices/system/cpu/cpu[0-9][0-9]*/cpufreq/scaling_min_freq rw,
-/sys/devices/system/cpu/cpu[0-9][0-9]*/cpufreq/scaling_max_freq rw,
-/sys/devices/system/cpu/cpu[0-9][0-9]*/core_ctl/min_cpus rw,
-/sys/devices/system/cpu/cpu[0-9][0-9]*/core_ctl/busy_up_thres rw,
-/sys/devices/system/cpu/cpu[0-9][0-9]*/core_ctl/busy_down_thres rw,
-/sys/devices/system/cpu/cpu[0-9][0-9]*/core_ctl/offline_delay_ms rw,
-/sys/devices/system/cpu/cpu[0-9][0-9]*/core_ctl/task_thres rw,
-/sys/devices/system/cpu/cpu[0-9][0-9]*/core_ctl/nr_prev_assist_thresh rw,
-/sys/devices/system/cpu/cpu[0-9][0-9]*/core_ctl/enable rw,
+/sys/devices/system/cpu/cpu[0-9]*/cpufreq/scaling_min_freq rw,
+/sys/devices/system/cpu/cpu[0-9]*/cpufreq/scaling_max_freq rw,
+/sys/devices/system/cpu/cpu[0-9]*/core_ctl/min_cpus rw,
+/sys/devices/system/cpu/cpu[0-9]*/core_ctl/busy_up_thres rw,
+/sys/devices/system/cpu/cpu[0-9]*/core_ctl/busy_down_thres rw,
+/sys/devices/system/cpu/cpu[0-9]*/core_ctl/offline_delay_ms rw,
+/sys/devices/system/cpu/cpu[0-9]*/core_ctl/task_thres rw,
+/sys/devices/system/cpu/cpu[0-9]*/core_ctl/nr_prev_assist_thresh rw,
+/sys/devices/system/cpu/cpu[0-9]*/core_ctl/enable rw,
# https://www.kernel.org/doc/html/latest/admin-guide/pm/cpufreq.html#policy-interface-in-sysfs
/sys/devices/system/cpu/cpufreq/{,**} r,
@@ -77,8 +77,8 @@ const cpuControlConnectedPlugAppArmor = `
/proc/sys/kernel/sched_boost rw,
# see https://www.osadl.org/monitoring/add-on-patches/4.16.7-rt1...4.16.15-rt7/sched-add-per-cpu-load-measurement.patch.html
-/proc/idleruntime/{all,cpu[0-9][0-9]*}/data r,
-/proc/idleruntime/{all,cpu[0-9][0-9]*}/reset w,
+/proc/idleruntime/{all,cpu[0-9]*}/data r,
+/proc/idleruntime/{all,cpu[0-9]*}/reset w,
`
func init() {