/linux/ipc/ |
H A D | util.c | 174 struct kern_ipc_perm *ipcp; in ipc_findkey() local 176 ipcp = rhashtable_lookup_fast(&ids->key_ht, &key, in ipc_findkey() 178 if (!ipcp) in ipc_findkey() 182 ipc_lock_object(ipcp); in ipc_findkey() 183 return ipcp; in ipc_findkey() 366 struct kern_ipc_perm *ipcp, in ipc_check_perms() argument 372 if (ipcperms(ns, ipcp, params->flg)) in ipc_check_perms() 375 err = ops->associate(ipcp, params->flg); in ipc_check_perms() 377 err = ipcp->id; in ipc_check_perms() 400 struct kern_ipc_perm *ipcp; in ipcget_public() local [all …]
|
H A D | shm.c | 123 static void do_shm_rmid(struct ipc_namespace *ns, struct kern_ipc_perm *ipcp) in do_shm_rmid() argument 127 shp = container_of(ipcp, struct shmid_kernel, shm_perm); in do_shm_rmid() 169 struct kern_ipc_perm *ipcp = ipc_obtain_object_idr(&shm_ids(ns), id); in shm_obtain_object() local 171 if (IS_ERR(ipcp)) in shm_obtain_object() 172 return ERR_CAST(ipcp); in shm_obtain_object() 174 return container_of(ipcp, struct shmid_kernel, shm_perm); in shm_obtain_object() 179 struct kern_ipc_perm *ipcp = ipc_obtain_object_check(&shm_ids(ns), id); in shm_obtain_object_check() local 181 if (IS_ERR(ipcp)) in shm_obtain_object_check() 182 return ERR_CAST(ipcp); in shm_obtain_object_check() 184 return container_of(ipcp, struct shmid_kernel, shm_perm); in shm_obtain_object_check() [all …]
|
H A D | msg.c | 104 struct kern_ipc_perm *ipcp = ipc_obtain_object_idr(&msg_ids(ns), id); in msq_obtain_object() local 106 if (IS_ERR(ipcp)) in msq_obtain_object() 107 return ERR_CAST(ipcp); in msq_obtain_object() 109 return container_of(ipcp, struct msg_queue, q_perm); in msq_obtain_object() 115 struct kern_ipc_perm *ipcp = ipc_obtain_object_check(&msg_ids(ns), id); in msq_obtain_object_check() local 117 if (IS_ERR(ipcp)) in msq_obtain_object_check() 118 return ERR_CAST(ipcp); in msq_obtain_object_check() 120 return container_of(ipcp, struct msg_queue, q_perm); in msq_obtain_object_check() 273 static void freeque(struct ipc_namespace *ns, struct kern_ipc_perm *ipcp) in freeque() argument 278 struct msg_queue *msq = container_of(ipcp, struct msg_queue, q_perm); in freeque() [all …]
|
H A D | sem.c | 480 struct kern_ipc_perm *ipcp = ipc_obtain_object_idr(&sem_ids(ns), id); in sem_obtain_object() local 482 if (IS_ERR(ipcp)) in sem_obtain_object() 483 return ERR_CAST(ipcp); in sem_obtain_object() 485 return container_of(ipcp, struct sem_array, sem_perm); in sem_obtain_object() 491 struct kern_ipc_perm *ipcp = ipc_obtain_object_check(&sem_ids(ns), id); in sem_obtain_object_check() local 493 if (IS_ERR(ipcp)) in sem_obtain_object_check() 494 return ERR_CAST(ipcp); in sem_obtain_object_check() 496 return container_of(ipcp, struct sem_array, sem_perm); in sem_obtain_object_check() 591 static int sem_more_checks(struct kern_ipc_perm *ipcp, struct ipc_params *params) in sem_more_checks() argument 595 sma = container_of(ipcp, struct sem_array, sem_perm); in sem_more_checks() [all …]
|
H A D | util.h | 141 int ipcperms(struct ipc_namespace *ns, struct kern_ipc_perm *ipcp, short flg); 203 static inline int ipc_checkid(struct kern_ipc_perm *ipcp, int id) in ipc_checkid() argument 205 return ipcid_to_seqx(id) != ipcp->seq; in ipc_checkid()
|
/linux/include/linux/ |
H A D | audit.h | 404 extern void __audit_ipc_obj(struct kern_ipc_perm *ipcp); 427 static inline void audit_ipc_obj(struct kern_ipc_perm *ipcp) in audit_ipc_obj() argument 430 __audit_ipc_obj(ipcp); in audit_ipc_obj() 631 static inline void audit_ipc_obj(struct kern_ipc_perm *ipcp) in audit_ipc_obj() argument
|
H A D | lsm_hook_defs.h | 258 LSM_HOOK(int, 0, ipc_permission, struct kern_ipc_perm *ipcp, short flag) 259 LSM_HOOK(void, LSM_RET_VOID, ipc_getsecid, struct kern_ipc_perm *ipcp,
|
/linux/kernel/ |
H A D | auditsc.c | 2627 void __audit_ipc_obj(struct kern_ipc_perm *ipcp) in __audit_ipc_obj() argument 2631 context->ipc.uid = ipcp->uid; in __audit_ipc_obj() 2632 context->ipc.gid = ipcp->gid; in __audit_ipc_obj() 2633 context->ipc.mode = ipcp->mode; in __audit_ipc_obj() 2635 security_ipc_getsecid(ipcp, &context->ipc.osid); in __audit_ipc_obj()
|
/linux/security/ |
H A D | security.c | 3729 int security_ipc_permission(struct kern_ipc_perm *ipcp, short flag) in security_ipc_permission() argument 3731 return call_int_hook(ipc_permission, ipcp, flag); in security_ipc_permission() 3742 void security_ipc_getsecid(struct kern_ipc_perm *ipcp, u32 *secid) in security_ipc_getsecid() argument 3745 call_void_hook(ipc_getsecid, ipcp, secid); in security_ipc_getsecid()
|
/linux/security/selinux/ |
H A D | hooks.c | 6306 static int selinux_ipc_permission(struct kern_ipc_perm *ipcp, short flag) in selinux_ipc_permission() argument 6319 return ipc_has_perm(ipcp, av); in selinux_ipc_permission() 6322 static void selinux_ipc_getsecid(struct kern_ipc_perm *ipcp, u32 *secid) in selinux_ipc_getsecid() argument 6324 struct ipc_security_struct *isec = selinux_ipc(ipcp); in selinux_ipc_getsecid()
|