/linux/Documentation/admin-guide/mm/ |
H A D | numa_memory_policy.rst | 2 NUMA Memory Policy 5 What is NUMA Memory Policy? 8 In the Linux kernel, "memory policy" determines from which node the kernel will 11 The current memory policy support was added to Linux 2.6 around May 2004. This 12 document attempts to describe the concepts and APIs of the 2.6 memory policy 24 Memory Policy Concepts 30 The Linux kernel supports _scopes_ of memory policy, described here from 33 System Default Policy 34 this policy is "hard coded" into the kernel. It is the policy 36 one of the more specific policy scopes discussed below. When [all …]
|
/linux/fs/crypto/ |
H A D | policy.c | 3 * Encryption policy functions for per-file encryption support. 10 * Modified by Eric Biggers, 2019 for v2 policy support. 24 * @policy1: the first policy 25 * @policy2: the second policy 38 int fscrypt_policy_to_key_spec(const union fscrypt_policy *policy, in fscrypt_policy_to_key_spec() argument 41 switch (policy->version) { in fscrypt_policy_to_key_spec() 44 memcpy(key_spec->u.descriptor, policy->v1.master_key_descriptor, in fscrypt_policy_to_key_spec() 49 memcpy(key_spec->u.identifier, policy->v2.master_key_identifier, in fscrypt_policy_to_key_spec() 122 static bool supported_iv_ino_lblk_policy(const struct fscrypt_policy_v2 *policy, in supported_iv_ino_lblk_policy() argument 125 const char *type = (policy->flags & FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64) in supported_iv_ino_lblk_policy() [all …]
|
/linux/Documentation/security/ |
H A D | ipe.rst | 3 Integrity Policy Enforcement (IPE) - Kernel Documentation 20 policy. A mandatory access control system would be present, and 41 enforce the integrity policy, or it should not. 44 policy would indicate what labels required integrity verification, which 48 file should be subject to integrity policy. 75 The next step was to choose a *policy* to enforce the integrity mechanism. 76 The minimum requirements for the policy were: 78 1. The policy itself must be integrity verified (preventing trivial 80 2. The policy itself must be resistant to rollback attacks. 81 3. The policy enforcement must have a permissive-like mode. [all …]
|
/linux/drivers/cpufreq/ |
H A D | cpufreq_userspace.c | 26 * @policy: pointer to policy struct where freq is being set 31 static int cpufreq_set(struct cpufreq_policy *policy, unsigned int freq) in cpufreq_set() argument 34 struct userspace_policy *userspace = policy->governor_data; in cpufreq_set() 36 pr_debug("cpufreq_set for cpu %u, freq %u kHz\n", policy->cpu, freq); in cpufreq_set() 44 ret = __cpufreq_driver_target(policy, freq, CPUFREQ_RELATION_L); in cpufreq_set() 50 static ssize_t show_speed(struct cpufreq_policy *policy, char *buf) in show_speed() argument 52 return sprintf(buf, "%u\n", policy->cur); in show_speed() 55 static int cpufreq_userspace_policy_init(struct cpufreq_policy *policy) in cpufreq_userspace_policy_init() argument 65 policy->governor_data = userspace; in cpufreq_userspace_policy_init() 70 * Any routine that writes to the policy struct will hold the "rwsem" of [all …]
|
H A D | amd-pstate.c | 230 static int msr_update_perf(struct cpufreq_policy *policy, u8 min_perf, in msr_update_perf() argument 233 struct amd_cpudata *cpudata = policy->driver_data; in msr_update_perf() 253 policy->boost_enabled, in msr_update_perf() 277 static inline int amd_pstate_update_perf(struct cpufreq_policy *policy, in amd_pstate_update_perf() argument 282 return static_call(amd_pstate_update_perf)(policy, min_perf, des_perf, in amd_pstate_update_perf() 286 static int msr_set_epp(struct cpufreq_policy *policy, u8 epp) in msr_set_epp() argument 288 struct amd_cpudata *cpudata = policy->driver_data; in msr_set_epp() 305 policy->boost_enabled, in msr_set_epp() 326 static inline int amd_pstate_set_epp(struct cpufreq_policy *policy, u8 epp) in amd_pstate_set_epp() argument 328 return static_call(amd_pstate_set_epp)(policy, epp); in amd_pstate_set_epp() [all …]
|
H A D | cppc_cpufreq.c | 129 static void cppc_cpufreq_cpu_fie_init(struct cpufreq_policy *policy) in cppc_cpufreq_cpu_fie_init() argument 137 for_each_cpu(cpu, policy->cpus) { in cppc_cpufreq_cpu_fie_init() 140 cppc_fi->cpu_data = policy->driver_data; in cppc_cpufreq_cpu_fie_init() 159 topology_set_scale_freq_source(&cppc_sftd, policy->cpus); in cppc_cpufreq_cpu_fie_init() 163 * We free all the resources on policy's removal and not on CPU removal as the 168 * We just need to make sure to remove them all on policy->exit(). 170 static void cppc_cpufreq_cpu_fie_exit(struct cpufreq_policy *policy) in cppc_cpufreq_cpu_fie_exit() argument 178 /* policy->cpus will be empty here, use related_cpus instead */ in cppc_cpufreq_cpu_fie_exit() 179 topology_clear_scale_freq_source(SCALE_FREQ_SOURCE_CPPC, policy->related_cpus); in cppc_cpufreq_cpu_fie_exit() 181 for_each_cpu(cpu, policy->related_cpus) { in cppc_cpufreq_cpu_fie_exit() [all …]
|
H A D | longrun.c | 29 * longrun_get_policy - get the current LongRun policy 30 * @policy: struct cpufreq_policy where current policy is written into 32 * Reads the current LongRun policy by access to MSR_TMTA_LONGRUN_FLAGS 35 static void longrun_get_policy(struct cpufreq_policy *policy) in longrun_get_policy() argument 42 policy->policy = CPUFREQ_POLICY_PERFORMANCE; in longrun_get_policy() 44 policy->policy = CPUFREQ_POLICY_POWERSAVE; in longrun_get_policy() 53 policy->min = policy->max = longrun_high_freq; in longrun_get_policy() 55 policy->min = longrun_low_freq + msr_lo * in longrun_get_policy() 57 policy->max = longrun_low_freq + msr_hi * in longrun_get_policy() 60 policy->cpu = 0; in longrun_get_policy() [all …]
|
H A D | mediatek-cpufreq-hw.c | 100 struct cpufreq_policy *policy; in mtk_cpufreq_get_cpu_power() local 103 policy = cpufreq_cpu_get_raw(cpu_dev->id); in mtk_cpufreq_get_cpu_power() 104 if (!policy) in mtk_cpufreq_get_cpu_power() 107 data = policy->driver_data; in mtk_cpufreq_get_cpu_power() 124 struct cpufreq_policy *policy) in mtk_cpufreq_hw_fdvfs_switch() argument 126 struct mtk_cpufreq_domain *data = policy->driver_data; in mtk_cpufreq_hw_fdvfs_switch() 131 for_each_cpu(cpu, policy->real_cpus) { in mtk_cpufreq_hw_fdvfs_switch() 136 static int mtk_cpufreq_hw_target_index(struct cpufreq_policy *policy, in mtk_cpufreq_hw_target_index() argument 139 struct mtk_cpufreq_domain *data = policy->driver_data; in mtk_cpufreq_hw_target_index() 143 target_freq = policy->freq_table[index].frequency; in mtk_cpufreq_hw_target_index() [all …]
|
H A D | rcpufreq_dt.rs | 61 fn init(policy: &mut cpufreq::Policy) -> Result<Self::PData> { in init() 62 let cpu = policy.cpu(); in init() 84 // set sharing CPUs, fallback to all CPUs share the `Policy` in init() 91 // Initialize OPP tables for all policy cpus. in init() 94 // before updating policy cpus. Otherwise, we will end up creating in init() 125 policy in init() 132 unsafe { policy.set_freq_table(&freq_table) }; in init() 135 let clk = unsafe { policy.set_clk(dev, None)? }; in init() 137 mask.copy(policy.cpus()); in init() 151 fn exit(_policy: &mut cpufreq::Policy, _data: Option<Self::PData>) -> Result { in exit() argument [all …]
|
H A D | apple-soc-cpufreq.c | 137 struct cpufreq_policy *policy; in apple_soc_cpufreq_get_rate() local 142 policy = cpufreq_cpu_get_raw(cpu); in apple_soc_cpufreq_get_rate() 143 if (unlikely(!policy)) in apple_soc_cpufreq_get_rate() 146 priv = policy->driver_data; in apple_soc_cpufreq_get_rate() 162 cpufreq_for_each_valid_entry(p, policy->freq_table) in apple_soc_cpufreq_get_rate() 171 static int apple_soc_cpufreq_set_target(struct cpufreq_policy *policy, in apple_soc_cpufreq_set_target() argument 174 struct apple_cpu_priv *priv = policy->driver_data; in apple_soc_cpufreq_set_target() 175 unsigned int pstate = policy->freq_table[index].driver_data; in apple_soc_cpufreq_set_target() 201 static unsigned int apple_soc_cpufreq_fast_switch(struct cpufreq_policy *policy, in apple_soc_cpufreq_fast_switch() argument 204 if (apple_soc_cpufreq_set_target(policy, policy->cached_resolved_idx) < 0) in apple_soc_cpufreq_fast_switch() [all …]
|
H A D | scpi-cpufreq.c | 32 struct cpufreq_policy *policy; in scpi_cpufreq_get_rate() local 36 policy = cpufreq_cpu_get_raw(cpu); in scpi_cpufreq_get_rate() 37 if (unlikely(!policy)) in scpi_cpufreq_get_rate() 40 priv = policy->driver_data; in scpi_cpufreq_get_rate() 47 scpi_cpufreq_set_target(struct cpufreq_policy *policy, unsigned int index) in scpi_cpufreq_set_target() argument 49 unsigned long freq_khz = policy->freq_table[index].frequency; in scpi_cpufreq_set_target() 50 struct scpi_data *priv = policy->driver_data; in scpi_cpufreq_set_target() 91 static int scpi_cpufreq_init(struct cpufreq_policy *policy) in scpi_cpufreq_init() argument 99 cpu_dev = get_cpu_device(policy->cpu); in scpi_cpufreq_init() 101 pr_err("failed to get cpu%d device\n", policy->cpu); in scpi_cpufreq_init() [all …]
|
/linux/include/linux/ |
H A D | cpufreq.h | 61 unsigned int cpu; /* cpu managing this policy, must be online */ 72 unsigned int policy; /* see above */ member 73 unsigned int last_policy; /* policy before unplug */ 94 * - Any routine that wants to read from the policy structure will 96 * - Any routine that will write to the policy structure and/or may take away 97 * the policy altogether (eg. CPU hotplug), will hold this lock in write 106 * policy and that the change will affect all of the policy CPUs then. 128 * the driver to set the frequency for this policy. To be set by the 142 /* Per policy boost enabled flag. */ 145 /* Per policy boost supported flag. */ [all …]
|
/linux/net/netlink/ |
H A D | policy.c | 3 * NETLINK Policy advertisement to userspace 22 const struct nla_policy *policy; member 28 const struct nla_policy *policy, in add_policy() argument 34 if (!policy || !maxtype) in add_policy() 38 if (state->policies[i].policy == policy && in add_policy() 42 if (!state->policies[i].policy) { in add_policy() 43 state->policies[i].policy = policy; in add_policy() 60 state->policies[old_n_alloc].policy in add_policy() 83 netlink_policy_dump_get_policy_idx(struct netlink_policy_dump_state * state,const struct nla_policy * policy,unsigned int maxtype) netlink_policy_dump_get_policy_idx() argument 128 netlink_policy_dump_add_policy(struct netlink_policy_dump_state ** pstate,const struct nla_policy * policy,unsigned int maxtype) netlink_policy_dump_add_policy() argument 153 const struct nla_policy *policy; netlink_policy_dump_add_policy() local 434 struct nlattr *policy; netlink_policy_dump_write() local [all...] |
/linux/tools/perf/Documentation/ |
H A D | security.txt | 13 Targeted policy with perf_event_open() access control capabilities: 15 1. Download selinux-policy SRPM package (e.g. selinux-policy-3.14.4-48.fc31.src.rpm on FC31) 18 # rpm -Uhv selinux-policy-3.14.4-48.fc31.src.rpm 22 # rpmbuild -bp selinux-policy.spec 24 3. Place patch below at rpmbuild/BUILD/selinux-policy-b86eaaf4dbcf2d51dd4432df7185c0eaf3cbcc02 27 # patch -p1 < selinux-policy-perf-events-perfmon.patch 28 patching file policy/flask/access_vectors 29 patching file policy/flask/security_classes 30 # cat selinux-policy-perf-events-perfmon.patch 31 diff -Nura a/policy/flask/access_vectors b/policy/flask/access_vectors [all …]
|
/linux/drivers/hwtracing/stm/ |
H A D | policy.c | 3 * System Trace Module (STM) master/channel allocation policy management 6 * A master/channel allocation policy allows mapping string identifiers to 21 * STP Master/Channel allocation policy configfs layout. 31 struct stp_policy *policy; member 110 stm = policy_node->policy->stm; in stp_policy_node_masters_store() 157 stm = policy_node->policy->stm; in stp_policy_node_channels_store() 228 struct stp_policy *policy; in stp_policy_node_make() local 231 policy = container_of(group, struct stp_policy, group); in stp_policy_node_make() 235 policy = parent_node->policy; in stp_policy_node_make() 238 if (!policy->stm) in stp_policy_node_make() [all …]
|
/linux/Documentation/cpu-freq/ |
H A D | cpu-drivers.rst | 48 .init - A pointer to the per-policy initialization function. 68 .exit - A pointer to a per-policy cleanup function called during 71 .suspend - A pointer to a per-policy suspend function which is called 73 policy. 75 .resume - A pointer to a per-policy resume function which is called 78 .ready - A pointer to a per-policy ready function which is called after 79 the policy is fully initialized. 86 .set_boost - A pointer to a per-policy function to enable/disable boost 94 cpufreq driver registers itself, the per-policy initialization function 95 cpufreq_driver.init is called if no cpufreq policy existed for the CPU. [all …]
|
/linux/rust/kernel/ |
H A D | cpufreq.rs | 55 /// Supports multiple clock domains with per-policy governors in `cpu/cpuN/cpufreq/`. 120 /// Policy data. 210 /// use kernel::cpufreq::{Policy, TableIndex}; 212 /// fn show_freq(policy: &Policy) -> Result { 213 /// let table = policy.freq_table()?; 387 /// CPU frequency policy. 393 /// A [`Policy`] instance always corresponds to a valid C `struct cpufreq_policy`. 403 /// use kernel::cpufreq::{DEFAULT_TRANSITION_LATENCY_NS, Policy}; 405 /// fn update_policy(policy: &mut Policy) { 406 /// policy [all …]
|
/linux/security/apparmor/ |
H A D | Kconfig | 48 bool "Allow loaded policy to be introspected" 52 This option selects whether introspection of loaded policy 55 of loaded policy, and check point and restore support. It 65 This option selects whether introspection of loaded policy 68 checking loaded policy. This option adds to policy load 72 bool "Enable policy hash introspection by default" 76 This option selects whether sha256 hashing of loaded policy 78 loaded policy provide system administrators a quick way to 79 verify that policy in the kernel matches what is expected, 80 however it can slow down policy load on some devices. In [all …]
|
/linux/Documentation/ABI/testing/ |
H A D | configfs-stp-policy | 1 What: /config/stp-policy 9 What: /config/stp-policy/<device>.<policy> 13 This group is the root of a policy; its name is a concatenation 14 of an stm device name to which this policy applies and an 17 has a policy assigned to it, mkdir will fail with EBUSY. 19 What: /config/stp-policy/<device>.<policy>/device 23 STM device to which this policy applies, read only. Same as the 26 What: /config/stp-policy/<device>.<policy>/<node> 30 Policy node is a string identifier that software clients will 34 What: /config/stp-policy/<device>.<policy>/<node>/masters [all …]
|
/linux/Documentation/admin-guide/pm/ |
H A D | cpufreq.rst | 85 ``CPUFreq`` Policy Objects 104 of its user space interface is based on the policy concept. 129 Once invoked, the ``CPUFreq`` core checks if the policy pointer is already set 130 for the given CPU and if so, it skips the policy object creation. Otherwise, 131 a new policy object is created and initialized, which involves the creation of 132 a new policy directory in ``sysfs``, and the policy pointer corresponding to 133 the given CPU is set to the new policy object's address in memory. 135 Next, the scaling driver's ``->init()`` callback is invoked with the policy 139 to, represented by its policy object) and, if the policy object it has been 140 called for is new, to set parameters of the policy, like the minimum and maximum [all …]
|
/linux/kernel/sched/ |
H A D | cpufreq_schedutil.c | 19 struct cpufreq_policy *policy; member 83 if (!cpufreq_this_cpu_can_update(sg_policy->policy)) in sugov_should_update_freq() 92 * of policy limits in cpufreq_driver_resolve_freq() or a policy in sugov_should_update_freq() 117 * The policy limits have changed, but if the return value of in sugov_update_next_freq() 122 * policy limits. in sugov_update_next_freq() 147 * correlate frequency and compute capacity for a given cpufreq policy. We use 149 * @policy: the cpufreq policy of the CPU in question. 154 unsigned long get_capacity_ref_freq(struct cpufreq_policy *policy) in get_capacity_ref_freq() argument 156 unsigned int freq = arch_scale_freq_ref(policy->cpu); in get_capacity_ref_freq() 162 return policy->cpuinfo.max_freq; in get_capacity_ref_freq() [all …]
|
/linux/tools/testing/selftests/net/ |
H A D | xfrm_policy.sh | 4 # Check xfrm policy resolution. Topology: 15 # ns1: ping 10.0.1.253: passes via ipsec tunnel (direct policy) 16 # ns2: ping 10.0.2.253: passes via ipsec tunnel (direct policy) 38 …ip -net $ns xfrm policy add src $lnet dst $rnet dir out tmpl src $me dst $remote proto esp mode tu… 40 …ip -net $ns xfrm policy add src $rnet dst $lnet dir fwd tmpl src $remote dst $me proto esp mode tu… 64 # Adding a policy for '10.0.1.0/23' will make it necessary to 74 # adds new nodes to tree (neither network exists yet in policy database). 75 ip -net $ns xfrm policy add src 10.1.0.0/24 dst 10.0.0.0/24 dir fwd priority 200 action block 78 ip -net $ns xfrm policy add src 10.2.0.0/24 dst 10.0.0.0/24 dir fwd priority 200 action block 81 ip -net $ns xfrm policy add src 10.2.0.0/23 dst 10.0.1.0/24 dir fwd priority 200 action block [all …]
|
/linux/security/selinux/ss/ |
H A D | services.c | 15 * Added conditional policy language extensions 20 * Added support for the policy capability bitmap 32 * Added support for runtime switching of the policy type 130 pr_info("SELinux: Class %s not defined in policy.\n", in selinux_set_mapping() 149 pr_info("SELinux: Permission %s in class %s not defined in policy.\n", in selinux_set_mapping() 174 * Get real, policy values from mapped values 186 * Get kernel value for class from its policy value 242 struct selinux_policy *policy; in security_mls_enabled() local 248 policy = rcu_dereference(selinux_state.policy); in security_mls_enabled() 249 mls_enabled = policy->policydb.mls_enabled; in security_mls_enabled() [all …]
|
/linux/drivers/thermal/ |
H A D | cpufreq_cooling.c | 60 * @policy: cpufreq policy. 73 struct cpufreq_policy *policy; member 237 struct cpufreq_policy *policy = cpufreq_cdev->policy; in cpufreq_get_requested_power() local 239 freq = cpufreq_quick_get(policy->cpu); in cpufreq_get_requested_power() 241 for_each_cpu(cpu, policy->related_cpus) { in cpufreq_get_requested_power() 256 trace_thermal_power_cpu_get_power_simple(policy->cpu, *power); in cpufreq_get_requested_power() 285 num_cpus = cpumask_weight(cpufreq_cdev->policy->cpus); in cpufreq_state2power() 320 struct cpufreq_policy *policy = cpufreq_cdev->policy; in cpufreq_power2state() local 327 trace_thermal_power_cpu_limit(policy->related_cpus, target_freq, *state, in cpufreq_power2state() 334 struct cpufreq_policy *policy; in em_is_sane() local [all …]
|
/linux/Documentation/trace/ |
H A D | stm.rst | 26 To solve this mapping problem, stm class provides a policy management 28 identifiers to ranges of masters and channels. If these rules (policy) 32 This policy is a tree structure containing rules (policy_node) that 34 associated with it, located in "stp-policy" subsystem directory in 35 configfs. The topmost directory's name (the policy) is formatted as 36 the STM device name to which this policy applies and an arbitrary 40 $ ls /config/stp-policy/dummy_stm.my-policy/user 42 $ cat /config/stp-policy/dummy_stm.my-policy/user/masters 44 $ cat /config/stp-policy/dummy_stm.my-policy/user/channels 60 In order to find an appropriate policy node for a given trace source, [all …]
|