| /linux/drivers/net/dsa/mv88e6xxx/ |
| H A D | leds.c | 99 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 D | aquantia_leds.c | 35 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 D | capability.c | 72 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 D | resource.c | 92 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 D | policy_unpack.c | 566 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 D | af_unix.c | 205 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 D | net.c | 254 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 D | mount.c | 314 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 D | file.c | 182 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 D | domain.c | 96 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 D | ipc.c | 83 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 D | policy.c | 242 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 D | task.c | 231 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 D | mtk-phy-lib.c | 99 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 D | qca808x.c | 424 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 D | intel-xway.c | 402 unsigned long rules) in xway_gphy_led_hw_is_supported() argument 410 if (rules & (BIT(TRIGGER_NETDEV_RX) | BIT(TRIGGER_NETDEV_TX)) && in xway_gphy_led_hw_is_supported() 411 !(rules & (BIT(TRIGGER_NETDEV_LINK) | in xway_gphy_led_hw_is_supported() 418 if (rules & ~supported_triggers) in xway_gphy_led_hw_is_supported() 425 unsigned long *rules) in xway_gphy_led_hw_control_get() argument 441 *rules |= BIT(TRIGGER_NETDEV_LINK_10); in xway_gphy_led_hw_control_get() 444 *rules |= BIT(TRIGGER_NETDEV_LINK_100); in xway_gphy_led_hw_control_get() 447 *rules |= BIT(TRIGGER_NETDEV_LINK_1000); in xway_gphy_led_hw_control_get() 452 *rules |= BIT(TRIGGER_NETDEV_LINK); in xway_gphy_led_hw_control_get() 455 *rules |= BIT(TRIGGER_NETDEV_TX); in xway_gphy_led_hw_control_get() [all …]
|
| H A D | air_en8811h.c | 148 unsigned long rules; member 558 changed |= (priv->led[index].rules != 0); in air_hw_led_on_set() 562 priv->led[index].rules = 0; in air_hw_led_on_set() 589 changed |= (priv->led[index].rules != 0); in air_hw_led_blink_set() 628 priv->led[index].rules = 0; in air_led_blink_set() 653 priv->led[index].rules = 0; in air_led_brightness_set() 659 unsigned long *rules) in air_led_hw_control_get() argument 666 *rules = priv->led[index].rules; in air_led_hw_control_get() 672 unsigned long rules) in air_led_hw_control_set() argument 681 priv->led[index].rules = rules; in air_led_hw_control_set() [all …]
|
| H A D | dp83867.c | 982 static int dp83867_led_mode(u8 index, unsigned long rules) in dp83867_led_mode() argument 987 switch (rules) { in dp83867_led_mode() 1016 unsigned long rules) in dp83867_led_hw_is_supported() argument 1020 ret = dp83867_led_mode(index, rules); in dp83867_led_hw_is_supported() 1028 unsigned long rules) in dp83867_led_hw_control_set() argument 1032 mode = dp83867_led_mode(index, rules); in dp83867_led_hw_control_set() 1045 unsigned long *rules) in dp83867_led_hw_control_get() argument 1058 *rules = BIT(TRIGGER_NETDEV_LINK); in dp83867_led_hw_control_get() 1061 *rules = BIT(TRIGGER_NETDEV_LINK_10); in dp83867_led_hw_control_get() 1064 *rules = BIT(TRIGGER_NETDEV_LINK_100); in dp83867_led_hw_control_get() [all …]
|
| /linux/security/ipe/ |
| H A D | policy_parser.c | 39 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 D | eval.c | 317 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 D | nft_set_pipapo.c | 362 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/security/apparmor/include/ |
| H A D | policy.h | 304 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 D | strfilter.c | 160 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/drivers/gpu/drm/xe/ |
| H A D | xe_gen_wa_oob.c | 58 char *name, *prev_name = NULL, *rules; in parse() local 81 rules = strtok(NULL, ""); in parse() 89 rules = name; in parse() 93 if (rules[0] == '\0') { in parse() 106 name, rules); in parse() 109 fprintf(csource, ", OR,\n\t%s", rules); in parse()
|
| /linux/drivers/net/ethernet/microchip/vcap/ |
| H A D | Kconfig | 13 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
|