Lines Matching defs:shm_perm

56 	struct kern_ipc_perm	shm_perm;
100 ipc_unlock(&(shp)->shm_perm)
128 shp = container_of(ipcp, struct shmid_kernel, shm_perm);
132 shp->shm_perm.mode |= SHM_DEST;
134 ipc_set_key_private(&shm_ids(ns), &shp->shm_perm);
176 return container_of(ipcp, struct shmid_kernel, shm_perm);
186 return container_of(ipcp, struct shmid_kernel, shm_perm);
211 return container_of(ipcp, struct shmid_kernel, shm_perm);
228 ipc_lock_object(&ipcp->shm_perm);
236 shm_perm);
237 security_shm_free(&shp->shm_perm);
277 ipc_rmid(&shm_ids(s->ns), &s->shm_perm);
345 ipc_rcu_putref(&shp->shm_perm, shm_rcu_free);
362 (shp->shm_perm.mode & SHM_DEST));
415 struct shmid_kernel *shp = container_of(ipcp, struct shmid_kernel, shm_perm);
421 * shm_nattch can be changed under shm_perm.lock without holding the
498 WARN_ON(!ipc_rcu_getref(&shp->shm_perm));
521 ipc_rcu_putref(&shp->shm_perm, shm_rcu_free);
523 if (ipc_valid_object(&shp->shm_perm)) {
731 shp->shm_perm.key = key;
732 shp->shm_perm.mode = (shmflg & S_IRWXUGO);
735 shp->shm_perm.security = NULL;
736 error = security_shm_alloc(&shp->shm_perm);
782 error = ipc_addid(&shm_ids(ns), &shp->shm_perm, ns->shm_ctlmni);
796 file_inode(file)->i_ino = shp->shm_perm.id;
799 error = shp->shm_perm.id;
801 ipc_unlock_object(&shp->shm_perm);
809 ipc_rcu_putref(&shp->shm_perm, shm_rcu_free);
812 call_rcu(&shp->shm_perm.rcu, shm_rcu_free);
823 shp = container_of(ipcp, struct shmid_kernel, shm_perm);
864 ipc64_perm_to_ipc_perm(&in->shm_perm, &out.shm_perm);
895 out->shm_perm.uid = tbuf_old.shm_perm.uid;
896 out->shm_perm.gid = tbuf_old.shm_perm.gid;
897 out->shm_perm.mode = tbuf_old.shm_perm.mode;
982 shp = container_of(ipc, struct shmid_kernel, shm_perm);
1006 &shmid64->shm_perm, 0);
1012 shp = container_of(ipcp, struct shmid_kernel, shm_perm);
1014 err = security_shm_shmctl(&shp->shm_perm, cmd);
1020 ipc_lock_object(&shp->shm_perm);
1025 ipc_lock_object(&shp->shm_perm);
1026 err = ipc_update_perm(&shmid64->shm_perm, ipcp);
1037 ipc_unlock_object(&shp->shm_perm);
1115 audit_ipc_obj(&shp->shm_perm);
1118 if (ipcperms(ns, &shp->shm_perm, S_IRUGO))
1122 err = security_shm_shmctl(&shp->shm_perm, cmd);
1126 ipc_lock_object(&shp->shm_perm);
1128 if (!ipc_valid_object(&shp->shm_perm)) {
1129 ipc_unlock_object(&shp->shm_perm);
1134 kernel_to_ipc64_perm(&shp->shm_perm, &tbuf->shm_perm);
1159 err = shp->shm_perm.id;
1162 ipc_unlock_object(&shp->shm_perm);
1181 audit_ipc_obj(&(shp->shm_perm));
1182 err = security_shm_shmctl(&shp->shm_perm, cmd);
1186 ipc_lock_object(&shp->shm_perm);
1189 if (!ipc_valid_object(&shp->shm_perm)) {
1197 if (!uid_eq(euid, shp->shm_perm.uid) &&
1198 !uid_eq(euid, shp->shm_perm.cuid)) {
1216 if (!err && !(shp->shm_perm.mode & SHM_LOCKED)) {
1217 shp->shm_perm.mode |= SHM_LOCKED;
1224 if (!(shp->shm_perm.mode & SHM_LOCKED))
1227 shp->shm_perm.mode &= ~SHM_LOCKED;
1230 ipc_unlock_object(&shp->shm_perm);
1238 ipc_unlock_object(&shp->shm_perm);
1320 struct compat_ipc_perm shm_perm;
1398 to_compat_ipc64_perm(&v.shm_perm, &in->shm_perm);
1413 to_compat_ipc_perm(&v.shm_perm, &in->shm_perm);
1414 v.shm_perm.key = in->shm_perm.key;
1432 return get_compat_ipc64_perm(&out->shm_perm, &p->shm_perm);
1435 return get_compat_ipc_perm(&out->shm_perm, &p->shm_perm);
1591 if (ipcperms(ns, &shp->shm_perm, acc_mode))
1594 err = security_shm_shmat(&shp->shm_perm, shmaddr, shmflg);
1598 ipc_lock_object(&shp->shm_perm);
1601 if (!ipc_valid_object(&shp->shm_perm)) {
1602 ipc_unlock_object(&shp->shm_perm);
1619 ipc_unlock_object(&shp->shm_perm);
1640 sfd->id = shp->shm_perm.id;
1850 shp = container_of(ipcp, struct shmid_kernel, shm_perm);
1863 shp->shm_perm.key,
1864 shp->shm_perm.id,
1865 shp->shm_perm.mode,
1870 from_kuid_munged(user_ns, shp->shm_perm.uid),
1871 from_kgid_munged(user_ns, shp->shm_perm.gid),
1872 from_kuid_munged(user_ns, shp->shm_perm.cuid),
1873 from_kgid_munged(user_ns, shp->shm_perm.cgid),