Home
last modified time | relevance | path

Searched refs:ns (Results 1 – 9 of 9) sorted by relevance

/ipc/
Dnamespace.c22 static struct ucounts *inc_ipc_namespaces(struct user_namespace *ns) in inc_ipc_namespaces() argument
24 return inc_ucount(ns, current_euid(), UCOUNT_IPC_NAMESPACES); in inc_ipc_namespaces()
35 struct ipc_namespace *ns; in create_ipc_ns() local
45 ns = kzalloc(sizeof(struct ipc_namespace), GFP_KERNEL); in create_ipc_ns()
46 if (ns == NULL) in create_ipc_ns()
49 err = ns_alloc_inum(&ns->ns); in create_ipc_ns()
52 ns->ns.ops = &ipcns_operations; in create_ipc_ns()
54 refcount_set(&ns->count, 1); in create_ipc_ns()
55 ns->user_ns = get_user_ns(user_ns); in create_ipc_ns()
56 ns->ucounts = ucounts; in create_ipc_ns()
[all …]
Dshm.c76 struct ipc_namespace *ns; member
86 #define shm_ids(ns) ((ns)->ids[IPC_SHM_IDS]) argument
94 static void shm_destroy(struct ipc_namespace *ns, struct shmid_kernel *shp);
99 void shm_init_ns(struct ipc_namespace *ns) in shm_init_ns() argument
101 ns->shm_ctlmax = SHMMAX; in shm_init_ns()
102 ns->shm_ctlall = SHMALL; in shm_init_ns()
103 ns->shm_ctlmni = SHMMNI; in shm_init_ns()
104 ns->shm_rmid_forced = 0; in shm_init_ns()
105 ns->shm_tot = 0; in shm_init_ns()
106 ipc_init_ids(&shm_ids(ns)); in shm_init_ns()
[all …]
Dmsg.c89 #define msg_ids(ns) ((ns)->ids[IPC_MSG_IDS]) argument
91 static inline struct msg_queue *msq_obtain_object(struct ipc_namespace *ns, int id) in msq_obtain_object() argument
93 struct kern_ipc_perm *ipcp = ipc_obtain_object_idr(&msg_ids(ns), id); in msq_obtain_object()
101 static inline struct msg_queue *msq_obtain_object_check(struct ipc_namespace *ns, in msq_obtain_object_check() argument
104 struct kern_ipc_perm *ipcp = ipc_obtain_object_check(&msg_ids(ns), id); in msq_obtain_object_check()
112 static inline void msg_rmid(struct ipc_namespace *ns, struct msg_queue *s) in msg_rmid() argument
114 ipc_rmid(&msg_ids(ns), &s->q_perm); in msg_rmid()
133 static int newque(struct ipc_namespace *ns, struct ipc_params *params) in newque() argument
157 msq->q_qbytes = ns->msg_ctlmnb; in newque()
164 retval = ipc_addid(&msg_ids(ns), &msq->q_perm, ns->msg_ctlmni); in newque()
[all …]
Dutil.h58 extern void mq_clear_sbinfo(struct ipc_namespace *ns);
59 extern void mq_put_mnt(struct ipc_namespace *ns);
61 static inline void mq_clear_sbinfo(struct ipc_namespace *ns) { } in mq_clear_sbinfo() argument
62 static inline void mq_put_mnt(struct ipc_namespace *ns) { } in mq_put_mnt() argument
66 void sem_init_ns(struct ipc_namespace *ns);
67 void msg_init_ns(struct ipc_namespace *ns);
68 void shm_init_ns(struct ipc_namespace *ns);
70 void sem_exit_ns(struct ipc_namespace *ns);
71 void msg_exit_ns(struct ipc_namespace *ns);
72 void shm_exit_ns(struct ipc_namespace *ns);
[all …]
Dsem.c169 #define sem_ids(ns) ((ns)->ids[IPC_SEM_IDS]) argument
224 void sem_init_ns(struct ipc_namespace *ns) in sem_init_ns() argument
226 ns->sc_semmsl = SEMMSL; in sem_init_ns()
227 ns->sc_semmns = SEMMNS; in sem_init_ns()
228 ns->sc_semopm = SEMOPM; in sem_init_ns()
229 ns->sc_semmni = SEMMNI; in sem_init_ns()
230 ns->used_sems = 0; in sem_init_ns()
231 ipc_init_ids(&ns->ids[IPC_SEM_IDS]); in sem_init_ns()
235 void sem_exit_ns(struct ipc_namespace *ns) in sem_exit_ns() argument
237 free_ipcs(ns, &sem_ids(ns), freeary); in sem_exit_ns()
[all …]
Dutil.c338 static int ipcget_new(struct ipc_namespace *ns, struct ipc_ids *ids, in ipcget_new() argument
344 err = ops->getnew(ns, params); in ipcget_new()
364 static int ipc_check_perms(struct ipc_namespace *ns, in ipc_check_perms() argument
371 if (ipcperms(ns, ipcp, params->flg)) in ipc_check_perms()
396 static int ipcget_public(struct ipc_namespace *ns, struct ipc_ids *ids, in ipcget_public() argument
414 err = ops->getnew(ns, params); in ipcget_public()
429 err = ipc_check_perms(ns, ipcp, ops, params); in ipcget_public()
519 int ipcperms(struct ipc_namespace *ns, struct kern_ipc_perm *ipcp, short flag) in ipcperms() argument
534 !ns_capable(ns->user_ns, CAP_IPC_OWNER)) in ipcperms()
639 int ipcget(struct ipc_namespace *ns, struct ipc_ids *ids, in ipcget() argument
[all …]
Dipc_sysctl.c51 struct ipc_namespace *ns = current->nsproxy->ipc_ns; in proc_ipc_dointvec_minmax_orphans() local
56 if (ns->shm_rmid_forced) in proc_ipc_dointvec_minmax_orphans()
57 shm_destroy_orphaned(ns); in proc_ipc_dointvec_minmax_orphans()
91 struct ipc_namespace *ns = current->nsproxy->ipc_ns; in proc_ipc_sem_dointvec() local
93 semmni = ns->sem_ctls[3]; in proc_ipc_sem_dointvec()
103 ns->sem_ctls[3] = semmni; in proc_ipc_sem_dointvec()
Dmqueue.c122 struct ipc_namespace *ns; in get_ns_from_inode() local
125 ns = __get_ns_from_inode(inode); in get_ns_from_inode()
127 return ns; in get_ns_from_inode()
345 struct ipc_namespace *ns = sb->s_fs_info; in mqueue_fill_super() local
353 inode = mqueue_get_inode(sb, ns, S_IFDIR | S_ISVTX | S_IRWXUGO, NULL); in mqueue_fill_super()
394 static struct vfsmount *mq_create_mount(struct ipc_namespace *ns) in mq_create_mount() argument
406 ctx->ipc_ns = get_ipc_ns(ns); in mq_create_mount()
1587 int mq_init_ns(struct ipc_namespace *ns) in mq_init_ns() argument
1591 ns->mq_queues_count = 0; in mq_init_ns()
1592 ns->mq_queues_max = DFLT_QUEUESMAX; in mq_init_ns()
[all …]
Dmsgutil.c31 .ns.inum = PROC_IPC_INIT_INO,
33 .ns.ops = &ipcns_operations,