/kernel/linux/linux-6.6/block/ |
H A D | blk-crypto-profile.c | 14 * construct a crypto profile, then associate it with the disk's request_queue. 27 #include <linux/blk-crypto-profile.h> 42 struct blk_crypto_profile *profile; member 45 static inline void blk_crypto_hw_enter(struct blk_crypto_profile *profile) in blk_crypto_hw_enter() argument 48 * Calling into the driver requires profile->lock held and the device in blk_crypto_hw_enter() 50 * and release profile->lock via blk_crypto_reprogram_all_keys(). in blk_crypto_hw_enter() 52 if (profile->dev) in blk_crypto_hw_enter() 53 pm_runtime_get_sync(profile->dev); in blk_crypto_hw_enter() 54 down_write(&profile->lock); in blk_crypto_hw_enter() 57 static inline void blk_crypto_hw_exit(struct blk_crypto_profile *profile) in blk_crypto_hw_exit() argument 74 blk_crypto_profile_init(struct blk_crypto_profile *profile, unsigned int num_slots) blk_crypto_profile_init() argument 139 blk_crypto_profile_destroy_callback(void *profile) blk_crypto_profile_destroy_callback() argument 155 devm_blk_crypto_profile_init(struct device *dev, struct blk_crypto_profile *profile, unsigned int num_slots) devm_blk_crypto_profile_init() argument 171 blk_crypto_hash_bucket_for_key(struct blk_crypto_profile *profile, const struct blk_crypto_key *key) blk_crypto_hash_bucket_for_key() argument 181 struct blk_crypto_profile *profile = slot->profile; blk_crypto_remove_slot_from_lru_list() local 190 blk_crypto_find_keyslot(struct blk_crypto_profile *profile, const struct blk_crypto_key *key) blk_crypto_find_keyslot() argument 205 blk_crypto_find_and_grab_keyslot(struct blk_crypto_profile *profile, const struct blk_crypto_key *key) blk_crypto_find_and_grab_keyslot() argument 248 blk_crypto_get_keyslot(struct blk_crypto_profile *profile, const struct blk_crypto_key *key, struct blk_crypto_keyslot **slot_ptr) blk_crypto_get_keyslot() argument 327 struct blk_crypto_profile *profile = slot->profile; blk_crypto_put_keyslot() local 346 __blk_crypto_cfg_supported(struct blk_crypto_profile *profile, const struct blk_crypto_config *cfg) __blk_crypto_cfg_supported() argument 363 __blk_crypto_evict_key(struct blk_crypto_profile *profile, const struct blk_crypto_key *key) __blk_crypto_evict_key() argument 418 blk_crypto_reprogram_all_keys(struct blk_crypto_profile *profile) blk_crypto_reprogram_all_keys() argument 441 blk_crypto_profile_destroy(struct blk_crypto_profile *profile) blk_crypto_profile_destroy() argument 453 blk_crypto_register(struct blk_crypto_profile *profile, struct request_queue *q) blk_crypto_register() argument [all...] |
H A D | blk-crypto-sysfs.c | 9 #include <linux/blk-crypto-profile.h> 15 struct blk_crypto_profile *profile; member 20 ssize_t (*show)(struct blk_crypto_profile *profile, 26 return container_of(kobj, struct blk_crypto_kobj, kobj)->profile; in kobj_to_crypto_profile() 34 static ssize_t max_dun_bits_show(struct blk_crypto_profile *profile, in max_dun_bits_show() argument 37 return sysfs_emit(page, "%u\n", 8 * profile->max_dun_bytes_supported); in max_dun_bits_show() 40 static ssize_t num_keyslots_show(struct blk_crypto_profile *profile, in num_keyslots_show() argument 43 return sysfs_emit(page, "%u\n", profile->num_slots); in num_keyslots_show() 72 struct blk_crypto_profile *profile = kobj_to_crypto_profile(kobj); in blk_crypto_mode_is_visible() local 76 if (profile in blk_crypto_mode_is_visible() 81 blk_crypto_mode_show(struct blk_crypto_profile *profile, struct blk_crypto_attr *attr, char *page) blk_crypto_mode_show() argument 104 struct blk_crypto_profile *profile = kobj_to_crypto_profile(kobj); blk_crypto_attr_show() local [all...] |
/kernel/linux/linux-5.10/drivers/infiniband/hw/mthca/ |
H A D | mthca_profile.c | 79 struct mthca_resource *profile; in mthca_make_profile() local 82 profile = kcalloc(MTHCA_RES_NUM, sizeof(*profile), GFP_KERNEL); in mthca_make_profile() 83 if (!profile) in mthca_make_profile() 86 profile[MTHCA_RES_QP].size = dev_lim->qpc_entry_sz; in mthca_make_profile() 87 profile[MTHCA_RES_EEC].size = dev_lim->eec_entry_sz; in mthca_make_profile() 88 profile[MTHCA_RES_SRQ].size = dev_lim->srq_entry_sz; in mthca_make_profile() 89 profile[MTHCA_RES_CQ].size = dev_lim->cqc_entry_sz; in mthca_make_profile() 90 profile[MTHCA_RES_EQP].size = dev_lim->eqpc_entry_sz; in mthca_make_profile() 91 profile[MTHCA_RES_EEE in mthca_make_profile() [all...] |
/kernel/linux/linux-6.6/drivers/infiniband/hw/mthca/ |
H A D | mthca_profile.c | 77 struct mthca_resource *profile; in mthca_make_profile() local 80 profile = kcalloc(MTHCA_RES_NUM, sizeof(*profile), GFP_KERNEL); in mthca_make_profile() 81 if (!profile) in mthca_make_profile() 84 profile[MTHCA_RES_QP].size = dev_lim->qpc_entry_sz; in mthca_make_profile() 85 profile[MTHCA_RES_EEC].size = dev_lim->eec_entry_sz; in mthca_make_profile() 86 profile[MTHCA_RES_SRQ].size = dev_lim->srq_entry_sz; in mthca_make_profile() 87 profile[MTHCA_RES_CQ].size = dev_lim->cqc_entry_sz; in mthca_make_profile() 88 profile[MTHCA_RES_EQP].size = dev_lim->eqpc_entry_sz; in mthca_make_profile() 89 profile[MTHCA_RES_EEE in mthca_make_profile() [all...] |
/kernel/linux/linux-5.10/drivers/net/ethernet/mellanox/mlx4/ |
H A D | profile.c | 84 struct mlx4_resource *profile; in mlx4_make_profile() local 88 profile = kcalloc(MLX4_RES_NUM, sizeof(*profile), GFP_KERNEL); in mlx4_make_profile() 89 if (!profile) in mlx4_make_profile() 111 profile[MLX4_RES_QP].size = dev_cap->qpc_entry_sz; in mlx4_make_profile() 112 profile[MLX4_RES_RDMARC].size = dev_cap->rdmarc_entry_sz; in mlx4_make_profile() 113 profile[MLX4_RES_ALTC].size = dev_cap->altc_entry_sz; in mlx4_make_profile() 114 profile[MLX4_RES_AUXC].size = dev_cap->aux_entry_sz; in mlx4_make_profile() 115 profile[MLX4_RES_SRQ].size = dev_cap->srq_entry_sz; in mlx4_make_profile() 116 profile[MLX4_RES_C in mlx4_make_profile() [all...] |
/kernel/linux/linux-6.6/drivers/net/ethernet/mellanox/mlx4/ |
H A D | profile.c | 84 struct mlx4_resource *profile; in mlx4_make_profile() local 88 profile = kcalloc(MLX4_RES_NUM, sizeof(*profile), GFP_KERNEL); in mlx4_make_profile() 89 if (!profile) in mlx4_make_profile() 111 profile[MLX4_RES_QP].size = dev_cap->qpc_entry_sz; in mlx4_make_profile() 112 profile[MLX4_RES_RDMARC].size = dev_cap->rdmarc_entry_sz; in mlx4_make_profile() 113 profile[MLX4_RES_ALTC].size = dev_cap->altc_entry_sz; in mlx4_make_profile() 114 profile[MLX4_RES_AUXC].size = dev_cap->aux_entry_sz; in mlx4_make_profile() 115 profile[MLX4_RES_SRQ].size = dev_cap->srq_entry_sz; in mlx4_make_profile() 116 profile[MLX4_RES_C in mlx4_make_profile() [all...] |
/kernel/linux/linux-5.10/security/apparmor/ |
H A D | policy.c | 11 * task is confined by. Every task in the system has a profile attached 15 * Each profile exists in a profile namespace which is a container of 16 * visible profiles. Each namespace contains a special "unconfined" profile, 19 * Namespace and profile names can be written together in either 21 * :namespace:profile - used by kernel interfaces for easy detection 22 * namespace://profile - used by policy 26 * Reserved profile names 27 * unconfined - special automatically generated unconfined profile 28 * inherit - special name to indicate profile inheritanc 109 __add_profile(struct list_head *list, struct aa_profile *profile) __add_profile() argument 138 __list_remove_profile(struct aa_profile *profile) __list_remove_profile() argument 154 __remove_profile(struct aa_profile *profile) __remove_profile() argument 176 struct aa_profile *profile, *tmp; __aa_profile_list_release() local 205 aa_free_profile(struct aa_profile *profile) aa_free_profile() argument 260 struct aa_profile *profile; aa_alloc_profile() local 336 struct aa_profile *profile; aa_find_child() local 365 struct aa_profile *profile = NULL; __lookup_parent() local 399 struct aa_profile *profile = NULL; __lookupn_profile() local 436 struct aa_profile *profile; aa_lookupn_profile() local 460 struct aa_profile *profile; aa_fqlookupn_profile() local 506 struct aa_profile *p, *profile; aa_new_null_profile() local 581 replacement_allowed(struct aa_profile *profile, int noreplace, const char **info) replacement_allowed() argument 705 __list_lookup_parent(struct list_head *lh, struct aa_profile *profile) __list_lookup_parent() argument 1099 struct aa_profile *profile = NULL; aa_remove_profiles() local [all...] |
H A D | domain.c | 50 * may_change_ptraced_domain - check if can change profile on ptraced task 51 * @to_label: profile to change to (NOT NULL) 92 /* match a profile and its associated ns component if needed 94 * If a subns profile is not to be matched should be prescreened with 97 static inline unsigned int match_component(struct aa_profile *profile, in match_component() argument 104 state = aa_dfa_match(profile->file.dfa, state, "&"); in match_component() 105 if (profile->ns == tp->ns) in match_component() 106 return aa_dfa_match(profile->file.dfa, state, tp->base.hname); in match_component() 108 /* try matching with namespace name and then profile */ in match_component() 109 ns_name = aa_ns_name(profile in match_component() 132 label_compound_match(struct aa_profile *profile, struct aa_label *label, bool stack, unsigned int state, bool subns, u32 request, struct aa_perms *perms) label_compound_match() argument 192 label_components_match(struct aa_profile *profile, struct aa_label *label, bool stack, unsigned int start, bool subns, u32 request, struct aa_perms *perms) label_components_match() argument 253 label_match(struct aa_profile *profile, struct aa_label *label, bool stack, unsigned int state, bool subns, u32 request, struct aa_perms *perms) label_match() argument 286 change_profile_perms(struct aa_profile *profile, struct aa_label *target, bool stack, u32 request, unsigned int start, struct aa_perms *perms) change_profile_perms() argument 309 aa_xattrs_match(const struct linux_binprm *bprm, struct aa_profile *profile, unsigned int state) aa_xattrs_match() argument 392 struct aa_profile *profile, *candidate = NULL; find_attach() local 509 x_table_lookup(struct aa_profile *profile, u32 xindex, const char **name) x_table_lookup() argument 555 x_to_label(struct aa_profile *profile, const struct linux_binprm *bprm, const char *name, u32 xindex, const char **lookupname, const char **info) x_to_label() argument 622 profile_transition(struct aa_profile *profile, const struct linux_binprm *bprm, char *buffer, struct path_cond *cond, bool *secure_exec) profile_transition() argument 720 profile_onexec(struct aa_profile *profile, struct aa_label *onexec, bool stack, const struct linux_binprm *bprm, char *buffer, struct path_cond *cond, bool *secure_exec) profile_onexec() argument 798 struct aa_profile *profile; handle_onexec() local 856 struct aa_profile *profile; apparmor_bprm_creds_for_exec() local 985 build_change_hat(struct aa_profile *profile, const char *name, bool sibling) build_change_hat() argument 1036 struct aa_profile *profile, *root, *hat = NULL; change_hat() local 1151 struct aa_profile *profile; aa_change_hat() local 1258 change_profile_perms_wrapper(const char *op, const char *name, struct aa_profile *profile, struct aa_label *target, bool stack, u32 request, struct aa_perms *perms) change_profile_perms_wrapper() argument 1294 struct aa_profile *profile; aa_change_profile() local [all...] |
H A D | capability.c | 33 struct aa_profile *profile; member 55 * @profile: profile being tested for confinement (NOT NULL) 64 static int audit_caps(struct common_audit_data *sa, struct aa_profile *profile, in audit_caps() argument 74 if (likely((AUDIT_MODE(profile) != AUDIT_ALL) && in audit_caps() 75 !cap_raised(profile->caps.audit, cap))) in audit_caps() 78 } else if (KILL_MODE(profile) || in audit_caps() 79 cap_raised(profile->caps.kill, cap)) { in audit_caps() 81 } else if (cap_raised(profile->caps.quiet, cap) && in audit_caps() 82 AUDIT_MODE(profile) ! in audit_caps() 114 profile_capable(struct aa_profile *profile, int cap, unsigned int opts, struct common_audit_data *sa) profile_capable() argument 149 struct aa_profile *profile; aa_capable() local [all...] |
H A D | mount.c | 115 * @profile: the profile being enforced (NOT NULL) 130 static int audit_mount(struct aa_profile *profile, const char *op, in audit_mount() argument 142 if (unlikely(AUDIT_MODE(profile) == AUDIT_ALL)) in audit_mount() 160 AUDIT_MODE(profile) != AUDIT_NOQUIET && in audit_mount() 161 AUDIT_MODE(profile) != AUDIT_ALL) in audit_mount() 178 return aa_audit(audit_type, profile, &sa, audit_cb); in audit_mount() 293 static int path_flags(struct aa_profile *profile, const struct path *path) in path_flags() argument 295 AA_BUG(!profile); in path_flags() 298 return profile in path_flags() 316 match_mnt_path_str(struct aa_profile *profile, const struct path *mntpath, char *buffer, const char *devname, const char *type, unsigned long flags, void *data, bool binary, const char *devinfo) match_mnt_path_str() argument 373 match_mnt(struct aa_profile *profile, const struct path *path, char *buffer, struct path *devpath, char *devbuffer, const char *type, unsigned long flags, void *data, bool binary) match_mnt() argument 402 struct aa_profile *profile; aa_remount() local 426 struct aa_profile *profile; aa_bind_mount() local 463 struct aa_profile *profile; aa_mount_change_type() local 488 struct aa_profile *profile; aa_move_mount() local 523 struct aa_profile *profile; aa_new_mount() local 583 profile_umount(struct aa_profile *profile, struct path *path, char *buffer) profile_umount() argument 616 struct aa_profile *profile; aa_umount() local 639 build_pivotroot(struct aa_profile *profile, const struct path *new_path, char *new_buffer, const struct path *old_path, char *old_buffer) build_pivotroot() argument 694 struct aa_profile *profile; aa_pivotroot() local [all...] |
H A D | policy_unpack.c | 66 * aa_ext is the read of the buffer containing the serialized profile. The 96 * @new: profile if it has been allocated (MAYBE NULL) 97 * @ns_name: name of the ns the profile is to be loaded to (MAY BE NULL) 98 * @name: name of the profile being manipulated (MAYBE NULL) 109 struct aa_profile *profile = labels_profile(aa_current_raw_label()); in audit_iface() local 121 return aa_audit(AUDIT_APPARMOR_STATUS, profile, &sa, audit_cb); in audit_iface() 471 * unpack_trans_table - unpack a profile transition table 473 * @profile: profile to add the accept table to (NOT NULL) 477 static bool unpack_trans_table(struct aa_ext *e, struct aa_profile *profile) in unpack_trans_table() argument 546 unpack_xattrs(struct aa_ext *e, struct aa_profile *profile) unpack_xattrs() argument 575 unpack_secmark(struct aa_ext *e, struct aa_profile *profile) unpack_secmark() argument 619 unpack_rlimits(struct aa_ext *e, struct aa_profile *profile) unpack_rlimits() argument 676 struct aa_profile *profile = NULL; unpack_profile() local 1031 verify_profile(struct aa_profile *profile) verify_profile() argument 1178 struct aa_profile *profile = NULL; aa_unpack() local [all...] |
H A D | net.c | 108 int aa_profile_af_perm(struct aa_profile *profile, struct common_audit_data *sa, in aa_profile_af_perm() argument 118 if (profile_unconfined(profile)) in aa_profile_af_perm() 120 state = PROFILE_MEDIATES(profile, AA_CLASS_NET); in aa_profile_af_perm() 126 state = aa_dfa_match_len(profile->policy.dfa, state, (char *) &buffer, in aa_profile_af_perm() 128 aa_compute_perms(profile->policy.dfa, state, &perms); in aa_profile_af_perm() 129 aa_apply_modes_to_perms(profile, &perms); in aa_profile_af_perm() 131 return aa_check_perms(profile, &perms, request, sa, audit_net_cb); in aa_profile_af_perm() 137 struct aa_profile *profile; in aa_af_perm() local 140 return fn_for_each_confined(label, profile, in aa_af_perm() 141 aa_profile_af_perm(profile, in aa_af_perm() 154 struct aa_profile *profile; aa_label_sk_perm() local 213 aa_secmark_perm(struct aa_profile *profile, u32 request, u32 secid, struct common_audit_data *sa, struct sock *sk) aa_secmark_perm() argument 249 struct aa_profile *profile; apparmor_secmark_check() local [all...] |
H A D | ipc.c | 63 static int profile_ptrace_perm(struct aa_profile *profile, in profile_ptrace_perm() argument 70 aa_profile_match_label(profile, peer, AA_CLASS_PTRACE, request, in profile_ptrace_perm() 72 aa_apply_modes_to_perms(profile, &perms); in profile_ptrace_perm() 73 return aa_check_perms(profile, &perms, request, sa, audit_ptrace_cb); in profile_ptrace_perm() 97 /* profile uses the old style capability check for ptrace */ in profile_tracer_perm() 121 struct aa_profile *profile; in aa_may_ptrace() local 125 return xcheck_labels(tracer, tracee, profile, in aa_may_ptrace() 126 profile_tracer_perm(profile, tracee, request, &sa), in aa_may_ptrace() 127 profile_tracee_perm(profile, tracer, xrequest, &sa)); in aa_may_ptrace() 187 static int profile_signal_perm(struct aa_profile *profile, in profile_signal_perm() argument 210 struct aa_profile *profile; aa_may_signal() local [all...] |
H A D | file.c | 77 * @profile: the profile being enforced (NOT NULL) 90 int aa_audit_file(struct aa_profile *profile, struct aa_perms *perms, in aa_audit_file() argument 111 if (unlikely(AUDIT_MODE(profile) == AUDIT_ALL)) in aa_audit_file() 130 AUDIT_MODE(profile) != AUDIT_NOQUIET && in aa_audit_file() 131 AUDIT_MODE(profile) != AUDIT_ALL) in aa_audit_file() 139 return aa_audit(type, profile, &sa, file_audit_cb); in aa_audit_file() 159 struct aa_profile *profile; in path_name() local 166 fn_for_each_confined(label, profile, in path_name() 167 aa_audit_file(profile, in path_name() 266 __aa_path_perm(const char *op, struct aa_profile *profile, const char *name, u32 request, struct path_cond *cond, int flags, struct aa_perms *perms) __aa_path_perm() argument 282 profile_path_perm(const char *op, struct aa_profile *profile, const struct path *path, char *buffer, u32 request, struct path_cond *cond, int flags, struct aa_perms *perms) profile_path_perm() argument 318 struct aa_profile *profile; aa_path_perm() local 356 profile_path_link(struct aa_profile *profile, const struct path *link, char *buffer, const struct path *target, char *buffer2, struct path_cond *cond) profile_path_link() argument 465 struct aa_profile *profile; aa_path_link() local 509 struct aa_profile *profile; __file_path_perm() local [all...] |
H A D | apparmorfs.c | 99 * aa_mangle_name - mangle a profile name to std profile layout form 100 * @name: profile name to mangle (NOT NULL) 608 static void profile_query_cb(struct aa_profile *profile, struct aa_perms *perms, in profile_query_cb() argument 615 if (profile_unconfined(profile)) in profile_query_cb() 617 if (profile->file.dfa && *match_str == AA_CLASS_FILE) { in profile_query_cb() 618 dfa = profile->file.dfa; in profile_query_cb() 619 state = aa_dfa_match_len(dfa, profile->file.start, in profile_query_cb() 626 } else if (profile->policy.dfa) { in profile_query_cb() 627 if (!PROFILE_MEDIATES(profile, *match_st in profile_query_cb() 665 struct aa_profile *profile; query_data() local 754 struct aa_profile *profile; query_label() local 1070 struct aa_profile *profile = labels_profile(label); seq_profile_name_show() local 1081 struct aa_profile *profile = labels_profile(label); seq_profile_mode_show() local 1092 struct aa_profile *profile = labels_profile(label); seq_profile_attach_show() local 1108 struct aa_profile *profile = labels_profile(label); seq_profile_hash_show() local 1160 struct aa_profile *profile; seq_ns_nsstacked_show() local 1505 __aafs_profile_rmdir(struct aa_profile *profile) __aafs_profile_rmdir() argument 1549 create_profile_file(struct dentry *dir, const char *name, struct aa_profile *profile, const struct file_operations *fops) create_profile_file() argument 1563 profile_depth(struct aa_profile *profile) profile_depth() argument 1612 struct aa_profile *profile; rawdata_get_link_base() local 1669 __aafs_profile_mkdir(struct aa_profile *profile, struct dentry *parent) __aafs_profile_mkdir() argument 2171 next_profile(struct aa_ns *root, struct aa_profile *profile) next_profile() argument 2193 struct aa_profile *profile = NULL; p_start() local 2221 struct aa_profile *profile = p; p_next() local 2237 struct aa_profile *profile = p; p_stop() local 2257 struct aa_profile *profile = (struct aa_profile *)p; seq_show_profile() local [all...] |
/kernel/linux/linux-6.6/security/apparmor/ |
H A D | policy.c | 11 * task is confined by. Every task in the system has a profile attached 15 * Each profile exists in a profile namespace which is a container of 16 * visible profiles. Each namespace contains a special "unconfined" profile, 19 * Namespace and profile names can be written together in either 21 * :namespace:profile - used by kernel interfaces for easy detection 22 * namespace://profile - used by policy 26 * Reserved profile names 27 * unconfined - special automatically generated unconfined profile 28 * inherit - special name to indicate profile inheritanc 110 __add_profile(struct list_head *list, struct aa_profile *profile) __add_profile() argument 139 __list_remove_profile(struct aa_profile *profile) __list_remove_profile() argument 155 __remove_profile(struct aa_profile *profile) __remove_profile() argument 177 struct aa_profile *profile, *tmp; __aa_profile_list_release() local 242 aa_free_profile(struct aa_profile *profile) aa_free_profile() argument 297 struct aa_profile *profile; aa_alloc_profile() local 381 struct aa_profile *profile; aa_find_child() local 410 struct aa_profile *profile = NULL; __lookup_parent() local 445 struct aa_profile *parent, *profile = NULL; __create_missing_ancestors() local 493 struct aa_profile *profile = NULL; __lookupn_profile() local 530 struct aa_profile *profile; aa_lookupn_profile() local 554 struct aa_profile *profile; aa_fqlookupn_profile() local 583 struct aa_profile *profile; aa_alloc_null() local 641 struct aa_profile *p, *profile; aa_new_learning_profile() local 707 replacement_allowed(struct aa_profile *profile, int noreplace, const char **info) replacement_allowed() argument 882 __list_lookup_parent(struct list_head *lh, struct aa_profile *profile) __list_lookup_parent() argument 1298 struct aa_profile *profile = NULL; aa_remove_profiles() local [all...] |
H A D | domain.c | 33 * may_change_ptraced_domain - check if can change profile on ptraced task 35 * @to_label: profile to change to (NOT NULL) 82 /* match a profile and its associated ns component if needed 84 * If a subns profile is not to be matched should be prescreened with 87 static inline aa_state_t match_component(struct aa_profile *profile, in match_component() argument 91 struct aa_ruleset *rules = list_first_entry(&profile->rules, in match_component() 97 if (profile->ns == tp->ns) in match_component() 100 /* try matching with namespace name and then profile */ in match_component() 101 ns_name = aa_ns_name(profile->ns, tp->ns, true); in match_component() 110 * @profile 124 label_compound_match(struct aa_profile *profile, struct aa_label *label, bool stack, aa_state_t state, bool subns, u32 request, struct aa_perms *perms) label_compound_match() argument 186 label_components_match(struct aa_profile *profile, struct aa_label *label, bool stack, aa_state_t start, bool subns, u32 request, struct aa_perms *perms) label_components_match() argument 249 label_match(struct aa_profile *profile, struct aa_label *label, bool stack, aa_state_t state, bool subns, u32 request, struct aa_perms *perms) label_match() argument 282 change_profile_perms(struct aa_profile *profile, struct aa_label *target, bool stack, u32 request, aa_state_t start, struct aa_perms *perms) change_profile_perms() argument 305 aa_xattrs_match(const struct linux_binprm *bprm, struct aa_profile *profile, aa_state_t state) aa_xattrs_match() argument 390 struct aa_profile *profile, *candidate = NULL; find_attach() local 512 x_table_lookup(struct aa_profile *profile, u32 xindex, const char **name) x_table_lookup() argument 560 x_to_label(struct aa_profile *profile, const struct linux_binprm *bprm, const char *name, u32 xindex, const char **lookupname, const char **info) x_to_label() argument 629 profile_transition(const struct cred *subj_cred, struct aa_profile *profile, const struct linux_binprm *bprm, char *buffer, struct path_cond *cond, bool *secure_exec) profile_transition() argument 731 profile_onexec(const struct cred *subj_cred, struct aa_profile *profile, struct aa_label *onexec, bool stack, const struct linux_binprm *bprm, char *buffer, struct path_cond *cond, bool *secure_exec) profile_onexec() argument 814 struct aa_profile *profile; handle_onexec() local 876 struct aa_profile *profile; apparmor_bprm_creds_for_exec() local 1009 build_change_hat(const struct cred *subj_cred, struct aa_profile *profile, const char *name, bool sibling) build_change_hat() argument 1063 struct aa_profile *profile, *root, *hat = NULL; change_hat() local 1180 struct aa_profile *profile; aa_change_hat() local 1288 change_profile_perms_wrapper(const char *op, const char *name, const struct cred *subj_cred, struct aa_profile *profile, struct aa_label *target, bool stack, u32 request, struct aa_perms *perms) change_profile_perms_wrapper() argument 1328 struct aa_profile *profile; aa_change_profile() local [all...] |
H A D | capability.c | 33 struct aa_profile *profile; member 55 * @profile: profile being tested for confinement (NOT NULL) 64 static int audit_caps(struct apparmor_audit_data *ad, struct aa_profile *profile, in audit_caps() argument 67 struct aa_ruleset *rules = list_first_entry(&profile->rules, in audit_caps() 76 if (likely((AUDIT_MODE(profile) != AUDIT_ALL) && in audit_caps() 80 } else if (KILL_MODE(profile) || in audit_caps() 84 AUDIT_MODE(profile) != AUDIT_NOQUIET && in audit_caps() 85 AUDIT_MODE(profile) != AUDIT_ALL) { in audit_caps() 92 if (profile in audit_caps() 116 profile_capable(struct aa_profile *profile, int cap, unsigned int opts, struct apparmor_audit_data *ad) profile_capable() argument 155 struct aa_profile *profile; aa_capable() local [all...] |
H A D | mount.c | 117 * @profile: the profile being enforced (NOT NULL) 133 struct aa_profile *profile, const char *op, in audit_mount() 145 if (unlikely(AUDIT_MODE(profile) == AUDIT_ALL)) in audit_mount() 163 AUDIT_MODE(profile) != AUDIT_NOQUIET && in audit_mount() 164 AUDIT_MODE(profile) != AUDIT_ALL) in audit_mount() 182 return aa_audit(audit_type, profile, &ad, audit_cb); in audit_mount() 279 static int path_flags(struct aa_profile *profile, const struct path *path) in path_flags() argument 281 AA_BUG(!profile); in path_flags() 284 return profile in path_flags() 132 audit_mount(const struct cred *subj_cred, struct aa_profile *profile, const char *op, const char *name, const char *src_name, const char *type, const char *trans, unsigned long flags, const void *data, u32 request, struct aa_perms *perms, const char *info, int error) audit_mount() argument 303 match_mnt_path_str(const struct cred *subj_cred, struct aa_profile *profile, const struct path *mntpath, char *buffer, const char *devname, const char *type, unsigned long flags, void *data, bool binary, const char *devinfo) match_mnt_path_str() argument 365 match_mnt(const struct cred *subj_cred, struct aa_profile *profile, const struct path *path, char *buffer, const struct path *devpath, char *devbuffer, const char *type, unsigned long flags, void *data, bool binary) match_mnt() argument 398 struct aa_profile *profile; aa_remount() local 424 struct aa_profile *profile; aa_bind_mount() local 462 struct aa_profile *profile; aa_mount_change_type() local 489 struct aa_profile *profile; aa_move_mount() local 539 struct aa_profile *profile; aa_new_mount() local 601 profile_umount(const struct cred *subj_cred, struct aa_profile *profile, const struct path *path, char *buffer) profile_umount() argument 639 struct aa_profile *profile; aa_umount() local 662 build_pivotroot(const struct cred *subj_cred, struct aa_profile *profile, const struct path *new_path, char *new_buffer, const struct path *old_path, char *old_buffer) build_pivotroot() argument 722 struct aa_profile *profile; aa_pivotroot() local [all...] |
H A D | net.c | 109 int aa_profile_af_perm(struct aa_profile *profile, in aa_profile_af_perm() argument 113 struct aa_ruleset *rules = list_first_entry(&profile->rules, in aa_profile_af_perm() 122 if (profile_unconfined(profile)) in aa_profile_af_perm() 133 aa_apply_modes_to_perms(profile, &perms); in aa_profile_af_perm() 135 return aa_check_perms(profile, &perms, request, ad, audit_net_cb); in aa_profile_af_perm() 141 struct aa_profile *profile; in aa_af_perm() local 144 return fn_for_each_confined(label, profile, in aa_af_perm() 145 aa_profile_af_perm(profile, &ad, request, family, in aa_af_perm() 161 struct aa_profile *profile; in aa_label_sk_perm() local 165 error = fn_for_each_confined(label, profile, in aa_label_sk_perm() 221 aa_secmark_perm(struct aa_profile *profile, u32 request, u32 secid, struct apparmor_audit_data *ad) aa_secmark_perm() argument 259 struct aa_profile *profile; apparmor_secmark_check() local [all...] |
H A D | file.c | 81 * @profile: the profile being enforced (NOT NULL) 95 struct aa_profile *profile, struct aa_perms *perms, in aa_audit_file() 116 if (unlikely(AUDIT_MODE(profile) == AUDIT_ALL)) in aa_audit_file() 135 AUDIT_MODE(profile) != AUDIT_NOQUIET && in aa_audit_file() 136 AUDIT_MODE(profile) != AUDIT_ALL) in aa_audit_file() 144 return aa_audit(type, profile, &ad, file_audit_cb); in aa_audit_file() 165 struct aa_profile *profile; in path_name() local 172 fn_for_each_confined(label, profile, in path_name() 174 profile, in path_name() 94 aa_audit_file(const struct cred *subj_cred, struct aa_profile *profile, struct aa_perms *perms, const char *op, u32 request, const char *name, const char *target, struct aa_label *tlabel, kuid_t ouid, const char *info, int error) aa_audit_file() argument 228 __aa_path_perm(const char *op, const struct cred *subj_cred, struct aa_profile *profile, const char *name, u32 request, struct path_cond *cond, int flags, struct aa_perms *perms) __aa_path_perm() argument 249 profile_path_perm(const char *op, const struct cred *subj_cred, struct aa_profile *profile, const struct path *path, char *buffer, u32 request, struct path_cond *cond, int flags, struct aa_perms *perms) profile_path_perm() argument 288 struct aa_profile *profile; aa_path_perm() local 326 profile_path_link(const struct cred *subj_cred, struct aa_profile *profile, const struct path *link, char *buffer, const struct path *target, char *buffer2, struct path_cond *cond) profile_path_link() argument 444 struct aa_profile *profile; aa_path_link() local 489 struct aa_profile *profile; __file_path_perm() local [all...] |
H A D | apparmorfs.c | 102 * mangle_name - mangle a profile name to std profile layout form 103 * @name: profile name to mangle (NOT NULL) 612 static void profile_query_cb(struct aa_profile *profile, struct aa_perms *perms, in profile_query_cb() argument 615 struct aa_ruleset *rules = list_first_entry(&profile->rules, in profile_query_cb() 620 if (profile_unconfined(profile)) in profile_query_cb() 640 aa_apply_modes_to_perms(profile, &tmp); in profile_query_cb() 670 struct aa_profile *profile; in query_data() local 705 label_for_each_confined(i, label, profile) { in query_data() 706 if (!profile in query_data() 759 struct aa_profile *profile; query_label() local 1074 struct aa_profile *profile = labels_profile(label); seq_profile_name_show() local 1085 struct aa_profile *profile = labels_profile(label); seq_profile_mode_show() local 1096 struct aa_profile *profile = labels_profile(label); seq_profile_attach_show() local 1112 struct aa_profile *profile = labels_profile(label); seq_profile_hash_show() local 1164 struct aa_profile *profile; seq_ns_nsstacked_show() local 1520 __aafs_profile_rmdir(struct aa_profile *profile) __aafs_profile_rmdir() argument 1567 create_profile_file(struct dentry *dir, const char *name, struct aa_profile *profile, const struct file_operations *fops) create_profile_file() argument 1582 profile_depth(struct aa_profile *profile) profile_depth() argument 1631 struct aa_profile *profile; rawdata_get_link_base() local 1688 __aafs_profile_mkdir(struct aa_profile *profile, struct dentry *parent) __aafs_profile_mkdir() argument 2189 next_profile(struct aa_ns *root, struct aa_profile *profile) next_profile() argument 2211 struct aa_profile *profile = NULL; p_start() local 2239 struct aa_profile *profile = p; p_next() local 2255 struct aa_profile *profile = p; p_stop() local 2275 struct aa_profile *profile = (struct aa_profile *)p; seq_show_profile() local [all...] |
H A D | ipc.c | 79 struct aa_profile *profile, in profile_signal_perm() 83 struct aa_ruleset *rules = list_first_entry(&profile->rules, in profile_signal_perm() 88 if (profile_unconfined(profile) || in profile_signal_perm() 89 !ANY_RULE_MEDIATES(&profile->rules, AA_CLASS_SIGNAL)) in profile_signal_perm() 94 /* TODO: secondary cache check <profile, profile, perm> */ in profile_signal_perm() 98 aa_label_match(profile, rules, peer, state, false, request, &perms); in profile_signal_perm() 99 aa_apply_modes_to_perms(profile, &perms); in profile_signal_perm() 100 return aa_check_perms(profile, &perms, request, ad, audit_signal_cb); in profile_signal_perm() 107 struct aa_profile *profile; in aa_may_signal() local 78 profile_signal_perm(const struct cred *cred, struct aa_profile *profile, struct aa_label *peer, u32 request, struct apparmor_audit_data *ad) profile_signal_perm() argument [all...] |
H A D | policy_unpack.c | 53 * @new: profile if it has been allocated (MAYBE NULL) 54 * @ns_name: name of the ns the profile is to be loaded to (MAY BE NULL) 55 * @name: name of the profile being manipulated (MAYBE NULL) 66 struct aa_profile *profile = labels_profile(aa_current_raw_label()); in audit_iface() local 78 return aa_audit(AUDIT_APPARMOR_STATUS, profile, &ad, audit_cb); in audit_iface() 453 * unpack_trans_table - unpack a profile transition table 534 static bool unpack_xattrs(struct aa_ext *e, struct aa_profile *profile) in unpack_xattrs() argument 544 profile->attach.xattr_count = size; in unpack_xattrs() 545 profile->attach.xattrs = kcalloc(size, sizeof(char *), GFP_KERNEL); in unpack_xattrs() 546 if (!profile in unpack_xattrs() 805 struct aa_profile *profile = NULL; unpack_profile() local 1242 verify_profile(struct aa_profile *profile) verify_profile() argument 1409 struct aa_profile *profile = NULL; aa_unpack() local [all...] |
/kernel/linux/linux-5.10/drivers/devfreq/ |
H A D | governor_passive.c | 50 if (!devfreq->profile || !devfreq->profile->freq_table in devfreq_passive_get_target_freq() 51 || devfreq->profile->max_state <= 0) in devfreq_passive_get_target_freq() 71 for (i = 0; i < parent_devfreq->profile->max_state; i++) in devfreq_passive_get_target_freq() 72 if (parent_devfreq->profile->freq_table[i] == *freq) in devfreq_passive_get_target_freq() 75 if (i == parent_devfreq->profile->max_state) { in devfreq_passive_get_target_freq() 81 if (i < devfreq->profile->max_state) { in devfreq_passive_get_target_freq() 82 child_freq = devfreq->profile->freq_table[i]; in devfreq_passive_get_target_freq() 84 count = devfreq->profile->max_state; in devfreq_passive_get_target_freq() 85 child_freq = devfreq->profile in devfreq_passive_get_target_freq() [all...] |