Home
last modified time | relevance | path

Searched refs:ns (Results 1 – 10 of 10) 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_ACCOUNT); 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->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
85 struct ipc_namespace *ns; member
95 #define shm_ids(ns) ((ns)->ids[IPC_SHM_IDS]) argument
103 static void shm_destroy(struct ipc_namespace *ns, struct shmid_kernel *shp);
108 void shm_init_ns(struct ipc_namespace *ns) in shm_init_ns() argument
110 ns->shm_ctlmax = SHMMAX; in shm_init_ns()
111 ns->shm_ctlall = SHMALL; in shm_init_ns()
112 ns->shm_ctlmni = SHMMNI; in shm_init_ns()
113 ns->shm_rmid_forced = 0; in shm_init_ns()
114 ns->shm_tot = 0; in shm_init_ns()
[all …]
Dipc_sysctl.c22 struct ipc_namespace *ns = in proc_ipc_dointvec_minmax_orphans() local
30 if (ns->shm_rmid_forced) in proc_ipc_dointvec_minmax_orphans()
31 shm_destroy_orphaned(ns); in proc_ipc_dointvec_minmax_orphans()
53 struct ipc_namespace *ns = in proc_ipc_sem_dointvec() local
57 semmni = ns->sem_ctls[3]; in proc_ipc_sem_dointvec()
61 ret = sem_check_semmni(ns); in proc_ipc_sem_dointvec()
67 ns->sem_ctls[3] = semmni; in proc_ipc_sem_dointvec()
198 struct ipc_namespace *ns = current->nsproxy->ipc_ns; in ipc_permissions() local
200 if (((table->data == &ns->ids[IPC_SEM_IDS].next_id) || in ipc_permissions()
201 (table->data == &ns->ids[IPC_MSG_IDS].next_id) || in ipc_permissions()
[all …]
Dmsg.c100 #define msg_ids(ns) ((ns)->ids[IPC_MSG_IDS]) argument
102 static inline struct msg_queue *msq_obtain_object(struct ipc_namespace *ns, int id) in msq_obtain_object() argument
104 struct kern_ipc_perm *ipcp = ipc_obtain_object_idr(&msg_ids(ns), id); in msq_obtain_object()
112 static inline struct msg_queue *msq_obtain_object_check(struct ipc_namespace *ns, in msq_obtain_object_check() argument
115 struct kern_ipc_perm *ipcp = ipc_obtain_object_check(&msg_ids(ns), id); in msq_obtain_object_check()
123 static inline void msg_rmid(struct ipc_namespace *ns, struct msg_queue *s) in msg_rmid() argument
125 ipc_rmid(&msg_ids(ns), &s->q_perm); in msg_rmid()
144 static int newque(struct ipc_namespace *ns, struct ipc_params *params) in newque() argument
168 msq->q_qbytes = ns->msg_ctlmnb; in newque()
175 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 int 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 …]
Dmq_sysctl.c83 bool setup_mq_sysctls(struct ipc_namespace *ns) in setup_mq_sysctls() argument
87 setup_sysctl_set(&ns->mq_set, &set_root, set_is_seen); in setup_mq_sysctls()
95 tbl[i].data = &ns->mq_queues_max; in setup_mq_sysctls()
98 tbl[i].data = &ns->mq_msg_max; in setup_mq_sysctls()
101 tbl[i].data = &ns->mq_msgsize_max; in setup_mq_sysctls()
104 tbl[i].data = &ns->mq_msg_default; in setup_mq_sysctls()
107 tbl[i].data = &ns->mq_msgsize_default; in setup_mq_sysctls()
112 ns->mq_sysctls = __register_sysctl_table(&ns->mq_set, "fs/mqueue", tbl); in setup_mq_sysctls()
114 if (!ns->mq_sysctls) { in setup_mq_sysctls()
116 retire_sysctl_set(&ns->mq_set); in setup_mq_sysctls()
[all …]
Dsem.c169 #define sem_ids(ns) ((ns)->ids[IPC_SEM_IDS]) argument
249 void sem_init_ns(struct ipc_namespace *ns) in sem_init_ns() argument
251 ns->sc_semmsl = SEMMSL; in sem_init_ns()
252 ns->sc_semmns = SEMMNS; in sem_init_ns()
253 ns->sc_semopm = SEMOPM; in sem_init_ns()
254 ns->sc_semmni = SEMMNI; in sem_init_ns()
255 ns->used_sems = 0; in sem_init_ns()
256 ipc_init_ids(&ns->ids[IPC_SEM_IDS]); in sem_init_ns()
260 void sem_exit_ns(struct ipc_namespace *ns) in sem_exit_ns() argument
262 free_ipcs(ns, &sem_ids(ns), freeary); in sem_exit_ns()
[all …]
Dutil.c339 static int ipcget_new(struct ipc_namespace *ns, struct ipc_ids *ids, in ipcget_new() argument
345 err = ops->getnew(ns, params); in ipcget_new()
365 static int ipc_check_perms(struct ipc_namespace *ns, in ipc_check_perms() argument
372 if (ipcperms(ns, ipcp, params->flg)) in ipc_check_perms()
397 static int ipcget_public(struct ipc_namespace *ns, struct ipc_ids *ids, in ipcget_public() argument
415 err = ops->getnew(ns, params); in ipcget_public()
430 err = ipc_check_perms(ns, ipcp, ops, params); in ipcget_public()
553 int ipcperms(struct ipc_namespace *ns, struct kern_ipc_perm *ipcp, short flag) in ipcperms() argument
568 !ns_capable(ns->user_ns, CAP_IPC_OWNER)) in ipcperms()
673 int ipcget(struct ipc_namespace *ns, struct ipc_ids *ids, in ipcget() argument
[all …]
Dmqueue.c182 struct ipc_namespace *ns; in get_ns_from_inode() local
185 ns = __get_ns_from_inode(inode); in get_ns_from_inode()
187 return ns; in get_ns_from_inode()
407 struct ipc_namespace *ns = sb->s_fs_info; in mqueue_fill_super() local
415 inode = mqueue_get_inode(sb, ns, S_IFDIR | S_ISVTX | S_IRWXUGO, NULL); in mqueue_fill_super()
468 static struct vfsmount *mq_create_mount(struct ipc_namespace *ns) in mq_create_mount() argument
481 ctx->ipc_ns = get_ipc_ns(ns); in mq_create_mount()
1689 int mq_init_ns(struct ipc_namespace *ns) in mq_init_ns() argument
1693 ns->mq_queues_count = 0; in mq_init_ns()
1694 ns->mq_queues_max = DFLT_QUEUESMAX; in mq_init_ns()
[all …]
Dmsgutil.c29 .ns.count = REFCOUNT_INIT(1),
31 .ns.inum = PROC_IPC_INIT_INO,
33 .ns.ops = &ipcns_operations,