/linux/security/apparmor/ |
A D | file.c | 111 u32 mask = perms->audit; in aa_audit_file() 244 return perms; in aa_compute_fperms() 259 struct aa_perms *perms) in aa_str_perms() argument 270 struct aa_perms *perms) in __aa_path_perm() argument 301 perms); in profile_path_perm() 319 struct aa_perms perms = {}; in aa_path_perm() local 398 lperms.kill = perms.kill; in profile_path_link() 402 lperms = perms; in profile_path_link() 414 &perms); in profile_path_link() 547 &perms)); in __file_path_perm() [all …]
|
A D | lib.c | 297 perms->quiet = 0; in aa_apply_modes_to_perms() 300 perms->audit = 0; in aa_apply_modes_to_perms() 308 perms->kill = ALL_PERMS_MASK; in aa_apply_modes_to_perms() 326 struct aa_perms *perms) in aa_compute_perms() argument 328 *perms = (struct aa_perms) { in aa_compute_perms() 399 struct aa_perms perms; in aa_profile_label_perm() local 407 *deny |= request & perms.deny; in aa_profile_label_perm() 434 u32 denied = request & (~perms->allow | perms->deny); in aa_check_perms() 438 request &= perms->audit; in aa_check_perms() 447 if (denied & perms->kill) in aa_check_perms() [all …]
|
A D | domain.c | 137 struct aa_perms *perms) in label_compound_match() argument 154 *perms = allperms; in label_compound_match() 174 *perms = nullperms; in label_compound_match() 239 *perms = nullperms; in label_components_match() 261 *perms = nullperms; in label_match() 263 request, perms); in label_match() 267 *perms = allperms; in label_match() 269 request, perms); in label_match() 295 perms->audit = perms->quiet = perms->kill = 0; in change_profile_perms() 771 state, &perms); in profile_onexec() [all …]
|
A D | mount.c | 140 u32 mask = perms->audit; 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() 216 struct aa_perms perms = { in compute_mnt_perms() local 223 return perms; in compute_mnt_perms() 247 AA_BUG(!perms); in do_match_mnt() 321 struct aa_perms perms = { }; in match_mnt_path_str() local 585 struct aa_perms perms = { }; in profile_umount() local 646 struct aa_perms perms = { }; in build_pivotroot() local [all …]
|
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, request, sa, audit_net_cb); in aa_secmark_perm()
|
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()
|
A D | label.c | 1303 struct aa_perms *perms) in label_compound_match() argument 1319 *perms = allperms; in label_compound_match() 1339 *perms = nullperms; in label_compound_match() 1361 struct aa_perms *perms) in label_components_match() argument 1384 aa_perms_accum(perms, &tmp); in label_components_match() 1393 aa_perms_accum(perms, &tmp); in label_components_match() 1402 *perms = nullperms; in label_components_match() 1419 struct aa_perms *perms) in aa_label_match() argument 1422 perms); in aa_label_match() 1426 *perms = allperms; in aa_label_match() [all …]
|
/linux/security/apparmor/include/ |
A D | file.h | 159 int aa_audit_file(struct aa_profile *profile, struct aa_perms *perms, 187 struct aa_perms *perms); 191 int flags, struct aa_perms *perms); 219 u32 perms = 0; in aa_map_file_to_perms() local 222 perms |= MAY_WRITE; in aa_map_file_to_perms() 224 perms |= MAY_READ; in aa_map_file_to_perms() 226 if ((flags & O_APPEND) && (perms & MAY_WRITE)) in aa_map_file_to_perms() 227 perms = (perms & ~MAY_WRITE) | MAY_APPEND; in aa_map_file_to_perms() 230 perms |= MAY_WRITE; in aa_map_file_to_perms() 232 perms |= AA_MAY_CREATE; in aa_map_file_to_perms() [all …]
|
A D | perms.h | 143 struct aa_perms *perms); 145 struct aa_perms *perms); 149 int type, u32 request, struct aa_perms *perms); 153 int aa_check_perms(struct aa_profile *profile, struct aa_perms *perms,
|
/linux/arch/arm/mm/ |
A D | init.c | 449 if (!IS_ALIGNED(perms[i].start, SECTION_SIZE) || in set_section_perms() 450 !IS_ALIGNED(perms[i].end, SECTION_SIZE)) { in set_section_perms() 452 perms[i].name, perms[i].start, perms[i].end, in set_section_perms() 457 for (addr = perms[i].start; in set_section_perms() 458 addr < perms[i].end; in set_section_perms() 460 section_update(addr, perms[i].mask, in set_section_perms() 461 set ? perms[i].prot : perms[i].clear, mm); in set_section_perms() 471 static void update_sections_early(struct section_perm perms[], int n) in update_sections_early() argument 480 set_section_perms(perms, n, true, s->mm); in update_sections_early() 482 set_section_perms(perms, n, true, current->active_mm); in update_sections_early() [all …]
|
/linux/drivers/s390/crypto/ |
A D | zcrypt_api.c | 128 struct ap_perms perms; member 219 "%016lx", zcdndev->perms.apm[i]); in apmask_show() 261 "%016lx", zcdndev->perms.aqm[i]); in aqmask_show() 494 struct ap_perms *perms = &ap_perms; in zcrypt_open() local 506 perms = &zcdndev->perms; in zcrypt_open() 698 if (!zcrypt_check_queue(perms, in zcrypt_rsa_modexpo() 806 if (!zcrypt_check_queue(perms, in zcrypt_rsa_crt() 925 if (!zcrypt_check_queue(perms, in _zcrypt_send_cprb() 1097 if (!zcrypt_check_queue(perms, in _zcrypt_send_ep11_cprb() 1594 struct ap_perms *perms = in zcrypt_unlocked_ioctl() local [all …]
|
/linux/include/linux/ |
A D | kernel.h | 487 #define VERIFY_OCTAL_PERMISSIONS(perms) \ argument 488 (BUILD_BUG_ON_ZERO((perms) < 0) + \ 489 BUILD_BUG_ON_ZERO((perms) > 0777) + \ 491 BUILD_BUG_ON_ZERO((((perms) >> 6) & 4) < (((perms) >> 3) & 4)) + \ 492 BUILD_BUG_ON_ZERO((((perms) >> 3) & 4) < ((perms) & 4)) + \ 494 BUILD_BUG_ON_ZERO((((perms) >> 6) & 2) < (((perms) >> 3) & 2)) + \ 496 BUILD_BUG_ON_ZERO((perms) & 2) + \ 497 (perms))
|
/linux/scripts/selinux/genheaders/ |
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()
|
/linux/drivers/soc/qcom/ |
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() 275 &rmtfs_mem->perms, &perm, 1); in qcom_rmtfs_mem_remove()
|
/linux/fs/nfsd/ |
A D | nfs4acl.c | 431 struct posix_ace_state perms; member 582 a->aces[i].perms.allow = state->everyone.allow; in find_uid() 583 a->aces[i].perms.deny = state->everyone.deny; in find_uid() 599 a->aces[i].perms.allow = state->everyone.allow; in find_gid() 600 a->aces[i].perms.deny = state->everyone.deny; in find_gid() 610 deny_bits(&a->aces[i].perms, mask); in deny_bits_array() 618 allow_bits(&a->aces[i].perms, mask); in allow_bits_array() 640 allow_bits(&state->users->aces[i].perms, mask); in process_one_v4_ace() 642 deny_bits(&state->users->aces[i].perms, mask); in process_one_v4_ace() 643 mask = state->users->aces[i].perms.deny; in process_one_v4_ace() [all …]
|
/linux/drivers/infiniband/sw/siw/ |
A D | siw_mem.c | 106 mem->perms = rights & IWARP_ACCESS_MASK; in siw_mr_add_mem() 169 enum ib_access_flags perms, int len) in siw_check_mem() argument 182 if ((mem->perms & perms) < perms) { in siw_check_mem() 184 mem->perms, perms); in siw_check_mem() 223 enum ib_access_flags perms, u32 off, int len) in siw_check_sge() argument 248 rv = siw_check_mem(pd, *mem, sge->laddr + off, perms, len); in siw_check_sge()
|
/linux/fs/orangefs/ |
A D | orangefs-utils.c | 106 if (attrs->perms & ORANGEFS_O_EXECUTE) in orangefs_inode_perms() 108 if (attrs->perms & ORANGEFS_O_WRITE) in orangefs_inode_perms() 110 if (attrs->perms & ORANGEFS_O_READ) in orangefs_inode_perms() 113 if (attrs->perms & ORANGEFS_G_EXECUTE) in orangefs_inode_perms() 115 if (attrs->perms & ORANGEFS_G_WRITE) in orangefs_inode_perms() 117 if (attrs->perms & ORANGEFS_G_READ) in orangefs_inode_perms() 120 if (attrs->perms & ORANGEFS_U_EXECUTE) in orangefs_inode_perms() 122 if (attrs->perms & ORANGEFS_U_WRITE) in orangefs_inode_perms() 124 if (attrs->perms & ORANGEFS_U_READ) in orangefs_inode_perms() 127 if (attrs->perms & ORANGEFS_G_SGID) in orangefs_inode_perms() [all …]
|
/linux/fs/hfsplus/ |
A D | catalog.c | 84 perms->rootflags |= HFSPLUS_FLG_IMMUTABLE; in hfsplus_cat_set_perms() 86 perms->rootflags &= ~HFSPLUS_FLG_IMMUTABLE; in hfsplus_cat_set_perms() 88 perms->rootflags |= HFSPLUS_FLG_APPEND; in hfsplus_cat_set_perms() 90 perms->rootflags &= ~HFSPLUS_FLG_APPEND; in hfsplus_cat_set_perms() 92 perms->userflags = HFSPLUS_I(inode)->userflags; in hfsplus_cat_set_perms() 93 perms->mode = cpu_to_be16(inode->i_mode); in hfsplus_cat_set_perms() 94 perms->owner = cpu_to_be32(i_uid_read(inode)); in hfsplus_cat_set_perms() 95 perms->group = cpu_to_be32(i_gid_read(inode)); in hfsplus_cat_set_perms() 98 perms->dev = cpu_to_be32(inode->i_nlink); in hfsplus_cat_set_perms() 100 perms->dev = cpu_to_be32(inode->i_rdev); in hfsplus_cat_set_perms() [all …]
|
/linux/scripts/selinux/mdp/ |
A D | mdp.c | 33 const char *perms[sizeof(unsigned) * 8 + 1]; member 88 for (j = 0; map->perms[j]; j++) in main() 89 fprintf(fout, "\t%s\n", map->perms[j]); in main() 109 for (j = 0; map->perms[j]; j++) in main() 110 fprintf(fout, "\t%s\n", map->perms[j]); in main()
|
/linux/tools/testing/selftests/vm/ |
A D | mlock2.h | 31 char perms[5]; in seek_to_smaps_entry() local 45 &start, &end, perms, &offset, dev, &inode, path) < 6) in seek_to_smaps_entry()
|
/linux/security/selinux/ |
A D | avc.c | 671 const char **perms; in avc_audit_pre_callback() local 681 perms = secclass_map[sad->tclass-1].perms; in avc_audit_pre_callback() 687 if ((perm & av) && perms[i]) { in avc_audit_pre_callback() 688 audit_log_format(ab, " %s", perms[i]); in avc_audit_pre_callback() 848 u32 event, u32 perms, u8 driver, u8 xperm, u32 ssid, in avc_update_node() argument 905 node->ae.avd.allowed |= perms; in avc_update_node() 911 node->ae.avd.allowed &= ~perms; in avc_update_node() 914 node->ae.avd.auditallow |= perms; in avc_update_node() 917 node->ae.avd.auditallow &= ~perms; in avc_update_node() 920 node->ae.avd.auditdeny |= perms; in avc_update_node() [all …]
|
/linux/security/selinux/include/ |
A D | security.h | 257 #define security_xperm_set(perms, x) (perms[x >> 5] |= 1 << (x & 0x1f)) argument 258 #define security_xperm_test(perms, x) (1 & (perms[x >> 5] >> (x & 0x1f))) argument 373 char *class, char ***perms, int *nperms);
|
/linux/security/selinux/ss/ |
A D | avtab.c | 411 __le32 buf32[ARRAY_SIZE(xperms.perms.p)]; in avtab_read_item() 538 rc = next_entry(buf32, fp, sizeof(u32)*ARRAY_SIZE(xperms.perms.p)); in avtab_read_item() 543 for (i = 0; i < ARRAY_SIZE(xperms.perms.p); i++) in avtab_read_item() 544 xperms.perms.p[i] = le32_to_cpu(buf32[i]); in avtab_read_item() 615 __le32 buf32[ARRAY_SIZE(cur->datum.u.xperms->perms.p)]; in avtab_write_item() 634 for (i = 0; i < ARRAY_SIZE(cur->datum.u.xperms->perms.p); i++) in avtab_write_item() 635 buf32[i] = cpu_to_le32(cur->datum.u.xperms->perms.p[i]); in avtab_write_item() 637 ARRAY_SIZE(cur->datum.u.xperms->perms.p), fp); in avtab_write_item()
|
/linux/arch/ia64/include/asm/sn/ |
A D | sn_sal.h | 67 sn_change_memprotect(u64 paddr, u64 len, u64 perms, u64 *nasid_array) in sn_change_memprotect() argument 72 (u64)nasid_array, perms, 0, 0, 0); in sn_change_memprotect()
|
/linux/tools/testing/selftests/mqueue/ |
A D | mq_open_tests.c | 203 int perms = DEFFILEMODE; in test_queue() local 205 if ((queue = mq_open(queue_path, flags, perms, attr)) == -1) in test_queue() 225 int perms = DEFFILEMODE; in test_queue_fail() local 227 if ((queue = mq_open(queue_path, flags, perms, attr)) == -1) in test_queue_fail()
|