Lines Matching defs:shm_perm

53     struct kern_ipc_perm shm_perm;

88 #define shm_unlock(shp) ipc_unlock(&(shp)->shm_perm)
116 shp = container_of(ipcp, struct shmid_kernel, shm_perm);
120 shp->shm_perm.mode |= SHM_DEST;
122 ipc_set_key_private(&shm_ids(ns), &shp->shm_perm);
167 return container_of(ipcp, struct shmid_kernel, shm_perm);
178 return container_of(ipcp, struct shmid_kernel, shm_perm);
204 return container_of(ipcp, struct shmid_kernel, shm_perm);
221 ipc_lock_object(&ipcp->shm_perm);
227 struct shmid_kernel *shp = container_of(ptr, struct shmid_kernel, shm_perm);
228 security_shm_free(&shp->shm_perm);
268 ipc_rmid(&shm_ids(s->ns), &s->shm_perm);
332 ipc_rcu_putref(&shp->shm_perm, shm_rcu_free);
349 (shp->shm_perm.mode & SHM_DEST));
393 struct shmid_kernel *shp = container_of(ipcp, struct shmid_kernel, shm_perm);
473 WARN_ON(!ipc_rcu_getref(&shp->shm_perm));
496 ipc_rcu_putref(&shp->shm_perm, shm_rcu_free);
498 if (ipc_valid_object(&shp->shm_perm)) {
720 shp->shm_perm.key = key;
721 shp->shm_perm.mode = (shmflg & S_IRWXUGO);
724 shp->shm_perm.security = NULL;
725 error = security_shm_alloc(&shp->shm_perm);
774 error = ipc_addid(&shm_ids(ns), &shp->shm_perm, ns->shm_ctlmni);
788 file_inode(file)->i_ino = shp->shm_perm.id;
791 error = shp->shm_perm.id;
793 ipc_unlock_object(&shp->shm_perm);
804 ipc_rcu_putref(&shp->shm_perm, shm_rcu_free);
807 call_rcu(&shp->shm_perm.rcu, shm_rcu_free);
818 shp = container_of(ipcp, struct shmid_kernel, shm_perm);
859 ipc64_perm_to_ipc_perm(&in->shm_perm, &out.shm_perm);
890 out->shm_perm.uid = tbuf_old.shm_perm.uid;
891 out->shm_perm.gid = tbuf_old.shm_perm.gid;
892 out->shm_perm.mode = tbuf_old.shm_perm.mode;
976 shp = container_of(ipc, struct shmid_kernel, shm_perm);
998 ipcp = ipcctl_obtain_check(ns, &shm_ids(ns), shmid, cmd, &shmid64->shm_perm, 0);
1004 shp = container_of(ipcp, struct shmid_kernel, shm_perm);
1006 err = security_shm_shmctl(&shp->shm_perm, cmd);
1013 ipc_lock_object(&shp->shm_perm);
1018 ipc_lock_object(&shp->shm_perm);
1019 err = ipc_update_perm(&shmid64->shm_perm, ipcp);
1031 ipc_unlock_object(&shp->shm_perm);
1108 audit_ipc_obj(&shp->shm_perm);
1111 if (ipcperms(ns, &shp->shm_perm, S_IRUGO)) {
1116 err = security_shm_shmctl(&shp->shm_perm, cmd);
1121 ipc_lock_object(&shp->shm_perm);
1123 if (!ipc_valid_object(&shp->shm_perm)) {
1124 ipc_unlock_object(&shp->shm_perm);
1129 kernel_to_ipc64_perm(&shp->shm_perm, &tbuf->shm_perm);
1154 err = shp->shm_perm.id;
1157 ipc_unlock_object(&shp->shm_perm);
1176 audit_ipc_obj(&(shp->shm_perm));
1177 err = security_shm_shmctl(&shp->shm_perm, cmd);
1182 ipc_lock_object(&shp->shm_perm);
1185 if (!ipc_valid_object(&shp->shm_perm)) {
1192 if (!uid_eq(euid, shp->shm_perm.uid) && !uid_eq(euid, shp->shm_perm.cuid)) {
1211 if (!err && !(shp->shm_perm.mode & SHM_LOCKED)) {
1212 shp->shm_perm.mode |= SHM_LOCKED;
1219 if (!(shp->shm_perm.mode & SHM_LOCKED)) {
1223 shp->shm_perm.mode &= ~SHM_LOCKED;
1226 ipc_unlock_object(&shp->shm_perm);
1234 ipc_unlock_object(&shp->shm_perm);
1324 struct compat_ipc_perm shm_perm;
1400 to_compat_ipc64_perm(&v.shm_perm, &in->shm_perm);
1415 to_compat_ipc_perm(&v.shm_perm, &in->shm_perm);
1416 v.shm_perm.key = in->shm_perm.key;
1433 return get_compat_ipc64_perm(&out->shm_perm, &p->shm_perm);
1436 return get_compat_ipc_perm(&out->shm_perm, &p->shm_perm);
1602 if (ipcperms(ns, &shp->shm_perm, acc_mode)) {
1606 err = security_shm_shmat(&shp->shm_perm, shmaddr, shmflg);
1611 ipc_lock_object(&shp->shm_perm);
1614 if (!ipc_valid_object(&shp->shm_perm)) {
1615 ipc_unlock_object(&shp->shm_perm);
1632 ipc_unlock_object(&shp->shm_perm);
1650 sfd->id = shp->shm_perm.id;
1869 shp = container_of(ipcp, struct shmid_kernel, shm_perm);
1881 shp->shm_perm.key, shp->shm_perm.id, shp->shm_perm.mode, shp->shm_segsz,
1883 from_kuid_munged(user_ns, shp->shm_perm.uid), from_kgid_munged(user_ns, shp->shm_perm.gid),
1884 from_kuid_munged(user_ns, shp->shm_perm.cuid), from_kgid_munged(user_ns, shp->shm_perm.cgid),