/kernel/linux/linux-6.6/security/apparmor/ |
H A D | policy_compat.c | 73 * map_old_perms - map old file perms layout to the new layout 100 static void compute_fperms_allow(struct aa_perms *perms, struct aa_dfa *dfa, in compute_fperms_allow() argument 103 perms->allow |= AA_MAY_GETATTR; in compute_fperms_allow() 107 perms->allow |= AA_MAY_CHANGE_PROFILE; in compute_fperms_allow() 109 perms->allow |= AA_MAY_ONEXEC; in compute_fperms_allow() 115 struct aa_perms perms = { }; in compute_fperms_user() local 117 perms.allow = map_old_perms(dfa_user_allow(dfa, state)); in compute_fperms_user() 118 perms.audit = map_old_perms(dfa_user_audit(dfa, state)); in compute_fperms_user() 119 perms.quiet = map_old_perms(dfa_user_quiet(dfa, state)); in compute_fperms_user() 120 perms in compute_fperms_user() 130 struct aa_perms perms = { }; compute_fperms_other() local 176 struct aa_perms *perms; compute_xmatch_perms() local 213 struct aa_perms perms = { }; compute_perms_entry() local [all...] |
H A D | lib.c | 20 #include "include/perms.h" 279 * aa_audit_perms_cb - generic callback fn for auditing perms 306 * aa_apply_modes_to_perms - apply namespace and profile flags to perms 307 * @profile: that perms where computed from 308 * @perms: perms to apply mode modifiers to 310 * TODO: split into profile and ns based flags for when accumulating perms 312 void aa_apply_modes_to_perms(struct aa_profile *profile, struct aa_perms *perms) in aa_apply_modes_to_perms() argument 316 perms->audit = ALL_PERMS_MASK; in aa_apply_modes_to_perms() 319 perms in aa_apply_modes_to_perms() 337 aa_profile_match_label(struct aa_profile *profile, struct aa_ruleset *rules, struct aa_label *label, int type, u32 request, struct aa_perms *perms) aa_profile_match_label() argument 359 struct aa_perms perms; aa_profile_label_perm() local 388 aa_check_perms(struct aa_profile *profile, struct aa_perms *perms, u32 request, struct apparmor_audit_data *ad, void (*cb)(struct audit_buffer *, void *)) aa_check_perms() argument [all...] |
H A D | file.c | 82 * @perms: the permissions computed for the request (NOT NULL) 95 struct aa_profile *profile, struct aa_perms *perms, in aa_audit_file() 114 u32 mask = perms->audit; in aa_audit_file() 119 /* mask off perms that are not being force audited */ in aa_audit_file() 127 ad.request = ad.request & ~perms->allow; in aa_audit_file() 130 if (ad.request & perms->kill) in aa_audit_file() 134 if ((ad.request & perms->quiet) && in aa_audit_file() 137 ad.request &= ~perms->quiet; in aa_audit_file() 143 ad.denied = ad.request & ~perms->allow; in aa_audit_file() 184 * aa_lookup_fperms - convert dfa compressed perms t 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 217 aa_str_perms(struct aa_policydb *file_rules, aa_state_t start, const char *name, struct path_cond *cond, struct aa_perms *perms) aa_str_perms() 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 287 struct aa_perms perms = {}; aa_path_perm() local 335 struct aa_perms lperms = {}, perms; profile_path_link() local 490 struct aa_perms perms = {}; __file_path_perm() local [all...] |
H A D | domain.c | 109 * label_compound_match - find perms for full compound label 110 * @profile: profile to find perms for 116 * @perms: perms struct to set 121 * @perms should be preinitialized with allperms OR a previous permission 127 struct aa_perms *perms) in label_compound_match() 146 *perms = allperms; in label_compound_match() 158 *perms = *(aa_lookup_fperms(&(rules->file), state, &cond)); in label_compound_match() 159 aa_apply_modes_to_perms(profile, perms); in label_compound_match() 160 if ((perms in label_compound_match() 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 640 struct aa_perms perms = {}; profile_transition() local 740 struct aa_perms perms = {}; profile_onexec() local 1181 struct aa_perms perms = {}; 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 1329 struct aa_perms perms = {}; aa_change_profile() local [all...] |
H A D | mount.c | 126 * @perms: the permissions computed for the request (NOT NULL) 137 struct aa_perms *perms, const char *info, int error) in audit_mount() 143 u32 mask = perms->audit; in audit_mount() 148 /* mask off perms that are not being force audited */ in audit_mount() 156 request = request & ~perms->allow; in audit_mount() 158 if (request & perms->kill) in audit_mount() 162 if ((request & perms->quiet) && in audit_mount() 165 request &= ~perms->quiet; in audit_mount() 177 if (data && (perms->audit & AA_AUDIT_DATA)) in audit_mount() 217 "failed perms chec 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 224 do_match_mnt(struct aa_policydb *policy, aa_state_t start, const char *mntpnt, const char *devname, const char *type, unsigned long flags, void *data, bool binary, struct aa_perms *perms) do_match_mnt() argument 310 struct aa_perms perms = { }; match_mnt_path_str() local 607 struct aa_perms perms = { }; profile_umount() local 673 struct aa_perms perms = { }; build_pivotroot() local [all...] |
H A D | net.c | 115 struct aa_perms perms = { }; in aa_profile_af_perm() local 132 perms = *aa_lookup_perms(&rules->policy, state); 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() 225 struct aa_perms perms = { }; in aa_secmark_perm() local 242 perms.deny = ALL_PERMS_MASK; in aa_secmark_perm() 244 perms.allow = ALL_PERMS_MASK; in aa_secmark_perm() 247 perms.audit = ALL_PERMS_MASK; in aa_secmark_perm() 251 aa_apply_modes_to_perms(profile, &perms); in aa_secmark_perm() 253 return aa_check_perms(profile, &perms, reques in aa_secmark_perm() [all...] |
/kernel/linux/linux-5.10/security/apparmor/ |
H A D | file.c | 78 * @perms: the permissions computed for the request (NOT NULL) 90 int aa_audit_file(struct aa_profile *profile, struct aa_perms *perms, in aa_audit_file() argument 109 u32 mask = perms->audit; in aa_audit_file() 114 /* mask off perms that are not being force audited */ in aa_audit_file() 122 aad(&sa)->request = aad(&sa)->request & ~perms->allow; in aa_audit_file() 125 if (aad(&sa)->request & perms->kill) in aa_audit_file() 129 if ((aad(&sa)->request & perms->quiet) && in aa_audit_file() 132 aad(&sa)->request &= ~perms->quiet; in aa_audit_file() 138 aad(&sa)->denied = aad(&sa)->request & ~perms->allow; in aa_audit_file() 176 * map_old_perms - map old file perms layou 221 struct aa_perms perms = { }; aa_compute_fperms() local 255 aa_str_perms(struct aa_dfa *dfa, unsigned int start, const char *name, struct path_cond *cond, struct aa_perms *perms) aa_str_perms() argument 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 317 struct aa_perms perms = {}; aa_path_perm() local 362 struct aa_perms lperms = {}, perms; profile_path_link() local 510 struct aa_perms perms = {}; __file_path_perm() local [all...] |
H A D | lib.c | 20 #include "include/perms.h" 258 * aa_audit_perms_cb - generic callback fn for auditing perms 284 * aa_apply_modes_to_perms - apply namespace and profile flags to perms 285 * @profile: that perms where computed from 286 * @perms: perms to apply mode modifiers to 288 * TODO: split into profile and ns based flags for when accumulating perms 290 void aa_apply_modes_to_perms(struct aa_profile *profile, struct aa_perms *perms) in aa_apply_modes_to_perms() argument 294 perms->audit = ALL_PERMS_MASK; in aa_apply_modes_to_perms() 297 perms in aa_apply_modes_to_perms() 325 aa_compute_perms(struct aa_dfa *dfa, unsigned int state, struct aa_perms *perms) aa_compute_perms() argument 381 aa_profile_match_label(struct aa_profile *profile, struct aa_label *label, int type, u32 request, struct aa_perms *perms) aa_profile_match_label() argument 399 struct aa_perms perms; aa_profile_label_perm() local 429 aa_check_perms(struct aa_profile *profile, struct aa_perms *perms, u32 request, struct common_audit_data *sa, void (*cb)(struct audit_buffer *, void *)) aa_check_perms() argument [all...] |
H A D | mount.c | 124 * @perms: the permissions computed for the request (NOT NULL) 134 struct aa_perms *perms, const char *info, int error) in audit_mount() 140 u32 mask = perms->audit; in audit_mount() 145 /* mask off perms that are not being force audited */ in audit_mount() 153 request = request & ~perms->allow; in audit_mount() 155 if (request & perms->kill) in audit_mount() 159 if ((request & perms->quiet) && in audit_mount() 162 request &= ~perms->quiet; in audit_mount() 173 if (data && (perms->audit & AA_AUDIT_DATA)) in audit_mount() 216 struct aa_perms perms in compute_mnt_perms() local 130 audit_mount(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 240 do_match_mnt(struct aa_dfa *dfa, unsigned int start, const char *mntpnt, const char *devname, const char *type, unsigned long flags, void *data, bool binary, struct aa_perms *perms) do_match_mnt() argument 322 struct aa_perms perms = { }; match_mnt_path_str() local 586 struct aa_perms perms = { }; profile_umount() local 647 struct aa_perms perms = { }; build_pivotroot() local [all...] |
H A D | domain.c | 117 * label_compound_match - find perms for full compound label 118 * @profile: profile to find perms for 124 * @perms: perms struct to set 129 * @perms should be preinitialized with allperms OR a previous permission 135 struct aa_perms *perms) in label_compound_match() 152 *perms = allperms; in label_compound_match() 164 *perms = aa_compute_fperms(profile->file.dfa, state, &cond); in label_compound_match() 165 aa_apply_modes_to_perms(profile, perms); in label_compound_match() 166 if ((perms in label_compound_match() 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 630 struct aa_perms perms = {}; profile_transition() local 726 struct aa_perms perms = {}; profile_onexec() local 1152 struct aa_perms perms = {}; 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 1295 struct aa_perms perms = {}; aa_change_profile() local [all...] |
H A D | net.c | 111 struct aa_perms perms = { }; in aa_profile_af_perm() local 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() 217 struct aa_perms perms = { }; in aa_secmark_perm() local 232 perms.deny = ALL_PERMS_MASK; in aa_secmark_perm() 234 perms.allow = ALL_PERMS_MASK; in aa_secmark_perm() 237 perms.audit = ALL_PERMS_MASK; in aa_secmark_perm() 241 aa_apply_modes_to_perms(profile, &perms); in aa_secmark_perm() 243 return aa_check_perms(profile, &perms, reques in aa_secmark_perm() [all...] |
H A D | ipc.c | 67 struct aa_perms perms = { }; in profile_ptrace_perm() local 71 &perms); 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() 191 struct aa_perms perms; in profile_signal_perm() local 203 aa_label_match(profile, peer, state, false, request, &perms); in profile_signal_perm() 204 aa_apply_modes_to_perms(profile, &perms); in profile_signal_perm() 205 return aa_check_perms(profile, &perms, request, sa, audit_signal_cb); in profile_signal_perm()
|
/kernel/linux/linux-6.6/security/apparmor/include/ |
H A D | file.h | 18 #include "perms.h" 40 * @perms: the permission the file was opened with 112 struct aa_profile *profile, struct aa_perms *perms, 121 struct aa_perms *perms); 147 u32 perms = 0; in aa_map_file_to_perms() local 150 perms |= MAY_WRITE; in aa_map_file_to_perms() 152 perms |= MAY_READ; in aa_map_file_to_perms() 154 if ((flags & O_APPEND) && (perms & MAY_WRITE)) in aa_map_file_to_perms() 155 perms = (perms in aa_map_file_to_perms() [all...] |
/kernel/linux/linux-5.10/security/apparmor/include/ |
H A D | file.h | 18 #include "perms.h" 39 * @perms: the permission the file was opened with 111 /* FIXME: split perms from dfa and match this to description 159 int aa_audit_file(struct aa_profile *profile, struct aa_perms *perms, 167 * @perms: permission table indexed by the matched state accept entry of @dfa 172 * an index into @perms. If a named exec transition is required it is 178 /* struct perms perms; */ 187 struct aa_perms *perms); 191 int flags, struct aa_perms *perms); 219 u32 perms = 0; aa_map_file_to_perms() local [all...] |
/kernel/linux/linux-6.6/arch/arm/mm/ |
H A D | init.c | 394 static void set_section_perms(struct section_perm *perms, int n, bool set, in set_section_perms() argument 404 if (!IS_ALIGNED(perms[i].start, SECTION_SIZE) || in set_section_perms() 405 !IS_ALIGNED(perms[i].end, SECTION_SIZE)) { in set_section_perms() 407 perms[i].name, perms[i].start, perms[i].end, in set_section_perms() 412 for (addr = perms[i].start; in set_section_perms() 413 addr < perms[i].end; in set_section_perms() 415 section_update(addr, perms[i].mask, in set_section_perms() 416 set ? perms[ in set_section_perms() 426 update_sections_early(struct section_perm perms[], int n) update_sections_early() argument [all...] |
/kernel/linux/linux-6.6/drivers/s390/crypto/ |
H A D | zcrypt_api.c | 122 struct ap_perms perms; member 167 for (i = 0; i < sizeof(zcdndev->perms.ioctlm) / sizeof(long); i++) in ioctlmask_show() 168 n += sysfs_emit_at(buf, n, "%016lx", zcdndev->perms.ioctlm[i]); in ioctlmask_show() 183 rc = ap_parse_mask_str(buf, zcdndev->perms.ioctlm, in ioctlmask_store() 204 for (i = 0; i < sizeof(zcdndev->perms.apm) / sizeof(long); i++) in apmask_show() 205 n += sysfs_emit_at(buf, n, "%016lx", zcdndev->perms.apm[i]); in apmask_show() 220 rc = ap_parse_mask_str(buf, zcdndev->perms.apm, in apmask_store() 241 for (i = 0; i < sizeof(zcdndev->perms.aqm) / sizeof(long); i++) in aqmask_show() 242 n += sysfs_emit_at(buf, n, "%016lx", zcdndev->perms.aqm[i]); in aqmask_show() 257 rc = ap_parse_mask_str(buf, zcdndev->perms in aqmask_store() 504 struct ap_perms *perms = &ap_perms; zcrypt_open() local 547 zcrypt_check_ioctl(struct ap_perms *perms, unsigned int cmd) zcrypt_check_ioctl() argument 565 zcrypt_check_card(struct ap_perms *perms, int card) zcrypt_check_card() argument 570 zcrypt_check_queue(struct ap_perms *perms, int queue) zcrypt_check_queue() argument 637 zcrypt_rsa_modexpo(struct ap_perms *perms, struct zcrypt_track *tr, struct ica_rsa_modexpo *mex) zcrypt_rsa_modexpo() argument 742 zcrypt_rsa_crt(struct ap_perms *perms, struct zcrypt_track *tr, struct ica_rsa_modexpo_crt *crt) zcrypt_rsa_crt() argument 847 _zcrypt_send_cprb(bool userspace, struct ap_perms *perms, struct zcrypt_track *tr, struct ica_xcRB *xcrb) _zcrypt_send_cprb() argument 1004 _zcrypt_send_ep11_cprb(bool userspace, struct ap_perms *perms, struct zcrypt_track *tr, struct ep11_urb *xcrb) _zcrypt_send_ep11_cprb() argument 1421 icarsamodexpo_ioctl(struct ap_perms *perms, unsigned long arg) icarsamodexpo_ioctl() argument 1453 icarsacrt_ioctl(struct ap_perms *perms, unsigned long arg) icarsacrt_ioctl() argument 1485 zsecsendcprb_ioctl(struct ap_perms *perms, unsigned long arg) zsecsendcprb_ioctl() argument 1518 zsendep11cprb_ioctl(struct ap_perms *perms, unsigned long arg) zsendep11cprb_ioctl() argument 1554 struct ap_perms *perms = zcrypt_unlocked_ioctl() local 1691 trans_modexpo32(struct ap_perms *perms, struct file *filp, unsigned int cmd, unsigned long arg) trans_modexpo32() argument 1741 trans_modexpo_crt32(struct ap_perms *perms, struct file *filp, unsigned int cmd, unsigned long arg) trans_modexpo_crt32() argument 1802 trans_xcrb32(struct ap_perms *perms, struct file *filp, unsigned int cmd, unsigned long arg) trans_xcrb32() argument 1860 struct ap_perms *perms = zcrypt_compat_ioctl() local [all...] |
/kernel/linux/linux-6.6/include/linux/ |
H A D | kernel.h | 438 #define VERIFY_OCTAL_PERMISSIONS(perms) \ 439 (BUILD_BUG_ON_ZERO((perms) < 0) + \ 440 BUILD_BUG_ON_ZERO((perms) > 0777) + \ 442 BUILD_BUG_ON_ZERO((((perms) >> 6) & 4) < (((perms) >> 3) & 4)) + \ 443 BUILD_BUG_ON_ZERO((((perms) >> 3) & 4) < ((perms) & 4)) + \ 445 BUILD_BUG_ON_ZERO((((perms) >> 6) & 2) < (((perms) >> 3) & 2)) + \ 447 BUILD_BUG_ON_ZERO((perms) [all...] |
/kernel/linux/linux-5.10/drivers/s390/crypto/ |
H A D | zcrypt_api.c | 129 struct ap_perms perms; member 175 for (i = 0; i < sizeof(zcdndev->perms.ioctlm) / sizeof(long); i++) in ioctlmask_show() 178 "%016lx", zcdndev->perms.ioctlm[i]); in ioctlmask_show() 195 rc = ap_parse_mask_str(buf, zcdndev->perms.ioctlm, in ioctlmask_store() 217 for (i = 0; i < sizeof(zcdndev->perms.apm) / sizeof(long); i++) in apmask_show() 220 "%016lx", zcdndev->perms.apm[i]); in apmask_show() 237 rc = ap_parse_mask_str(buf, zcdndev->perms.apm, in apmask_store() 259 for (i = 0; i < sizeof(zcdndev->perms.aqm) / sizeof(long); i++) in aqmask_show() 262 "%016lx", zcdndev->perms.aqm[i]); in aqmask_show() 279 rc = ap_parse_mask_str(buf, zcdndev->perms in aqmask_store() 496 struct ap_perms *perms = &ap_perms; zcrypt_open() local 543 zcrypt_check_ioctl(struct ap_perms *perms, unsigned int cmd) zcrypt_check_ioctl() argument 562 zcrypt_check_card(struct ap_perms *perms, int card) zcrypt_check_card() argument 567 zcrypt_check_queue(struct ap_perms *perms, int queue) zcrypt_check_queue() argument 634 zcrypt_rsa_modexpo(struct ap_perms *perms, struct zcrypt_track *tr, struct ica_rsa_modexpo *mex) zcrypt_rsa_modexpo() argument 742 zcrypt_rsa_crt(struct ap_perms *perms, struct zcrypt_track *tr, struct ica_rsa_modexpo_crt *crt) zcrypt_rsa_crt() argument 850 _zcrypt_send_cprb(bool userspace, struct ap_perms *perms, struct zcrypt_track *tr, struct ica_xcRB *xcRB) _zcrypt_send_cprb() argument 1011 _zcrypt_send_ep11_cprb(bool userspace, struct ap_perms *perms, struct zcrypt_track *tr, struct ep11_urb *xcrb) _zcrypt_send_ep11_cprb() argument 1406 icarsamodexpo_ioctl(struct ap_perms *perms, unsigned long arg) icarsamodexpo_ioctl() argument 1451 icarsacrt_ioctl(struct ap_perms *perms, unsigned long arg) icarsacrt_ioctl() argument 1496 zsecsendcprb_ioctl(struct ap_perms *perms, unsigned long arg) zsecsendcprb_ioctl() argument 1542 zsendep11cprb_ioctl(struct ap_perms *perms, unsigned long arg) zsendep11cprb_ioctl() argument 1591 struct ap_perms *perms = zcrypt_unlocked_ioctl() local 1726 trans_modexpo32(struct ap_perms *perms, struct file *filp, unsigned int cmd, unsigned long arg) trans_modexpo32() argument 1776 trans_modexpo_crt32(struct ap_perms *perms, struct file *filp, unsigned int cmd, unsigned long arg) trans_modexpo_crt32() argument 1837 trans_xcRB32(struct ap_perms *perms, struct file *filp, unsigned int cmd, unsigned long arg) trans_xcRB32() argument 1895 struct ap_perms *perms = zcrypt_compat_ioctl() local [all...] |
/kernel/linux/linux-5.10/scripts/selinux/genheaders/ |
H A D | genheaders.c | 15 const char *perms[sizeof(unsigned) * 8 + 1]; member 65 for (j = 0; map->perms[j]; j++) in main() 66 map->perms[j] = stoupperx(map->perms[j]); in main() 128 for (j = 0; map->perms[j]; j++) { in main() 131 map->name, map->perms[j]); in main() 135 39-len, map->perms[j], 1U<<j); in main()
|
/drivers/hdf_core/adapter/uhdf2/security/src/ |
H A D | hdf_security.c | 112 static void HdfCalculatePerms(const char *permStr, volatile uint64_t *perms) in HdfCalculatePerms() argument 120 HdfSetBit(*result, perms); in HdfCalculatePerms() 137 static int32_t HdfUpdateSecurityId(const char *id, uint64_t perms, int32_t isSetCurrentSecId) in HdfUpdateSecurityId() argument 152 secInfo.secMap[0] = perms; in HdfUpdateSecurityId() 205 volatile uint64_t perms = HDF_SECURE_INVALID_PERM; in HdfRegisterAllDevSecId() local 213 HdfCalculatePerms(permStr, &perms); in HdfRegisterAllDevSecId() 219 if (perms != HDF_SECURE_INVALID_PERM) { in HdfRegisterAllDevSecId() 222 ret = HdfRegisterSecurityId(hostName, perms); in HdfRegisterAllDevSecId() 226 perms = HDF_SECURE_INVALID_PERM; in HdfRegisterAllDevSecId()
|
/kernel/linux/linux-5.10/drivers/soc/qcom/ |
H A D | rmtfs_mem.c | 33 unsigned int perms; member 174 struct qcom_scm_vmperm perms[2]; in qcom_rmtfs_mem_probe() local 239 perms[0].vmid = QCOM_SCM_VMID_HLOS; in qcom_rmtfs_mem_probe() 240 perms[0].perm = QCOM_SCM_PERM_RW; in qcom_rmtfs_mem_probe() 241 perms[1].vmid = vmid; in qcom_rmtfs_mem_probe() 242 perms[1].perm = QCOM_SCM_PERM_RW; in qcom_rmtfs_mem_probe() 244 rmtfs_mem->perms = BIT(QCOM_SCM_VMID_HLOS); in qcom_rmtfs_mem_probe() 246 &rmtfs_mem->perms, perms, 2); in qcom_rmtfs_mem_probe() 270 if (rmtfs_mem->perms) { in qcom_rmtfs_mem_remove() [all...] |
/kernel/linux/linux-6.6/drivers/soc/qcom/ |
H A D | rmtfs_mem.c | 34 u64 perms; member 174 struct qcom_scm_vmperm perms[NUM_MAX_VMIDS + 1]; in qcom_rmtfs_mem_probe() local 255 perms[0].vmid = QCOM_SCM_VMID_HLOS; in qcom_rmtfs_mem_probe() 256 perms[0].perm = QCOM_SCM_PERM_RW; in qcom_rmtfs_mem_probe() 259 perms[i + 1].vmid = vmid[i]; in qcom_rmtfs_mem_probe() 260 perms[i + 1].perm = QCOM_SCM_PERM_RW; in qcom_rmtfs_mem_probe() 263 rmtfs_mem->perms = BIT(QCOM_SCM_VMID_HLOS); in qcom_rmtfs_mem_probe() 265 &rmtfs_mem->perms, perms, num_vmids + 1); in qcom_rmtfs_mem_probe() 289 if (rmtfs_mem->perms) { in qcom_rmtfs_mem_remove() [all...] |
/applications/standard/calendardata/calendarmanager/test/unittest/src/ |
H A D | get_self_permissions.cpp | 28 auto perms = std::make_unique<const char *[]>(permission.size()); in SetAccessTokenPermission() local 30 perms[i] = permission[i].c_str(); in SetAccessTokenPermission() 38 .perms = perms.get(), in SetAccessTokenPermission()
|
H A D | test_main.cpp | 55 vector<string> perms; in InitEnv() local 56 perms.push_back("ohos.permission.READ_CALENDAR"); in InitEnv() 57 perms.push_back("ohos.permission.WRITE_CALENDAR"); in InitEnv() 59 SetAccessTokenPermission("calendar_manager_test", perms, tokenId); in InitEnv()
|
/kernel/linux/linux-5.10/arch/arm/mm/ |
H A D | init.c | 521 static void set_section_perms(struct section_perm *perms, int n, bool set, in set_section_perms() argument 531 if (!IS_ALIGNED(perms[i].start, SECTION_SIZE) || in set_section_perms() 532 !IS_ALIGNED(perms[i].end, SECTION_SIZE)) { in set_section_perms() 534 perms[i].name, perms[i].start, perms[i].end, in set_section_perms() 539 for (addr = perms[i].start; in set_section_perms() 540 addr < perms[i].end; in set_section_perms() 542 section_update(addr, perms[i].mask, in set_section_perms() 543 set ? perms[ in set_section_perms() 553 update_sections_early(struct section_perm perms[], int n) update_sections_early() argument [all...] |