Lines Matching refs:shm_perm

54 	struct kern_ipc_perm	shm_perm;
98 ipc_unlock(&(shp)->shm_perm)
126 shp = container_of(ipcp, struct shmid_kernel, shm_perm);
130 shp->shm_perm.mode |= SHM_DEST;
132 ipc_set_key_private(&shm_ids(ns), &shp->shm_perm);
173 return container_of(ipcp, struct shmid_kernel, shm_perm);
183 return container_of(ipcp, struct shmid_kernel, shm_perm);
208 return container_of(ipcp, struct shmid_kernel, shm_perm);
225 ipc_lock_object(&ipcp->shm_perm);
233 shm_perm);
234 security_shm_free(&shp->shm_perm);
274 ipc_rmid(&shm_ids(s->ns), &s->shm_perm);
339 ipc_rcu_putref(&shp->shm_perm, shm_rcu_free);
356 (shp->shm_perm.mode & SHM_DEST));
399 struct shmid_kernel *shp = container_of(ipcp, struct shmid_kernel, shm_perm);
477 WARN_ON(!ipc_rcu_getref(&shp->shm_perm));
500 ipc_rcu_putref(&shp->shm_perm, shm_rcu_free);
502 if (ipc_valid_object(&shp->shm_perm)) {
718 shp->shm_perm.key = key;
719 shp->shm_perm.mode = (shmflg & S_IRWXUGO);
722 shp->shm_perm.security = NULL;
723 error = security_shm_alloc(&shp->shm_perm);
771 error = ipc_addid(&shm_ids(ns), &shp->shm_perm, ns->shm_ctlmni);
785 file_inode(file)->i_ino = shp->shm_perm.id;
788 error = shp->shm_perm.id;
790 ipc_unlock_object(&shp->shm_perm);
800 ipc_rcu_putref(&shp->shm_perm, shm_rcu_free);
803 call_rcu(&shp->shm_perm.rcu, shm_rcu_free);
814 shp = container_of(ipcp, struct shmid_kernel, shm_perm);
855 ipc64_perm_to_ipc_perm(&in->shm_perm, &out.shm_perm);
886 out->shm_perm.uid = tbuf_old.shm_perm.uid;
887 out->shm_perm.gid = tbuf_old.shm_perm.gid;
888 out->shm_perm.mode = tbuf_old.shm_perm.mode;
973 shp = container_of(ipc, struct shmid_kernel, shm_perm);
997 &shmid64->shm_perm, 0);
1003 shp = container_of(ipcp, struct shmid_kernel, shm_perm);
1005 err = security_shm_shmctl(&shp->shm_perm, cmd);
1011 ipc_lock_object(&shp->shm_perm);
1016 ipc_lock_object(&shp->shm_perm);
1017 err = ipc_update_perm(&shmid64->shm_perm, ipcp);
1028 ipc_unlock_object(&shp->shm_perm);
1106 audit_ipc_obj(&shp->shm_perm);
1109 if (ipcperms(ns, &shp->shm_perm, S_IRUGO))
1113 err = security_shm_shmctl(&shp->shm_perm, cmd);
1117 ipc_lock_object(&shp->shm_perm);
1119 if (!ipc_valid_object(&shp->shm_perm)) {
1120 ipc_unlock_object(&shp->shm_perm);
1125 kernel_to_ipc64_perm(&shp->shm_perm, &tbuf->shm_perm);
1150 err = shp->shm_perm.id;
1153 ipc_unlock_object(&shp->shm_perm);
1172 audit_ipc_obj(&(shp->shm_perm));
1173 err = security_shm_shmctl(&shp->shm_perm, cmd);
1177 ipc_lock_object(&shp->shm_perm);
1180 if (!ipc_valid_object(&shp->shm_perm)) {
1188 if (!uid_eq(euid, shp->shm_perm.uid) &&
1189 !uid_eq(euid, shp->shm_perm.cuid)) {
1207 if (!err && !(shp->shm_perm.mode & SHM_LOCKED)) {
1208 shp->shm_perm.mode |= SHM_LOCKED;
1215 if (!(shp->shm_perm.mode & SHM_LOCKED))
1218 shp->shm_perm.mode &= ~SHM_LOCKED;
1221 ipc_unlock_object(&shp->shm_perm);
1229 ipc_unlock_object(&shp->shm_perm);
1311 struct compat_ipc_perm shm_perm;
1389 to_compat_ipc64_perm(&v.shm_perm, &in->shm_perm);
1404 to_compat_ipc_perm(&v.shm_perm, &in->shm_perm);
1405 v.shm_perm.key = in->shm_perm.key;
1423 return get_compat_ipc64_perm(&out->shm_perm, &p->shm_perm);
1426 return get_compat_ipc_perm(&out->shm_perm, &p->shm_perm);
1582 if (ipcperms(ns, &shp->shm_perm, acc_mode))
1585 err = security_shm_shmat(&shp->shm_perm, shmaddr, shmflg);
1589 ipc_lock_object(&shp->shm_perm);
1592 if (!ipc_valid_object(&shp->shm_perm)) {
1593 ipc_unlock_object(&shp->shm_perm);
1610 ipc_unlock_object(&shp->shm_perm);
1631 sfd->id = shp->shm_perm.id;
1842 shp = container_of(ipcp, struct shmid_kernel, shm_perm);
1855 shp->shm_perm.key,
1856 shp->shm_perm.id,
1857 shp->shm_perm.mode,
1862 from_kuid_munged(user_ns, shp->shm_perm.uid),
1863 from_kgid_munged(user_ns, shp->shm_perm.gid),
1864 from_kuid_munged(user_ns, shp->shm_perm.cuid),
1865 from_kgid_munged(user_ns, shp->shm_perm.cgid),