Home
last modified time | relevance | path

Searched refs:rules (Results 1 – 25 of 341) sorted by relevance

12345678910>>...14

/linux/drivers/net/dsa/mv88e6xxx/
H A Dleds.c99 unsigned long rules; member
123 .rules = BIT(TRIGGER_NETDEV_LINK),
130 .rules = BIT(TRIGGER_NETDEV_LINK_1000),
137 .rules = BIT(TRIGGER_NETDEV_LINK_100) | BIT(TRIGGER_NETDEV_LINK_1000),
144 .rules = BIT(TRIGGER_NETDEV_LINK_10) | BIT(TRIGGER_NETDEV_LINK_100),
151 .rules = BIT(TRIGGER_NETDEV_LINK_100),
159 .rules = BIT(TRIGGER_NETDEV_LINK_1000),
167 .rules = BIT(TRIGGER_NETDEV_LINK_1000),
174 .rules = BIT(TRIGGER_NETDEV_LINK_10) | BIT(TRIGGER_NETDEV_LINK_100),
181 .rules = BIT(TRIGGER_NETDEV_LINK_1000),
[all …]
/linux/drivers/net/phy/aquantia/
H A Daquantia_leds.c35 unsigned long rules) in aqr_phy_led_hw_is_supported() argument
41 if (rules & ~supported_triggers) in aqr_phy_led_hw_is_supported()
48 unsigned long *rules) in aqr_phy_led_hw_control_get() argument
59 *rules = 0; in aqr_phy_led_hw_control_get()
61 *rules |= BIT(TRIGGER_NETDEV_LINK_100); in aqr_phy_led_hw_control_get()
64 *rules |= BIT(TRIGGER_NETDEV_LINK_1000); in aqr_phy_led_hw_control_get()
67 *rules |= BIT(TRIGGER_NETDEV_LINK_2500); in aqr_phy_led_hw_control_get()
70 *rules |= BIT(TRIGGER_NETDEV_LINK_5000); in aqr_phy_led_hw_control_get()
73 *rules |= BIT(TRIGGER_NETDEV_LINK_10000); in aqr_phy_led_hw_control_get()
76 *rules |= BIT(TRIGGER_NETDEV_RX); in aqr_phy_led_hw_control_get()
[all …]
/linux/security/apparmor/
H A Dcapability.c72 struct aa_ruleset *rules = profile->label.rules[0]; in audit_caps() local
81 !cap_raised(rules->caps.audit, cap))) in audit_caps()
85 cap_raised(rules->caps.kill, cap)) { in audit_caps()
87 } else if (cap_raised(rules->caps.quiet, cap) && in audit_caps()
124 struct aa_ruleset *rules = profile->label.rules[0]; in profile_capable() local
128 state = RULE_MEDIATES(rules, ad->class); in profile_capable()
134 state = aa_dfa_next(rules->policy->dfa, state, cap >> 5); in profile_capable()
136 perms = *aa_lookup_perms(rules->policy, state); in profile_capable()
150 if (cap_raised(rules->caps.allow, cap) && in profile_capable()
151 !cap_raised(rules->caps.denied, cap)) in profile_capable()
[all …]
H A Dresource.c92 struct aa_ruleset *rules = profile->label.rules[0]; in profile_setrlimit() local
95 if (rules->rlimits.mask & (1 << resource) && new_rlim->rlim_max > in profile_setrlimit()
96 rules->rlimits.limits[resource].rlim_max) in profile_setrlimit()
167 struct aa_ruleset *rules = old->label.rules[0]; in __aa_transition_rlimits() local
168 if (rules->rlimits.mask) { in __aa_transition_rlimits()
173 if (rules->rlimits.mask & mask) { in __aa_transition_rlimits()
185 struct aa_ruleset *rules = new->label.rules[0]; in __aa_transition_rlimits() local
188 if (!rules->rlimits.mask) in __aa_transition_rlimits()
191 if (!(rules->rlimits.mask & mask)) in __aa_transition_rlimits()
196 rules->rlimits.limits[j].rlim_max); in __aa_transition_rlimits()
H A Dpolicy_unpack.c566 static bool unpack_secmark(struct aa_ext *e, struct aa_ruleset *rules) in unpack_secmark() argument
576 rules->secmark = kcalloc(size, sizeof(struct aa_secmark), in unpack_secmark()
578 if (!rules->secmark) in unpack_secmark()
581 rules->secmark_count = size; in unpack_secmark()
584 if (!unpack_u8(e, &rules->secmark[i].audit, NULL)) in unpack_secmark()
586 if (!unpack_u8(e, &rules->secmark[i].deny, NULL)) in unpack_secmark()
588 if (!aa_unpack_strdup(e, &rules->secmark[i].label, NULL)) in unpack_secmark()
600 if (rules->secmark) { in unpack_secmark()
602 kfree_sensitive(rules->secmark[i].label); in unpack_secmark()
603 kfree_sensitive(rules->secmark); in unpack_secmark()
[all …]
H A Daf_unix.c205 struct aa_ruleset *rules = profile->label.rules[0]; in profile_create_perm() local
211 state = RULE_MEDIATES_v9NET(rules); in profile_create_perm()
213 state = aa_match_to_prot(rules->policy, state, AA_MAY_CREATE, in profile_create_perm()
217 return aa_do_perms(profile, rules->policy, state, AA_MAY_CREATE, in profile_create_perm()
229 struct aa_ruleset *rules = profile->label.rules[0]; in profile_sk_perm() local
237 state = RULE_MEDIATES_v9NET(rules); in profile_sk_perm()
244 state = match_to_sk(rules->policy, state, request, unix_sk(sk), in profile_sk_perm()
247 return aa_do_perms(profile, rules->policy, state, request, p, in profile_sk_perm()
257 struct aa_ruleset *rules = profile->label.rules[0]; in profile_bind_perm() local
266 state = RULE_MEDIATES_v9NET(rules); in profile_bind_perm()
[all …]
H A Dnet.c254 struct aa_ruleset *rules = profile->label.rules[0]; in aa_profile_af_perm() local
264 state = RULE_MEDIATES_NET(rules); in aa_profile_af_perm()
267 state = aa_match_to_prot(rules->policy, state, request, family, type, in aa_profile_af_perm()
269 return aa_do_perms(profile, rules->policy, state, request, p, ad); in aa_profile_af_perm()
364 struct aa_ruleset *rules = profile->label.rules[0]; in aa_secmark_perm() local
366 if (rules->secmark_count == 0) in aa_secmark_perm()
369 for (i = 0; i < rules->secmark_count; i++) { in aa_secmark_perm()
370 if (!rules->secmark[i].secid) { in aa_secmark_perm()
371 ret = apparmor_secmark_init(&rules->secmark[i]); in aa_secmark_perm()
376 if (rules->secmark[i].secid == secid || in aa_secmark_perm()
[all …]
H A Dmount.c314 struct aa_ruleset *rules = profile->label.rules[0]; in match_mnt_path_str() local
321 if (!RULE_MEDIATES(rules, AA_CLASS_MOUNT)) in match_mnt_path_str()
336 pos = do_match_mnt(rules->policy, in match_mnt_path_str()
337 rules->policy->start[AA_CLASS_MOUNT], in match_mnt_path_str()
373 struct aa_ruleset *rules = profile->label.rules[0]; in match_mnt() local
379 if (!RULE_MEDIATES(rules, AA_CLASS_MOUNT)) in match_mnt()
605 struct aa_ruleset *rules = profile->label.rules[0]; in profile_umount() local
614 if (!RULE_MEDIATES(rules, AA_CLASS_MOUNT)) in profile_umount()
622 state = aa_dfa_match(rules->policy->dfa, in profile_umount()
623 rules->policy->start[AA_CLASS_MOUNT], in profile_umount()
[all …]
H A Dfile.c182 struct aa_perms *aa_lookup_condperms(kuid_t subj_uid, struct aa_policydb *rules, in aa_lookup_condperms() argument
185 unsigned int index = ACCEPT_TABLE(rules->dfa)[state]; in aa_lookup_condperms()
187 if (!(rules->perms)) in aa_lookup_condperms()
190 if ((ACCEPT_TABLE2(rules->dfa)[state] & ACCEPT_FLAG_OWNER)) { in aa_lookup_condperms()
192 return &(rules->perms[index]); in aa_lookup_condperms()
193 return &(rules->perms[index + 1]); in aa_lookup_condperms()
196 return &(rules->perms[index]); in aa_lookup_condperms()
226 struct aa_ruleset *rules = profile->label.rules[0]; in __aa_path_perm() local
230 ((flags & PATH_SOCK_COND) && !RULE_MEDIATES_v9NET(rules))) in __aa_path_perm()
232 aa_str_perms(rules->file, rules->file->start[AA_CLASS_FILE], in __aa_path_perm()
[all …]
H A Ddomain.c96 struct aa_ruleset *rules = profile->label.rules[0]; in match_component() local
100 state = aa_dfa_match(rules->file->dfa, state, "&"); in match_component()
102 return aa_dfa_match(rules->file->dfa, state, tp->base.hname); in match_component()
106 state = aa_dfa_match_len(rules->file->dfa, state, ":", 1); in match_component()
107 state = aa_dfa_match(rules->file->dfa, state, ns_name); in match_component()
108 state = aa_dfa_match_len(rules->file->dfa, state, ":", 1); in match_component()
109 return aa_dfa_match(rules->file->dfa, state, tp->base.hname); in match_component()
133 struct aa_ruleset *rules = profile->label.rules[0]; in label_compound_match() local
156 state = aa_dfa_match(rules->file->dfa, state, "//&"); in label_compound_match()
161 *perms = *(aa_lookup_condperms(current_fsuid(), rules->file, state, in label_compound_match()
[all …]
H A Dipc.c83 struct aa_ruleset *rules = profile->label.rules[0]; in profile_signal_perm() local
93 state = RULE_MEDIATES(rules, AA_CLASS_SIGNAL); in profile_signal_perm()
96 state = aa_dfa_next(rules->policy->dfa, state, ad->signal); in profile_signal_perm()
97 aa_label_match(profile, rules, peer, state, false, request, &perms); in profile_signal_perm()
H A Dpolicy.c242 static void free_ruleset(struct aa_ruleset *rules) in free_ruleset() argument
246 if (!rules) in free_ruleset()
249 aa_put_pdb(rules->file); in free_ruleset()
250 aa_put_pdb(rules->policy); in free_ruleset()
251 aa_free_cap_rules(&rules->caps); in free_ruleset()
252 aa_free_rlimit_rules(&rules->rlimits); in free_ruleset()
254 for (i = 0; i < rules->secmark_count; i++) in free_ruleset()
255 kfree_sensitive(rules->secmark[i].label); in free_ruleset()
256 kfree_sensitive(rules->secmark); in free_ruleset()
257 kfree_sensitive(rules); in free_ruleset()
[all …]
H A Dtask.c231 struct aa_ruleset *rules = profile->label.rules[0]; in profile_ptrace_perm() local
236 aa_profile_match_label(profile, rules, peer, AA_CLASS_PTRACE, request, in profile_ptrace_perm()
326 struct aa_ruleset *rules = profile->label.rules[0]; in aa_profile_ns_perm() local
329 state = RULE_MEDIATES(rules, ad->class); in aa_profile_ns_perm()
333 perms = *aa_lookup_perms(rules->policy, state); in aa_profile_ns_perm()
/linux/drivers/net/phy/mediatek/
H A Dmtk-phy-lib.c99 unsigned long rules, in mtk_phy_led_hw_is_supported() argument
106 if (rules & ~supported_triggers) in mtk_phy_led_hw_is_supported()
114 unsigned long *rules, u16 on_set, in mtk_phy_led_hw_ctrl_get() argument
156 if (!rules) in mtk_phy_led_hw_ctrl_get()
160 *rules |= BIT(TRIGGER_NETDEV_LINK); in mtk_phy_led_hw_ctrl_get()
163 *rules |= BIT(TRIGGER_NETDEV_LINK_10); in mtk_phy_led_hw_ctrl_get()
166 *rules |= BIT(TRIGGER_NETDEV_LINK_100); in mtk_phy_led_hw_ctrl_get()
169 *rules |= BIT(TRIGGER_NETDEV_LINK_1000); in mtk_phy_led_hw_ctrl_get()
172 *rules |= BIT(TRIGGER_NETDEV_LINK_2500); in mtk_phy_led_hw_ctrl_get()
175 *rules |= BIT(TRIGGER_NETDEV_FULL_DUPLEX); in mtk_phy_led_hw_ctrl_get()
[all …]
/linux/drivers/net/phy/qcom/
H A Dqca808x.c424 static int qca808x_led_parse_netdev(struct phy_device *phydev, unsigned long rules, in qca808x_led_parse_netdev() argument
428 if (test_bit(TRIGGER_NETDEV_TX, &rules)) in qca808x_led_parse_netdev()
430 if (test_bit(TRIGGER_NETDEV_RX, &rules)) in qca808x_led_parse_netdev()
432 if (test_bit(TRIGGER_NETDEV_LINK_10, &rules)) in qca808x_led_parse_netdev()
434 if (test_bit(TRIGGER_NETDEV_LINK_100, &rules)) in qca808x_led_parse_netdev()
436 if (test_bit(TRIGGER_NETDEV_LINK_1000, &rules)) in qca808x_led_parse_netdev()
438 if (test_bit(TRIGGER_NETDEV_LINK_2500, &rules)) in qca808x_led_parse_netdev()
440 if (test_bit(TRIGGER_NETDEV_HALF_DUPLEX, &rules)) in qca808x_led_parse_netdev()
442 if (test_bit(TRIGGER_NETDEV_FULL_DUPLEX, &rules)) in qca808x_led_parse_netdev()
445 if (rules && !*offload_trigger) in qca808x_led_parse_netdev()
[all …]
/linux/drivers/net/phy/
H A Dmxl-86110.c439 unsigned long rules) in mxl86110_led_hw_is_supported() argument
445 if (rules & ~supported_trgs) in mxl86110_led_hw_is_supported()
452 unsigned long *rules) in mxl86110_led_hw_control_get() argument
465 *rules |= BIT(TRIGGER_NETDEV_TX); in mxl86110_led_hw_control_get()
468 *rules |= BIT(TRIGGER_NETDEV_RX); in mxl86110_led_hw_control_get()
471 *rules |= BIT(TRIGGER_NETDEV_HALF_DUPLEX); in mxl86110_led_hw_control_get()
474 *rules |= BIT(TRIGGER_NETDEV_FULL_DUPLEX); in mxl86110_led_hw_control_get()
477 *rules |= BIT(TRIGGER_NETDEV_LINK_10); in mxl86110_led_hw_control_get()
480 *rules |= BIT(TRIGGER_NETDEV_LINK_100); in mxl86110_led_hw_control_get()
483 *rules |= BIT(TRIGGER_NETDEV_LINK_1000); in mxl86110_led_hw_control_get()
[all …]
H A Dintel-xway.c405 unsigned long rules) in xway_gphy_led_hw_is_supported() argument
413 if (rules & (BIT(TRIGGER_NETDEV_RX) | BIT(TRIGGER_NETDEV_TX)) && in xway_gphy_led_hw_is_supported()
414 !(rules & (BIT(TRIGGER_NETDEV_LINK) | in xway_gphy_led_hw_is_supported()
421 if (rules & ~supported_triggers) in xway_gphy_led_hw_is_supported()
428 unsigned long *rules) in xway_gphy_led_hw_control_get() argument
444 *rules |= BIT(TRIGGER_NETDEV_LINK_10); in xway_gphy_led_hw_control_get()
447 *rules |= BIT(TRIGGER_NETDEV_LINK_100); in xway_gphy_led_hw_control_get()
450 *rules |= BIT(TRIGGER_NETDEV_LINK_1000); in xway_gphy_led_hw_control_get()
455 *rules |= BIT(TRIGGER_NETDEV_LINK); in xway_gphy_led_hw_control_get()
458 *rules |= BIT(TRIGGER_NETDEV_TX); in xway_gphy_led_hw_control_get()
[all …]
/linux/security/ipe/
H A Dpolicy_parser.c39 for (i = 0; i < ARRAY_SIZE(p->rules); ++i) { in new_parsed_policy()
40 t = &p->rules[i]; in new_parsed_policy()
43 INIT_LIST_HEAD(&t->rules); in new_parsed_policy()
420 if (p->rules[op].default_action != IPE_ACTION_INVALID) in parse_rule()
423 p->rules[op].default_action = action; in parse_rule()
435 list_add_tail(&r->next, &p->rules[op].rules); in parse_rule()
457 for (i = 0; i < ARRAY_SIZE(p->rules); ++i) in ipe_free_parsed_policy()
458 list_for_each_entry_safe(pp, t, &p->rules[i].rules, next) { in ipe_free_parsed_policy()
485 for (i = 0; i < ARRAY_SIZE(p->rules); ++i) { in validate_policy()
486 if (p->rules[i].default_action == IPE_ACTION_INVALID) in validate_policy()
H A Deval.c317 const struct ipe_op_table *rules = NULL; in ipe_evaluate_event() local
345 rules = &pol->parsed->rules[ctx->op]; in ipe_evaluate_event()
347 list_for_each_entry(rule, &rules->rules, next) { in ipe_evaluate_event()
363 } else if (rules->default_action != IPE_ACTION_INVALID) { in ipe_evaluate_event()
364 action = rules->default_action; in ipe_evaluate_event()
/linux/net/netfilter/
H A Dnft_set_pipapo.c56 * represented as one or more rules, depending on the number of composing
62 * item mapping a matched rule to one or more rules. The position of the pair in
65 * next-field rules the current rule maps to.
108 * or multiple rules for ranges. Ranges are expanded to composing netmasks
116 * - insert references to the rules in the lookup table, selecting buckets
144 * rules from the lookup table to rules belonging to the same entry in
147 * Note that as rules map to contiguous ranges of rules, given how netmask
182 * we need to map rules fo
362 pipapo_refill(unsigned long * map,unsigned int len,unsigned int rules,unsigned long * dst,const union nft_pipapo_map_bucket * mt,bool match_only) pipapo_refill() argument
622 pipapo_realloc_mt(struct nft_pipapo_field * f,unsigned int old_rules,unsigned int rules) pipapo_realloc_mt() argument
712 pipapo_resize(struct nft_pipapo_field * f,unsigned int old_rules,unsigned int rules) pipapo_resize() argument
1584 pipapo_unmap(union nft_pipapo_map_bucket * mt,unsigned int rules,unsigned int start,unsigned int n,unsigned int to_offset,bool is_last) global() argument
[all...]
/linux/security/apparmor/include/
H A Dpolicy.h304 static inline aa_state_t RULE_MEDIATES(struct aa_ruleset *rules, in RULE_MEDIATES() argument
308 return rules->policy->start[class]; in RULE_MEDIATES()
310 return aa_dfa_match_len(rules->policy->dfa, in RULE_MEDIATES()
311 rules->policy->start[0], &class, 1); in RULE_MEDIATES()
314 static inline aa_state_t RULE_MEDIATES_v9NET(struct aa_ruleset *rules) in RULE_MEDIATES_v9NET() argument
316 return RULE_MEDIATES(rules, AA_CLASS_NETV9); in RULE_MEDIATES_v9NET()
319 static inline aa_state_t RULE_MEDIATES_NET(struct aa_ruleset *rules) in RULE_MEDIATES_NET() argument
325 aa_state_t state = RULE_MEDIATES(rules, AA_CLASS_NETV9); in RULE_MEDIATES_NET()
329 state = RULE_MEDIATES(rules, AA_CLASS_NET); in RULE_MEDIATES_NET()
/linux/tools/perf/util/
H A Dstrfilter.c160 struct strfilter *strfilter__new(const char *rules, const char **err) in strfilter__new() argument
166 filter->root = strfilter_node__new(rules, &ep); in strfilter__new()
179 const char *rules, const char **err) in strfilter__append() argument
184 if (!filter || !rules) in strfilter__append()
187 right = strfilter_node__new(rules, &ep); in strfilter__append()
207 int strfilter__or(struct strfilter *filter, const char *rules, const char **err) in strfilter__or() argument
209 return strfilter__append(filter, true, rules, err); in strfilter__or()
212 int strfilter__and(struct strfilter *filter, const char *rules, in strfilter__and() argument
215 return strfilter__append(filter, false, rules, err); in strfilter__and()
H A Dstrfilter.h30 struct strfilter *strfilter__new(const char *rules, const char **err);
43 const char *rules, const char **err);
56 const char *rules, const char **err);
/linux/drivers/net/ethernet/microchip/vcap/
H A DKconfig13 A VCAP is essentially a TCAM with rules consisting of
24 The VCAP implementation provides switchcore independent handling of rules
27 - Creating and deleting rules
28 - Updating and getting rules
32 access rules via the API in a platform independent way, with the
/linux/security/smack/
H A DKconfig17 bool "Reporting on access granted by Smack rules"
21 Enable the bring-up ("b") access mode in Smack rules.
26 rules. The developer can use the information to
27 identify which rules are necessary and what accesses
54 delivering a signal in the Smack rules.

12345678910>>...14