| /linux/drivers/net/dsa/mv88e6xxx/ |
| H A D | leds.c | 99 unsigned long rules; member 105 /* The following is a lookup table to check what rules we can support on a 106 * certain LED given restrictions such as that some rules only work with fiber 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), [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/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 149 if (!rules) in mtk_phy_led_hw_ctrl_get() 153 * per-speed rules, the netdev trigger rejects that combination. in mtk_phy_led_hw_ctrl_get() 159 *rules |= BIT(TRIGGER_NETDEV_LINK); in mtk_phy_led_hw_ctrl_get() 162 *rules |= BIT(TRIGGER_NETDEV_LINK_10); in mtk_phy_led_hw_ctrl_get() 165 *rules |= BIT(TRIGGER_NETDEV_LINK_100); in mtk_phy_led_hw_ctrl_get() 168 *rules |= BIT(TRIGGER_NETDEV_LINK_1000); in mtk_phy_led_hw_ctrl_get() 171 *rules | in mtk_phy_led_hw_ctrl_get() 198 mtk_phy_led_hw_ctrl_set(struct phy_device * phydev,u8 index,unsigned long rules,u16 on_set,u16 rx_blink_set,u16 tx_blink_set) mtk_phy_led_hw_ctrl_set() argument [all...] |
| /linux/tools/perf/util/ |
| H A D | strfilter.h | 23 * @rules: Filter rule, which is a combination of glob expressions. 24 * @err: Pointer which points an error detected on @rules 26 * Parse @rules and return new strfilter. Return NULL if an error detected. 30 struct strfilter *strfilter__new(const char *rules, const char **err); 35 * @rules: Filter rule to be appended at left of the root of 37 * @err: Pointer which points an error detected on @rules 39 * Parse @rules and join it to the @filter by using logical-or. 43 const char *rules, const char **err); 48 * @rules: Filter rule to be appended at left of the root of 50 * @err: Pointer which points an error detected on @rules [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 | af_unix.c | 206 struct aa_ruleset *rules = profile->label.rules[0]; in profile_create_perm() local 212 state = RULE_MEDIATES_UNIX(rules); in profile_create_perm() 214 state = aa_match_to_prot(rules->policy, state, AA_MAY_CREATE, in profile_create_perm() 218 return aa_do_perms(profile, rules->policy, state, AA_MAY_CREATE, in profile_create_perm() 230 struct aa_ruleset *rules = profile->label.rules[0]; in profile_sk_perm() local 238 state = RULE_MEDIATES_UNIX(rules); in profile_sk_perm() 245 state = match_to_sk(rules->policy, state, request, unix_sk(sk), in profile_sk_perm() 248 return aa_do_perms(profile, rules in profile_sk_perm() 258 struct aa_ruleset *rules = profile->label.rules[0]; profile_bind_perm() local 289 struct aa_ruleset *rules = profile->label.rules[0]; profile_listen_perm() local 326 struct aa_ruleset *rules = profile->label.rules[0]; profile_accept_perm() local 356 struct aa_ruleset *rules = profile->label.rules[0]; profile_opt_perm() local 396 struct aa_ruleset *rules = profile->label.rules[0]; profile_peer_perm() local [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() 127 * profiles. AppArmor rules currently have the implicit assumption in aa_task_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() [all …]
|
| H A D | policy_unpack.c | 622 static bool unpack_secmark(struct aa_ext *e, struct aa_ruleset *rules) in unpack_secmark() 632 rules->secmark = kzalloc_objs(struct aa_secmark, size); in unpack_secmark() 633 if (!rules->secmark) in unpack_secmark() 636 rules->secmark_count = size; in unpack_secmark() 639 if (!unpack_u8(e, &rules->secmark[i].audit, NULL)) in unpack_secmark() 641 if (!unpack_u8(e, &rules->secmark[i].deny, NULL)) in unpack_secmark() 643 if (!aa_unpack_strdup(e, &rules->secmark[i].label, NULL)) in unpack_secmark() 655 if (rules->secmark) { in unpack_secmark() 657 kfree_sensitive(rules->secmark[i].label); in unpack_secmark() 658 kfree_sensitive(rules in unpack_secmark() 621 unpack_secmark(struct aa_ext * e,struct aa_ruleset * rules) unpack_secmark() argument 666 unpack_rlimits(struct aa_ext * e,struct aa_ruleset * rules) unpack_rlimits() argument 1117 struct aa_ruleset *rules; unpack_profile() local 1561 struct aa_ruleset *rules = profile->label.rules[0]; verify_profile() local [all...] |
| H A D | net.c | 258 struct aa_ruleset *rules = profile->label.rules[0]; in aa_profile_af_perm() 265 state = RULE_MEDIATES_NET(rules); in aa_profile_af_perm() 267 state = aa_match_to_prot(rules->policy, state, request, family, in aa_profile_af_perm() 269 return aa_do_perms(profile, rules->policy, state, request, p, in aa_profile_af_perm() 376 struct aa_ruleset *rules = profile->label.rules[0]; in aa_secmark_perm() local 378 if (rules->secmark_count == 0) in aa_secmark_perm() 381 for (i = 0; i < rules->secmark_count; i++) { in aa_secmark_perm() 382 if (!rules in aa_secmark_perm() 257 struct aa_ruleset *rules = profile->label.rules[0]; aa_profile_af_perm() local [all...] |
| H A D | mount.c | 247 struct aa_ruleset *rules = profile->label.rules[0]; in match_mnt_path_str() local 254 if (!RULE_MEDIATES(rules, AA_CLASS_MOUNT)) in match_mnt_path_str() 274 pos = do_match_mnt(rules->policy, in match_mnt_path_str() 275 rules->policy->start[AA_CLASS_MOUNT], in match_mnt_path_str() 307 struct aa_ruleset *rules = profile->label.rules[0]; in match_mnt() local 313 if (!RULE_MEDIATES(rules, AA_CLASS_MOUNT)) in match_mnt() 547 struct aa_ruleset *rules = profile->label.rules[0]; in profile_umount() local 556 if (!RULE_MEDIATES(rules, AA_CLASS_MOUNT)) in profile_umount() 569 state = aa_dfa_match(rules->policy->dfa, in profile_umount() 570 rules->policy->start[AA_CLASS_MOUNT], in profile_umount() [all …]
|
| H A D | file.c | 186 * @rules: the aa_policydb to lookup perms for (NOT NULL) 194 struct aa_perms *aa_lookup_condperms(kuid_t subj_uid, struct aa_policydb *rules, in aa_lookup_condperms() argument 197 unsigned int index = ACCEPT_TABLE(rules->dfa)[state]; in aa_lookup_condperms() 199 if (!(rules->perms)) in aa_lookup_condperms() 202 if ((ACCEPT_TABLE2(rules->dfa)[state] & ACCEPT_FLAG_OWNER)) { in aa_lookup_condperms() 204 return &(rules->perms[index]); in aa_lookup_condperms() 205 return &(rules->perms[index + 1]); in aa_lookup_condperms() 208 return &(rules->perms[index]); in aa_lookup_condperms() 238 struct aa_ruleset *rules = profile->label.rules[ in __aa_path_perm() local 337 struct aa_ruleset *rules = profile->label.rules[0]; profile_path_link() local [all...] |
| /linux/drivers/net/phy/qcom/ |
| H A D | qca807x.c | 136 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() 193 qca807x_led_hw_is_supported(struct phy_device * phydev,u8 index,unsigned long rules) qca807x_led_hw_is_supported() argument 204 qca807x_led_hw_control_set(struct phy_device * phydev,u8 index,unsigned long rules) qca807x_led_hw_control_set() argument 250 qca807x_led_hw_control_get(struct phy_device * phydev,u8 index,unsigned long * rules) qca807x_led_hw_control_get() argument [all...] |
| H A D | qca808x.c | 426 static int qca808x_led_parse_netdev(struct phy_device *phydev, unsigned long rules, in qca808x_led_parse_netdev() 430 if (test_bit(TRIGGER_NETDEV_TX, &rules)) in qca808x_led_parse_netdev() 432 if (test_bit(TRIGGER_NETDEV_RX, &rules)) in qca808x_led_parse_netdev() 434 if (test_bit(TRIGGER_NETDEV_LINK_10, &rules)) in qca808x_led_parse_netdev() 436 if (test_bit(TRIGGER_NETDEV_LINK_100, &rules)) in qca808x_led_parse_netdev() 438 if (test_bit(TRIGGER_NETDEV_LINK_1000, &rules)) in qca808x_led_parse_netdev() 440 if (test_bit(TRIGGER_NETDEV_LINK_2500, &rules)) in qca808x_led_parse_netdev() 442 if (test_bit(TRIGGER_NETDEV_HALF_DUPLEX, &rules)) in qca808x_led_parse_netdev() 444 if (test_bit(TRIGGER_NETDEV_FULL_DUPLEX, &rules)) in qca808x_led_parse_netdev() 447 if (rules in qca808x_led_parse_netdev() 424 qca808x_led_parse_netdev(struct phy_device * phydev,unsigned long rules,u16 * offload_trigger) qca808x_led_parse_netdev() argument 468 qca808x_led_hw_is_supported(struct phy_device * phydev,u8 index,unsigned long rules) qca808x_led_hw_is_supported() argument 479 qca808x_led_hw_control_set(struct phy_device * phydev,u8 index,unsigned long rules) qca808x_led_hw_control_set() argument 514 qca808x_led_hw_control_get(struct phy_device * phydev,u8 index,unsigned long * rules) qca808x_led_hw_control_get() argument [all...] |
| /linux/drivers/net/dsa/qca/ |
| H A D | qca8k-leds.c | 53 * 3 control rules for phy0-3 that applies to all their leds in qca8k_get_control_led_reg() 54 * 3 control rules for phy4 in qca8k_get_control_led_reg() 65 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() [all …]
|
| /linux/drivers/gpu/drm/xe/ |
| H A D | xe_rtp.c | 23 * rules and actions. This can be used to define tables with multiple entries 25 * the values to the registers that have matching rules. 37 const struct xe_rtp_rule *rules; member 53 const struct xe_rtp_rule *r = &match_ctx->rules[match_ctx->head]; in rule_match_item() 141 * Match a conjunctive set of rules (rules joined by an implicit "AND"). 144 * anymore. Nevetheless, all rules are consumed to allow detecting syntax 153 rule_is_item(&match_ctx->rules[match_ctx->head])) { in rule_match_and() 175 * Match a disjunctive set of rules (subset of rules joined by 179 * anymore. Nevetheless, all rules are consumed to allow detecting syntax 187 match_ctx->rules[match_ctx->head].match_type == XE_RTP_MATCH_OR) { in rule_match_or() [all …]
|
| /linux/net/netfilter/ |
| H A D | nft_set_pipapo.c | 56 * represented as one or more rules, depending on the number of composing 61 * Rules are mapped between fields through an array of x, n pairs, with each 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, give 364 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 1605 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...] |
| H A D | nft_set_pipapo.h | 49 /* Each n-bit range maps to up to n * 2 rules */ 83 * @n: Number of rules (in next field) this rule maps to 104 * @rules: Number of inserted rules 106 * @rules_alloc: Number of allocated rules, always >= rules 113 unsigned int rules; member 186 int pipapo_refill(unsigned long *map, unsigned int len, unsigned int rules, 243 * of rules (composing netmasks) the entries expand to. We compute the worst 260 unsigned long rules; in pipapo_estimate_size() local 266 * field can expand to up to n * 2 rules in each bucket, and in pipapo_estimate_size() 269 rules = ilog2(desc->field_len[i] * BITS_PER_BYTE) * 2; in pipapo_estimate_size() [all …]
|
| /linux/security/landlock/ |
| H A D | ruleset.h | 37 * this rule in this domain. For filesystem rules, this inherits 122 * struct landlock_rules - Red-black tree storage for Landlock rules 143 * rules in this tree storage. 156 * @rules: Red-black tree storage for rules. 158 struct landlock_rules rules; member 160 * @lock: Protects against concurrent modifications of @rules, if @usage 218 int landlock_store_rule(struct landlock_rules *const rules, 223 void landlock_free_rules(struct landlock_rules *const rules); 228 * @rules in landlock_get_rule_root() 227 landlock_get_rule_root(struct landlock_rules * const rules,const enum landlock_key_type key_type) landlock_get_rule_root() argument [all...] |
| H A D | ruleset.c | 51 new_ruleset->rules.root_inode = RB_ROOT; in landlock_create_ruleset() 54 new_ruleset->rules.root_net_port = RB_ROOT; in landlock_create_ruleset() 178 const struct landlock_rules rules = { 182 BUILD_BUG_ON(rules.num_rules < LANDLOCK_MAX_NUM_RULES); 188 * @rules: The rule storage to be updated. The caller is responsible for 199 * case, the new rule will extend @rules, similarly to a boolean OR between in landlock_store_rule() 203 * added to @rules as new constraints, similarly to a boolean AND between access in landlock_store_rule() 208 int landlock_store_rule(struct landlock_rules *const rules, in landlock_store_rule() 225 root = landlock_get_rule_root(rules, id.type); in landlock_store_rule() 251 * landlock_add_rule(2), i.e. @rules i in landlock_store_rule() 167 const struct landlock_rules rules = { build_check_ruleset() local 197 landlock_store_rule(struct landlock_rules * const rules,const struct landlock_id id,const struct landlock_layer (* layers)[],const size_t num_layers) landlock_store_rule() argument 325 landlock_free_rules(struct landlock_rules * const rules) landlock_free_rules() argument [all...] |
| /linux/security/apparmor/include/ |
| H A D | policy.h | 72 APPARMOR_ENFORCE, /* enforce access rules */ 180 /* struct aa_ruleset - data covering mediation rules 183 * @policy: general match rules governing policy 184 * @file: The set of rules governing basic file access and domain transitions 205 /* struct aa_attachment - data and rules for a profiles attachment 232 * @attach: attachment rules for the profile 233 * @rules: rules to be enforced 243 * @rules - label with the rule vec on its end 248 * attachments are determined by profile X transition rules 331 RULE_MEDIATES(struct aa_ruleset * rules,unsigned char class) RULE_MEDIATES() argument 341 RULE_MEDIATES_v9NET(struct aa_ruleset * rules) RULE_MEDIATES_v9NET() argument 346 RULE_MEDIATES_NET(struct aa_ruleset * rules) RULE_MEDIATES_NET() argument 360 RULE_MEDIATES_UNIX(struct aa_ruleset * rules) RULE_MEDIATES_UNIX() argument [all...] |
| /linux/Documentation/admin-guide/aoe/ |
| H A D | udev-install.sh | 1 # install the aoe-specific udev rules from udev.txt into 22 # find the directory where udev rules are stored, often 23 # /etc/udev/rules.d 27 rules_d=/etc/udev/rules.d 30 echo "$me Error: cannot find udev rules directory" 1>&2 33 sh -xc "cp `dirname $0`/udev.txt $rules_d/60-aoe.rules"
|
| /linux/kernel/kcsan/ |
| H A D | permissive.h | 3 * Special rules for ignoring entire classes of data-racy memory accesses. None 4 * of the rules here imply that such data races are generally safe! 6 * All rules in this file can be configured via CONFIG_KCSAN_PERMISSIVE. Keep 20 * Access ignore rules based on address. 35 * Data race ignore rules based on access type and value change patterns. 44 * Rules here are only for plain read accesses, so that we still report in kcsan_ignore_data_race() 70 * The rules here will ignore the data races if we observe no more than in kcsan_ignore_data_race()
|
| /linux/drivers/net/phy/ |
| H A D | intel-xway.c | 456 unsigned long rules) in xway_gphy_led_hw_is_supported() argument 464 if (rules & (BIT(TRIGGER_NETDEV_RX) | BIT(TRIGGER_NETDEV_TX)) && in xway_gphy_led_hw_is_supported() 465 !(rules & (BIT(TRIGGER_NETDEV_LINK) | in xway_gphy_led_hw_is_supported() 472 if (rules & ~supported_triggers) in xway_gphy_led_hw_is_supported() 479 unsigned long *rules) in xway_gphy_led_hw_control_get() argument 495 *rules |= BIT(TRIGGER_NETDEV_LINK_10); in xway_gphy_led_hw_control_get() 498 *rules |= BIT(TRIGGER_NETDEV_LINK_100); in xway_gphy_led_hw_control_get() 501 *rules |= BIT(TRIGGER_NETDEV_LINK_1000); in xway_gphy_led_hw_control_get() 506 *rules |= BIT(TRIGGER_NETDEV_LINK); in xway_gphy_led_hw_control_get() 509 *rules | in xway_gphy_led_hw_control_get() 518 xway_gphy_led_hw_control_set(struct phy_device * phydev,u8 index,unsigned long rules) xway_gphy_led_hw_control_set() argument [all...] |
| /linux/Documentation/doc-guide/ |
| H A D | parse-headers.rst | 50 The optional ``FILE_RULES`` contains a set of rules like:: 98 By default, it create rules for all symbols and defines, but it also 99 allows parsing an exception file. Such file contains a set of rules 102 1. Ignore rules: 108 2. Replace rules: 118 3. Namespace rules 123 be overridden by replace rules. 125 On ignore and replace rules, *type* can be:
|
| /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
|