blob: 82a067561436a71703b14ab5981447c7e69ac147 [file] [log] [blame] [edit]
# Copyright 2022 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# This policy file targets only /sys/devices/system/cpu, which needs regexp
# rules. Directories which do not need regexp should be located in genfscon
# instead. If you add a new directory, update chromeos_startup, too.
#
# Rules here are expensive from the perspective of the boot time. This policy
# file is applied during the boot by chromeos_startup, and that delays the whole
# ChromeOS boot time, since it's a critical path.
# /sys/devices/system/cpu is labeld as sysfs_devices_system_cpu by genfscon.
# Label writable files as u:object_r:sysfs:s0 to disallow regular apps to access
# them.
/sys/devices/system/cpu/cpufreq/ondemand/ignore_nice_load u:object_r:sysfs:s0
/sys/devices/system/cpu/cpufreq/ondemand/io_is_busy u:object_r:sysfs:s0
/sys/devices/system/cpu/cpufreq/ondemand/powersave_bias u:object_r:sysfs:s0
/sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor u:object_r:sysfs:s0
/sys/devices/system/cpu/cpufreq/ondemand/sampling_rate u:object_r:sysfs:s0
/sys/devices/system/cpu/cpufreq/ondemand/up_threshold u:object_r:sysfs:s0
/sys/devices/system/cpu/cpufreq/schedutil/down_rate_limit_us u:object_r:sysfs:s0
/sys/devices/system/cpu/cpufreq/schedutil/up_rate_limit_us u:object_r:sysfs:s0
/sys/devices/system/cpu/cpufreq/schedutil/rate_limit_us u:object_r:sysfs:s0
/sys/devices/system/cpu/cpufreq/policy[0-9]+/cpb u:object_r:sysfs:s0
/sys/devices/system/cpu/cpufreq/policy[0-9]+/stats/reset u:object_r:sysfs:s0
/sys/devices/system/cpu/(cpu[0-9]+/)?(cache/)?(index[0-9]+/)?hotplug/fail u:object_r:sysfs:s0
/sys/devices/system/cpu/(cpu[0-9]+/)?(cache/)?(index[0-9]+/)?hotplug/target u:object_r:sysfs:s0
/sys/devices/system/cpu/(cpu[0-9]+/)?(cache/)?(index[0-9]+/)?power/async u:object_r:sysfs:s0
/sys/devices/system/cpu/(cpu[0-9]+/)?(cache/)?(index[0-9]+/)?power/autosuspend_delay_ms u:object_r:sysfs:s0
/sys/devices/system/cpu/(cpu[0-9]+/)?(cache/)?(index[0-9]+/)?power/control u:object_r:sysfs:s0
/sys/devices/system/cpu/(cpu[0-9]+/)?(cache/)?(index[0-9]+/)?power/pm_qos_resume_latency_us u:object_r:sysfs:s0
/sys/devices/system/cpu/(cpu[0-9]+/)?(cache/)?(index[0-9]+/)?uevent u:object_r:sysfs:s0
/sys/devices/system/cpu/(cpu[0-9]+/)?cpufreq/(interactive/)?above_hispeed_delay u:object_r:sysfs:s0
/sys/devices/system/cpu/(cpu[0-9]+/)?cpufreq/(interactive/)?boost u:object_r:sysfs:s0
/sys/devices/system/cpu/(cpu[0-9]+/)?cpufreq/(interactive/)?boostpulse u:object_r:sysfs:s0
/sys/devices/system/cpu/(cpu[0-9]+/)?cpufreq/(interactive/)?boostpulse_duration u:object_r:sysfs:s0
/sys/devices/system/cpu/(cpu[0-9]+/)?cpufreq/(interactive/)?go_hispeed_load u:object_r:sysfs:s0
/sys/devices/system/cpu/(cpu[0-9]+/)?cpufreq/(interactive/)?hispeed_freq u:object_r:sysfs:s0
/sys/devices/system/cpu/(cpu[0-9]+/)?cpufreq/(interactive/)?io_is_busy u:object_r:sysfs:s0
/sys/devices/system/cpu/(cpu[0-9]+/)?cpufreq/(interactive/)?min_sample_time u:object_r:sysfs:s0
/sys/devices/system/cpu/(cpu[0-9]+/)?cpufreq/(interactive/)?target_loads u:object_r:sysfs:s0
/sys/devices/system/cpu/(cpu[0-9]+/)?cpufreq/(interactive/)?timer_rate u:object_r:sysfs:s0
/sys/devices/system/cpu/(cpu[0-9]+/)?cpufreq/(interactive/)?timer_slack u:object_r:sysfs:s0
/sys/devices/system/cpu/(cpu[0-9]+/)?cpuidle/(state[0-9]+/)?disable u:object_r:sysfs:s0
/sys/devices/system/cpu/cpu[0-9]+/cpufreq/scaling_governor u:object_r:sysfs:s0
/sys/devices/system/cpu/cpu[0-9]+/cpufreq/scaling_max_freq u:object_r:sysfs:s0
/sys/devices/system/cpu/cpu[0-9]+/cpufreq/scaling_min_freq u:object_r:sysfs:s0
/sys/devices/system/cpu/cpu[0-9]+/cpufreq/scaling_setspeed u:object_r:sysfs:s0
/sys/devices/system/cpu/cpu[0-9]+/cpuidle/state[0-9]+/disable u:object_r:sysfs:s0
# For Intel
/sys/devices/system/cpu/(cpu[0-9]+/)?power/energy_perf_bias u:object_r:sysfs:s0
/sys/devices/system/cpu/cpufreq/policy[0-9]*/energy_performance_preference u:object_r:sysfs:s0
/sys/devices/system/cpu/intel_pstate/hwp_dynamic_boost u:object_r:sysfs:s0
/sys/devices/system/cpu/intel_pstate/max_perf_pct u:object_r:sysfs:s0
/sys/devices/system/cpu/intel_pstate/min_perf_pct u:object_r:sysfs:s0
/sys/devices/system/cpu/intel_pstate/no_turbo u:object_r:sysfs:s0
/sys/devices/system/cpu/intel_pstate/status u:object_r:sysfs:s0
/sys/devices/system/cpu/microcode/reload u:object_r:sysfs:s0
/sys/devices/system/cpu/smt/control u:object_r:sysfs:s0
/sys/devices/system/cpu/umwait_control/enable_c02 u:object_r:sysfs:s0
/sys/devices/system/cpu/umwait_control/max_time u:object_r:sysfs:s0
# For ARM
/sys/devices/system/cpu/cpu[0-9]+/online u:object_r:sysfs:s0
/sys/devices/system/cpu/cpufreq/policy[0-9]+/scaling_governor u:object_r:sysfs:s0
/sys/devices/system/cpu/cpufreq/policy[0-9]+/scaling_max_freq u:object_r:sysfs:s0
/sys/devices/system/cpu/cpufreq/policy[0-9]+/scaling_min_freq u:object_r:sysfs:s0
/sys/devices/system/cpu/cpufreq/policy[0-9]+/scaling_setspeed u:object_r:sysfs:s0
/sys/devices/system/cpu/cpufreq/policy[0-9]+/sched/down_throttle_nsec u:object_r:sysfs:s0
/sys/devices/system/cpu/cpufreq/policy[0-9]+/sched/up_throttle_nsec u:object_r:sysfs:s0
/sys/devices/system/cpu/cpufreq/policy[0-9]+/schedutil/down_rate_limit_us u:object_r:sysfs:s0
/sys/devices/system/cpu/cpufreq/policy[0-9]+/schedutil/up_rate_limit_us u:object_r:sysfs:s0
/sys/devices/system/cpu/cpufreq/policy[0-9]+/schedutil/rate_limit_us u:object_r:sysfs:s0