Home
last modified time | relevance | path

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

12345678910>>...20

/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 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 Dpolicy_unpack.c620 static bool unpack_secmark(struct aa_ext *e, struct aa_ruleset *rules) in unpack_secmark() argument
630 rules->secmark = kzalloc_objs(struct aa_secmark, size); in unpack_secmark()
631 if (!rules->secmark) in unpack_secmark()
634 rules->secmark_count = size; in unpack_secmark()
637 if (!unpack_u8(e, &rules->secmark[i].audit, NULL)) in unpack_secmark()
639 if (!unpack_u8(e, &rules->secmark[i].deny, NULL)) in unpack_secmark()
641 if (!aa_unpack_strdup(e, &rules->secmark[i].label, NULL)) in unpack_secmark()
653 if (rules->secmark) { in unpack_secmark()
655 kfree_sensitive(rules->secmark[i].label); in unpack_secmark()
656 kfree_sensitive(rules->secmark); in unpack_secmark()
[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()
366 struct aa_ruleset *rules = profile->label.rules[0]; in aa_secmark_perm() local
368 if (rules->secmark_count == 0) in aa_secmark_perm()
371 for (i = 0; i < rules->secmark_count; i++) { in aa_secmark_perm()
372 if (!rules->secmark[i].secid) { in aa_secmark_perm()
373 ret = apparmor_secmark_init(&rules->secmark[i]); in aa_secmark_perm()
378 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.c187 struct aa_perms *aa_lookup_condperms(kuid_t subj_uid, struct aa_policydb *rules, in aa_lookup_condperms() argument
190 unsigned int index = ACCEPT_TABLE(rules->dfa)[state]; in aa_lookup_condperms()
192 if (!(rules->perms)) in aa_lookup_condperms()
195 if ((ACCEPT_TABLE2(rules->dfa)[state] & ACCEPT_FLAG_OWNER)) { in aa_lookup_condperms()
197 return &(rules->perms[index]); in aa_lookup_condperms()
198 return &(rules->perms[index + 1]); in aa_lookup_condperms()
201 return &(rules->perms[index]); in aa_lookup_condperms()
231 struct aa_ruleset *rules = profile->label.rules[0]; in __aa_path_perm() local
235 ((flags & PATH_SOCK_COND) && !RULE_MEDIATES_v9NET(rules))) in __aa_path_perm()
237 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 …]
/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 Dqca807x.c136 static int qca807x_led_parse_netdev(struct phy_device *phydev, unsigned long rules, in qca807x_led_parse_netdev() argument
142 if (test_bit(TRIGGER_NETDEV_TX, &rules)) in qca807x_led_parse_netdev()
144 if (test_bit(TRIGGER_NETDEV_RX, &rules)) in qca807x_led_parse_netdev()
146 if (test_bit(TRIGGER_NETDEV_LINK_10, &rules)) in qca807x_led_parse_netdev()
148 if (test_bit(TRIGGER_NETDEV_LINK_100, &rules)) in qca807x_led_parse_netdev()
150 if (test_bit(TRIGGER_NETDEV_LINK_1000, &rules)) in qca807x_led_parse_netdev()
152 if (test_bit(TRIGGER_NETDEV_HALF_DUPLEX, &rules)) in qca807x_led_parse_netdev()
154 if (test_bit(TRIGGER_NETDEV_FULL_DUPLEX, &rules)) in qca807x_led_parse_netdev()
158 if (test_bit(TRIGGER_NETDEV_TX, &rules)) in qca807x_led_parse_netdev()
160 if (test_bit(TRIGGER_NETDEV_RX, &rules)) in qca807x_led_parse_netdev()
[all …]
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/dsa/qca/
H A Dqca8k-leds.c65 qca8k_parse_netdev(unsigned long rules, u32 *offload_trigger) in qca8k_parse_netdev() argument
68 if (test_bit(TRIGGER_NETDEV_TX, &rules)) in qca8k_parse_netdev()
70 if (test_bit(TRIGGER_NETDEV_RX, &rules)) in qca8k_parse_netdev()
72 if (test_bit(TRIGGER_NETDEV_LINK_10, &rules)) in qca8k_parse_netdev()
74 if (test_bit(TRIGGER_NETDEV_LINK_100, &rules)) in qca8k_parse_netdev()
76 if (test_bit(TRIGGER_NETDEV_LINK_1000, &rules)) in qca8k_parse_netdev()
78 if (test_bit(TRIGGER_NETDEV_HALF_DUPLEX, &rules)) in qca8k_parse_netdev()
80 if (test_bit(TRIGGER_NETDEV_FULL_DUPLEX, &rules)) in qca8k_parse_netdev()
83 if (rules && !*offload_trigger) in qca8k_parse_netdev()
278 qca8k_cled_hw_control_is_supported(struct led_classdev *ldev, unsigned long rules) in qca8k_cled_hw_control_is_supported() argument
[all …]
/linux/drivers/net/phy/
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 …]
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 Ddp83td510.c329 static int dp83td510_led_mode(u8 index, unsigned long rules) in dp83td510_led_mode() argument
334 switch (rules) { in dp83td510_led_mode()
356 unsigned long rules) in dp83td510_led_hw_is_supported() argument
360 ret = dp83td510_led_mode(index, rules); in dp83td510_led_hw_is_supported()
368 unsigned long rules) in dp83td510_led_hw_control_set() argument
372 mode = dp83td510_led_mode(index, rules); in dp83td510_led_hw_control_set()
387 u8 index, unsigned long *rules) in dp83td510_led_hw_control_get() argument
400 *rules = BIT(TRIGGER_NETDEV_LINK); in dp83td510_led_hw_control_get()
404 *rules = BIT(TRIGGER_NETDEV_LINK_10); in dp83td510_led_hw_control_get()
407 *rules = BIT(TRIGGER_NETDEV_FULL_DUPLEX); in dp83td510_led_hw_control_get()
[all …]
H A Ddp83867.c965 static int dp83867_led_mode(u8 index, unsigned long rules) in dp83867_led_mode() argument
970 switch (rules) { in dp83867_led_mode()
999 unsigned long rules) in dp83867_led_hw_is_supported() argument
1003 ret = dp83867_led_mode(index, rules); in dp83867_led_hw_is_supported()
1011 unsigned long rules) in dp83867_led_hw_control_set() argument
1015 mode = dp83867_led_mode(index, rules); in dp83867_led_hw_control_set()
1028 unsigned long *rules) in dp83867_led_hw_control_get() argument
1041 *rules = BIT(TRIGGER_NETDEV_LINK); in dp83867_led_hw_control_get()
1044 *rules = BIT(TRIGGER_NETDEV_LINK_10); in dp83867_led_hw_control_get()
1047 *rules = BIT(TRIGGER_NETDEV_LINK_100); in dp83867_led_hw_control_get()
[all …]
/linux/Documentation/admin-guide/aoe/
H A Dudev.txt1 # These rules tell udev what device nodes to create for aoe support.
11 # udev_rules="/etc/udev/rules.d/"
12 # bash# ls /etc/udev/rules.d/
13 # 10-wacom.rules 50-udev.rules
15 # /etc/udev/rules.d/60-aoe.rules
/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.c362 int pipapo_refill(unsigned long *map, unsigned int len, unsigned int rules, in pipapo_refill() argument
377 if (unlikely(i >= rules)) { in pipapo_refill()
465 b = pipapo_refill(res_map, f->bsize, f->rules, fill_map, f->mt, in pipapo_get_slow()
622 unsigned int old_rules, unsigned int rules) in pipapo_realloc_mt() argument
626 unsigned int rules_alloc = rules; in pipapo_realloc_mt()
630 if (unlikely(rules == 0)) in pipapo_realloc_mt()
634 if (rules > old_rules && f->rules_alloc > rules) in pipapo_realloc_mt()
638 if (rules < old_rules) { in pipapo_realloc_mt()
639 unsigned int remove = f->rules_alloc - rules; in pipapo_realloc_mt()
648 if (rules > extra && in pipapo_realloc_mt()
[all …]
/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()
/linux/security/apparmor/include/
H A Dpolicy.h328 static inline aa_state_t RULE_MEDIATES(struct aa_ruleset *rules, in RULE_MEDIATES() argument
332 return rules->policy->start[class]; in RULE_MEDIATES()
334 return aa_dfa_match_len(rules->policy->dfa, in RULE_MEDIATES()
335 rules->policy->start[0], &class, 1); in RULE_MEDIATES()
338 static inline aa_state_t RULE_MEDIATES_v9NET(struct aa_ruleset *rules) in RULE_MEDIATES_v9NET() argument
340 return RULE_MEDIATES(rules, AA_CLASS_NETV9); in RULE_MEDIATES_v9NET()
343 static inline aa_state_t RULE_MEDIATES_NET(struct aa_ruleset *rules) in RULE_MEDIATES_NET() argument
349 aa_state_t state = RULE_MEDIATES(rules, AA_CLASS_NETV9); in RULE_MEDIATES_NET()
353 state = RULE_MEDIATES(rules, AA_CLASS_NET); in RULE_MEDIATES_NET()
/linux/drivers/media/i2c/ccs/
H A Dccs-data.c436 struct ccs_rule *rules_base = NULL, *rules = NULL, *next_rule = NULL; in ccs_data_parse_rules() local
443 bin_alloc(bin, sizeof(*rules) * *__num_rules); in ccs_data_parse_rules()
496 rules = next_rule; in ccs_data_parse_rules()
514 rules->if_rules = if_rule; in ccs_data_parse_rules()
515 rules->num_if_rules = __num_if_rules; in ccs_data_parse_rules()
519 if (bin->base && !rules) in ccs_data_parse_rules()
525 rules ? in ccs_data_parse_rules()
526 &rules->read_only_regs : NULL, in ccs_data_parse_rules()
527 rules ? in ccs_data_parse_rules()
528 &rules->num_read_only_regs : NULL, in ccs_data_parse_rules()
[all …]

12345678910>>...20