/Linux-v6.1/include/linux/ |
D | moduleparam.h | 73 const u16 perm; member 126 #define module_param(name, type, perm) \ argument 127 module_param_named(name, name, type, perm) 135 #define module_param_unsafe(name, type, perm) \ argument 136 module_param_named_unsafe(name, name, type, perm) 149 #define module_param_named(name, value, type, perm) \ argument 151 module_param_cb(name, ¶m_ops_##type, &value, perm); \ 161 #define module_param_named_unsafe(name, value, type, perm) \ argument 163 module_param_cb_unsafe(name, ¶m_ops_##type, &value, perm); \ 175 #define module_param_cb(name, ops, arg, perm) \ argument [all …]
|
D | lsm_hook_defs.h | 233 LSM_HOOK(int, 0, msg_queue_alloc_security, struct kern_ipc_perm *perm) 235 struct kern_ipc_perm *perm) 236 LSM_HOOK(int, 0, msg_queue_associate, struct kern_ipc_perm *perm, int msqflg) 237 LSM_HOOK(int, 0, msg_queue_msgctl, struct kern_ipc_perm *perm, int cmd) 238 LSM_HOOK(int, 0, msg_queue_msgsnd, struct kern_ipc_perm *perm, 240 LSM_HOOK(int, 0, msg_queue_msgrcv, struct kern_ipc_perm *perm, 242 LSM_HOOK(int, 0, shm_alloc_security, struct kern_ipc_perm *perm) 243 LSM_HOOK(void, LSM_RET_VOID, shm_free_security, struct kern_ipc_perm *perm) 244 LSM_HOOK(int, 0, shm_associate, struct kern_ipc_perm *perm, int shmflg) 245 LSM_HOOK(int, 0, shm_shmctl, struct kern_ipc_perm *perm, int cmd) [all …]
|
D | vhost_iotlb.h | 17 u32 perm; member 34 u64 addr, unsigned int perm, void *opaque); 36 u64 addr, unsigned int perm);
|
/Linux-v6.1/drivers/vfio/pci/ |
D | vfio_pci_config.c | 112 struct perm_bits *perm, int offset, __le32 *val); 114 struct perm_bits *perm, int offset, __le32 val); 175 int count, struct perm_bits *perm, in vfio_default_config_read() argument 182 memcpy(&virt, perm->virt + offset, count); in vfio_default_config_read() 201 int count, struct perm_bits *perm, in vfio_default_config_write() argument 206 memcpy(&write, perm->write + offset, count); in vfio_default_config_write() 211 memcpy(&virt, perm->virt + offset, count); in vfio_default_config_write() 248 int count, struct perm_bits *perm, in vfio_direct_config_read() argument 273 int count, struct perm_bits *perm, in vfio_raw_config_write() argument 286 int count, struct perm_bits *perm, in vfio_raw_config_read() argument [all …]
|
/Linux-v6.1/security/tomoyo/ |
D | file.c | 258 if (acl->perm & (1 << r->param.path.operation)) { in tomoyo_check_path_acl() 281 return (acl->perm & (1 << r->param.path_number.operation)) && in tomoyo_check_path_number_acl() 302 return (acl->perm & (1 << r->param.path2.operation)) && in tomoyo_check_path2_acl() 322 return (acl->perm & (1 << r->param.mkdev.operation)) && in tomoyo_check_mkdev_acl() 364 ->perm; in tomoyo_merge_path_acl() 365 u16 perm = READ_ONCE(*a_perm); in tomoyo_merge_path_acl() local 366 const u16 b_perm = container_of(b, struct tomoyo_path_acl, head)->perm; in tomoyo_merge_path_acl() 369 perm &= ~b_perm; in tomoyo_merge_path_acl() 371 perm |= b_perm; in tomoyo_merge_path_acl() 372 WRITE_ONCE(*a_perm, perm); in tomoyo_merge_path_acl() [all …]
|
D | network.c | 235 &container_of(a, struct tomoyo_inet_acl, head)->perm; in tomoyo_merge_inet_acl() 236 u8 perm = READ_ONCE(*a_perm); in tomoyo_merge_inet_acl() local 237 const u8 b_perm = container_of(b, struct tomoyo_inet_acl, head)->perm; in tomoyo_merge_inet_acl() 240 perm &= ~b_perm; in tomoyo_merge_inet_acl() 242 perm |= b_perm; in tomoyo_merge_inet_acl() 243 WRITE_ONCE(*a_perm, perm); in tomoyo_merge_inet_acl() 244 return !perm; in tomoyo_merge_inet_acl() 261 &container_of(a, struct tomoyo_unix_acl, head)->perm; in tomoyo_merge_unix_acl() 262 u8 perm = READ_ONCE(*a_perm); in tomoyo_merge_unix_acl() local 263 const u8 b_perm = container_of(b, struct tomoyo_unix_acl, head)->perm; in tomoyo_merge_unix_acl() [all …]
|
D | util.c | 1058 u16 perm; in tomoyo_domain_quota_is_ok() local 1069 perm = data_race(container_of(ptr, struct tomoyo_path_acl, head)->perm); in tomoyo_domain_quota_is_ok() 1072 perm = data_race(container_of(ptr, struct tomoyo_path2_acl, head)->perm); in tomoyo_domain_quota_is_ok() 1075 perm = data_race(container_of(ptr, struct tomoyo_path_number_acl, head) in tomoyo_domain_quota_is_ok() 1076 ->perm); in tomoyo_domain_quota_is_ok() 1079 perm = data_race(container_of(ptr, struct tomoyo_mkdev_acl, head)->perm); in tomoyo_domain_quota_is_ok() 1082 perm = data_race(container_of(ptr, struct tomoyo_inet_acl, head)->perm); in tomoyo_domain_quota_is_ok() 1085 perm = data_race(container_of(ptr, struct tomoyo_unix_acl, head)->perm); in tomoyo_domain_quota_is_ok() 1088 perm = 0; in tomoyo_domain_quota_is_ok() 1091 perm = 1; in tomoyo_domain_quota_is_ok() [all …]
|
/Linux-v6.1/drivers/tty/vt/ |
D | vt_ioctl.c | 284 unsigned long arg, bool perm) in vt_k_ioctl() argument 293 if (!perm) in vt_k_ioctl() 307 if (!perm) in vt_k_ioctl() 377 if (!perm) in vt_k_ioctl() 397 if (!perm) in vt_k_ioctl() 420 perm = 0; in vt_k_ioctl() 421 return vt_do_kbkeycode_ioctl(cmd, up, perm); in vt_k_ioctl() 425 return vt_do_kdsk_ioctl(cmd, up, perm, console); in vt_k_ioctl() 429 return vt_do_kdgkb_ioctl(cmd, up, perm); in vt_k_ioctl() 437 return vt_do_diacrit(cmd, up, perm); in vt_k_ioctl() [all …]
|
/Linux-v6.1/security/integrity/ |
D | digsig.c | 99 key_perm_t perm, in __integrity_init_keyring() argument 106 KGIDT_INIT(0), cred, perm, in __integrity_init_keyring() 128 key_perm_t perm; in integrity_init_keyring() local 130 perm = (KEY_POS_ALL & ~KEY_POS_SETATTR) | KEY_USR_VIEW in integrity_init_keyring() 154 perm |= KEY_USR_WRITE; in integrity_init_keyring() 157 return __integrity_init_keyring(id, perm, restriction); in integrity_init_keyring() 161 off_t size, key_perm_t perm) in integrity_add_key() argument 170 NULL, data, size, perm, in integrity_add_key() 190 key_perm_t perm; in integrity_load_x509() local 200 perm = (KEY_POS_ALL & ~KEY_POS_SETATTR) | KEY_USR_VIEW | KEY_USR_READ; in integrity_load_x509() [all …]
|
/Linux-v6.1/security/selinux/ |
D | nlmsgtab.c | 25 u32 perm; member 154 static int nlmsg_perm(u16 nlmsg_type, u32 *perm, const struct nlmsg_perm *tab, size_t tabsize) in nlmsg_perm() argument 160 *perm = tab[i].perm; in nlmsg_perm() 168 int selinux_nlmsg_lookup(u16 sclass, u16 nlmsg_type, u32 *perm) in selinux_nlmsg_lookup() argument 180 err = nlmsg_perm(nlmsg_type, perm, nlmsg_route_perms, in selinux_nlmsg_lookup() 185 err = nlmsg_perm(nlmsg_type, perm, nlmsg_tcpdiag_perms, in selinux_nlmsg_lookup() 195 err = nlmsg_perm(nlmsg_type, perm, nlmsg_xfrm_perms, in selinux_nlmsg_lookup() 204 *perm = NETLINK_AUDIT_SOCKET__NLMSG_RELAY; in selinux_nlmsg_lookup() 206 err = nlmsg_perm(nlmsg_type, perm, nlmsg_audit_perms, in selinux_nlmsg_lookup()
|
/Linux-v6.1/ipc/ |
D | util.h | 184 struct ipc64_perm *perm, int extra_perm); 209 static inline void ipc_lock_object(struct kern_ipc_perm *perm) in ipc_lock_object() argument 211 spin_lock(&perm->lock); in ipc_lock_object() 214 static inline void ipc_unlock_object(struct kern_ipc_perm *perm) in ipc_unlock_object() argument 216 spin_unlock(&perm->lock); in ipc_unlock_object() 219 static inline void ipc_assert_locked_object(struct kern_ipc_perm *perm) in ipc_assert_locked_object() argument 221 assert_spin_locked(&perm->lock); in ipc_assert_locked_object() 224 static inline void ipc_unlock(struct kern_ipc_perm *perm) in ipc_unlock() argument 226 ipc_unlock_object(perm); in ipc_unlock() 238 static inline bool ipc_valid_object(struct kern_ipc_perm *perm) in ipc_valid_object() argument [all …]
|
D | namespace.c | 111 struct kern_ipc_perm *perm; in free_ipcs() local 120 perm = idr_find(&ids->ipcs_idr, next_id); in free_ipcs() 121 if (perm == NULL) in free_ipcs() 124 ipc_lock_object(perm); in free_ipcs() 125 free(ns, perm); in free_ipcs()
|
/Linux-v6.1/security/keys/ |
D | permission.c | 55 kperm = key->perm >> 16; in key_task_permission() 61 if (gid_valid(key->gid) && key->perm & KEY_GRP_ALL) { in key_task_permission() 63 kperm = key->perm >> 8; in key_task_permission() 69 kperm = key->perm >> 8; in key_task_permission() 75 kperm = key->perm; in key_task_permission() 83 kperm |= key->perm >> 24; in key_task_permission()
|
/Linux-v6.1/security/integrity/platform_certs/ |
D | machine_keyring.c | 28 key_perm_t perm; in add_to_machine_keyring() local 31 perm = (KEY_POS_ALL & ~KEY_POS_SETATTR) | KEY_USR_VIEW; in add_to_machine_keyring() 32 rc = integrity_load_cert(INTEGRITY_KEYRING_MACHINE, source, data, len, perm); in add_to_machine_keyring() 41 data, len, perm); in add_to_machine_keyring()
|
D | platform_keyring.c | 29 key_perm_t perm; in add_to_platform_keyring() local 32 perm = (KEY_POS_ALL & ~KEY_POS_SETATTR) | KEY_USR_VIEW; in add_to_platform_keyring() 35 perm); in add_to_platform_keyring()
|
/Linux-v6.1/arch/powerpc/platforms/powernv/ |
D | opal-sysparam.c | 149 u8 *perm; in opal_sys_param_init() local 202 perm = kcalloc(count, sizeof(*perm), GFP_KERNEL); in opal_sys_param_init() 203 if (!perm) { in opal_sys_param_init() 220 if (of_property_read_u8_array(sysparam, "param-perm", perm, count)) { in opal_sys_param_init() 248 switch (perm[i] & 3) { in opal_sys_param_init() 272 kfree(perm); in opal_sys_param_init() 281 kfree(perm); in opal_sys_param_init()
|
/Linux-v6.1/drivers/vhost/ |
D | iotlb.c | 52 u64 addr, unsigned int perm, in vhost_iotlb_add_range_ctx() argument 66 perm, opaque); in vhost_iotlb_add_range_ctx() 90 map->perm = perm; in vhost_iotlb_add_range_ctx() 105 u64 addr, unsigned int perm) in vhost_iotlb_add_range() argument 108 addr, perm, NULL); in vhost_iotlb_add_range()
|
/Linux-v6.1/arch/x86/kernel/fpu/ |
D | core.c | 201 u64 perm; in fpu_init_guest_permissions() local 208 perm = fpuperm->__state_perm; in fpu_init_guest_permissions() 211 WRITE_ONCE(fpuperm->__state_perm, perm | FPU_GUEST_PERM_LOCKED); in fpu_init_guest_permissions() 215 gfpu->perm = perm & ~FPU_GUEST_PERM_LOCKED; in fpu_init_guest_permissions() 236 gfpu->perm = fpu_user_cfg.default_features; in fpu_alloc_guest_fpstate() 538 fpu->perm.__state_perm = fpu_kernel_cfg.default_features; in fpstate_reset() 539 fpu->perm.__state_size = fpu_kernel_cfg.default_size; in fpstate_reset() 540 fpu->perm.__user_state_size = fpu_user_cfg.default_size; in fpstate_reset() 542 fpu->guest_perm = fpu->perm; in fpstate_reset() 552 dst_fpu->perm = src_fpu->perm; in fpu_inherit_perms()
|
/Linux-v6.1/drivers/s390/char/ |
D | keyboard.c | 360 int cmd, int perm) in do_kdsk_ioctl() argument 391 if (!perm) in do_kdsk_ioctl() 436 int cmd, int perm) in do_kdgkb_ioctl() argument 465 if (!perm) in do_kdgkb_ioctl() 482 int perm; in kbd_ioctl() local 492 perm = current->signal->tty == tty || capable(CAP_SYS_TTY_CONFIG); in kbd_ioctl() 499 return do_kdsk_ioctl(kbd, argp, cmd, perm); in kbd_ioctl() 502 return do_kdgkb_ioctl(kbd, argp, cmd, perm); in kbd_ioctl() 538 if (!perm) in kbd_ioctl() 558 if (!perm) in kbd_ioctl()
|
/Linux-v6.1/drivers/soc/qcom/ |
D | rmtfs_mem.c | 240 perms[0].perm = QCOM_SCM_PERM_RW; in qcom_rmtfs_mem_probe() 242 perms[1].perm = QCOM_SCM_PERM_RW; in qcom_rmtfs_mem_probe() 268 struct qcom_scm_vmperm perm; in qcom_rmtfs_mem_remove() local 271 perm.vmid = QCOM_SCM_VMID_HLOS; in qcom_rmtfs_mem_remove() 272 perm.perm = QCOM_SCM_PERM_RW; in qcom_rmtfs_mem_remove() 275 &rmtfs_mem->perms, &perm, 1); in qcom_rmtfs_mem_remove()
|
/Linux-v6.1/arch/x86/kernel/cpu/mce/ |
D | inject.c | 700 umode_t perm; member 702 { .name = "status", .fops = &status_fops, .perm = S_IRUSR | S_IWUSR }, 703 { .name = "misc", .fops = &misc_fops, .perm = S_IRUSR | S_IWUSR }, 704 { .name = "addr", .fops = &addr_fops, .perm = S_IRUSR | S_IWUSR }, 705 { .name = "synd", .fops = &synd_fops, .perm = S_IRUSR | S_IWUSR }, 706 { .name = "ipid", .fops = &ipid_fops, .perm = S_IRUSR | S_IWUSR }, 707 { .name = "bank", .fops = &bank_fops, .perm = S_IRUSR | S_IWUSR }, 708 { .name = "flags", .fops = &flags_fops, .perm = S_IRUSR | S_IWUSR }, 709 { .name = "cpu", .fops = &extcpu_fops, .perm = S_IRUSR | S_IWUSR }, 710 { .name = "README", .fops = &readme_fops, .perm = S_IRUSR | S_IRGRP | S_IROTH }, [all …]
|
/Linux-v6.1/sound/core/seq/oss/ |
D | seq_oss_midi.c | 322 int perm; in snd_seq_oss_midi_open() local 336 perm = 0; in snd_seq_oss_midi_open() 338 perm |= PERM_WRITE; in snd_seq_oss_midi_open() 340 perm |= PERM_READ; in snd_seq_oss_midi_open() 341 perm &= mdev->flags; in snd_seq_oss_midi_open() 342 if (perm == 0) { in snd_seq_oss_midi_open() 348 if ((mdev->opened & perm) == perm) { in snd_seq_oss_midi_open() 353 perm &= ~mdev->opened; in snd_seq_oss_midi_open() 357 if (perm & PERM_WRITE) { in snd_seq_oss_midi_open() 364 if (perm & PERM_READ) { in snd_seq_oss_midi_open()
|
/Linux-v6.1/drivers/vdpa/vdpa_sim/ |
D | vdpa_sim.c | 121 int perm = -EFAULT; in dir_to_perm() local 125 perm = VHOST_MAP_WO; in dir_to_perm() 128 perm = VHOST_MAP_RO; in dir_to_perm() 131 perm = VHOST_MAP_RW; in dir_to_perm() 137 return perm; in dir_to_perm() 141 size_t size, unsigned int perm) in vdpasim_map_range() argument 157 (u64)dma_addr + size - 1, (u64)paddr, perm); in vdpasim_map_range() 186 int perm = dir_to_perm(dir); in vdpasim_map_page() local 188 if (perm < 0) in vdpasim_map_page() 191 return vdpasim_map_range(vdpasim, paddr, size, perm); in vdpasim_map_page() [all …]
|
/Linux-v6.1/fs/exfat/ |
D | file.c | 62 mode_t i_mode, mask, perm; in exfat_sanitize_mode() local 68 perm = *mode_ptr & ~(S_IFMT | mask); in exfat_sanitize_mode() 71 if ((perm & 0555) != (i_mode & 0555)) in exfat_sanitize_mode() 79 if ((perm & 0222) && ((perm & 0222) != (0222 & ~mask))) in exfat_sanitize_mode() 86 if ((perm & 0222) != (0222 & ~mask)) in exfat_sanitize_mode() 90 *mode_ptr &= S_IFMT | perm; in exfat_sanitize_mode()
|
/Linux-v6.1/fs/nfsd/ |
D | nfs4acl.c | 66 mask_from_posix(unsigned short perm, unsigned int flags) in mask_from_posix() argument 72 if (perm & ACL_READ) in mask_from_posix() 74 if (perm & ACL_WRITE) in mask_from_posix() 76 if ((perm & ACL_WRITE) && (flags & NFS4_ACL_DIR)) in mask_from_posix() 78 if (perm & ACL_EXECUTE) in mask_from_posix() 84 deny_mask_from_posix(unsigned short perm, u32 flags) in deny_mask_from_posix() argument 88 if (perm & ACL_READ) in deny_mask_from_posix() 90 if (perm & ACL_WRITE) in deny_mask_from_posix() 92 if ((perm & ACL_WRITE) && (flags & NFS4_ACL_DIR)) in deny_mask_from_posix() 94 if (perm & ACL_EXECUTE) in deny_mask_from_posix() [all …]
|