Searched refs:nsproxy (Results 1 - 78 of 78) sorted by relevance

/linux-4.1.27/include/linux/
H A Dnsproxy.h25 * The nsproxy is shared by tasks which share all namespaces.
27 * nsproxy is copied.
29 struct nsproxy { struct
37 extern struct nsproxy init_nsproxy;
42 * 1. only current task is allowed to change tsk->nsproxy pointer or
43 * any pointer on the nsproxy itself. Current must hold the task_lock
44 * when changing tsk->nsproxy.
51 * nsproxy = task->nsproxy;
52 * if (nsproxy != NULL) {
58 * * NULL task->nsproxy means that this task is
67 void switch_task_namespaces(struct task_struct *tsk, struct nsproxy *new);
68 void free_nsproxy(struct nsproxy *ns);
69 int unshare_nsproxy_namespaces(unsigned long, struct nsproxy **,
73 static inline void put_nsproxy(struct nsproxy *ns) put_nsproxy()
80 static inline void get_nsproxy(struct nsproxy *ns) get_nsproxy()
H A Dproc_ns.h10 struct nsproxy;
18 int (*install)(struct nsproxy *nsproxy, struct ns_common *ns);
H A Dutsname.h7 #include <linux/nsproxy.h>
74 return &current->nsproxy->uts_ns->name; utsname()
H A Dpid_namespace.h9 #include <linux/nsproxy.h>
H A Dinit_task.h62 extern struct nsproxy init_nsproxy;
231 .nsproxy = &init_nsproxy, \
H A Duser_namespace.h5 #include <linux/nsproxy.h>
H A Dsysctl.h32 struct nsproxy;
158 struct nsproxy *namespaces);
H A Dipc_namespace.h8 #include <linux/nsproxy.h>
H A Dsched.h430 struct nsproxy;
1482 struct nsproxy *nsproxy; member in struct:task_struct
/linux-4.1.27/kernel/
H A Dnsproxy.c18 #include <linux/nsproxy.h>
31 struct nsproxy init_nsproxy = {
44 static inline struct nsproxy *create_nsproxy(void) create_nsproxy()
46 struct nsproxy *nsproxy; create_nsproxy() local
48 nsproxy = kmem_cache_alloc(nsproxy_cachep, GFP_KERNEL); create_nsproxy()
49 if (nsproxy) create_nsproxy()
50 atomic_set(&nsproxy->count, 1); create_nsproxy()
51 return nsproxy; create_nsproxy()
55 * Create new nsproxy and all of its the associated namespaces.
56 * Return the newly created nsproxy. Do not attach this to the task,
59 static struct nsproxy *create_new_namespaces(unsigned long flags, create_new_namespaces()
63 struct nsproxy *new_nsp; create_new_namespaces()
70 new_nsp->mnt_ns = copy_mnt_ns(flags, tsk->nsproxy->mnt_ns, user_ns, new_fs); create_new_namespaces()
76 new_nsp->uts_ns = copy_utsname(flags, user_ns, tsk->nsproxy->uts_ns); create_new_namespaces()
82 new_nsp->ipc_ns = copy_ipcs(flags, user_ns, tsk->nsproxy->ipc_ns); create_new_namespaces()
89 copy_pid_ns(flags, user_ns, tsk->nsproxy->pid_ns_for_children); create_new_namespaces()
95 new_nsp->net_ns = copy_net_ns(flags, user_ns, tsk->nsproxy->net_ns); create_new_namespaces()
121 * called from clone. This now handles copy for nsproxy and all
126 struct nsproxy *old_ns = tsk->nsproxy; copy_namespaces()
128 struct nsproxy *new_ns; copy_namespaces()
154 tsk->nsproxy = new_ns; copy_namespaces()
158 void free_nsproxy(struct nsproxy *ns) free_nsproxy()
173 * Called from unshare. Unshare all the namespaces part of nsproxy.
174 * On success, returns the new nsproxy.
177 struct nsproxy **new_nsp, struct cred *new_cred, struct fs_struct *new_fs) unshare_nsproxy_namespaces()
201 void switch_task_namespaces(struct task_struct *p, struct nsproxy *new) switch_task_namespaces()
203 struct nsproxy *ns; switch_task_namespaces()
208 ns = p->nsproxy; switch_task_namespaces()
209 p->nsproxy = new; switch_task_namespaces()
224 struct nsproxy *new_nsproxy; SYSCALL_DEFINE2()
257 nsproxy_cachep = KMEM_CACHE(nsproxy, SLAB_PANIC); nsproxy_cache_init()
H A Dutsname.c101 struct nsproxy *nsproxy; utsns_get() local
104 nsproxy = task->nsproxy; utsns_get()
105 if (nsproxy) { utsns_get()
106 ns = nsproxy->uts_ns; utsns_get()
119 static int utsns_install(struct nsproxy *nsproxy, struct ns_common *new) utsns_install() argument
128 put_uts_ns(nsproxy->uts_ns); utsns_install()
129 nsproxy->uts_ns = ns; utsns_install()
H A Dpid_namespace.c360 static int pidns_install(struct nsproxy *nsproxy, struct ns_common *ns) pidns_install() argument
386 put_pid_ns(nsproxy->pid_ns_for_children); pidns_install()
387 nsproxy->pid_ns_for_children = get_pid_ns(new); pidns_install()
H A Dutsname_sysctl.c25 uts_ns = current->nsproxy->uts_ns; get_uts()
H A Dfutex_compat.c11 #include <linux/nsproxy.h>
H A DMakefile10 kthread.o sys_ni.o nsproxy.o \
H A Dfork.c33 #include <linux/nsproxy.h>
1288 current->nsproxy->pid_ns_for_children)) copy_process()
1455 pid = alloc_pid(p->nsproxy->pid_ns_for_children); copy_process()
1930 struct nsproxy *new_nsproxy = NULL; SYSCALL_DEFINE1()
H A Duser_namespace.c9 #include <linux/nsproxy.h>
968 static int userns_install(struct nsproxy *nsproxy, struct ns_common *ns) userns_install() argument
H A Dsysctl_binary.c10 #include <linux/nsproxy.h>
1250 struct net *net = current->nsproxy->net_ns; get_sysctl()
H A Dsys.c1220 if (!ns_capable(current->nsproxy->uts_ns->user_ns, CAP_SYS_ADMIN)) SYSCALL_DEFINE2()
1271 if (!ns_capable(current->nsproxy->uts_ns->user_ns, CAP_SYS_ADMIN)) SYSCALL_DEFINE2()
H A Dexit.c25 #include <linux/nsproxy.h>
H A Dfutex.c61 #include <linux/nsproxy.h>
H A Dsignal.c31 #include <linux/nsproxy.h>
/linux-4.1.27/ipc/
H A Dnamespace.c10 #include <linux/nsproxy.h>
139 struct nsproxy *nsproxy; ipcns_get() local
142 nsproxy = task->nsproxy; ipcns_get()
143 if (nsproxy) ipcns_get()
144 ns = get_ipc_ns(nsproxy->ipc_ns); ipcns_get()
155 static int ipcns_install(struct nsproxy *nsproxy, struct ns_common *new) ipcns_install() argument
164 put_ipc_ns(nsproxy->ipc_ns); ipcns_install()
165 nsproxy->ipc_ns = get_ipc_ns(ns); ipcns_install()
H A Dmq_sysctl.c12 #include <linux/nsproxy.h>
20 struct ipc_namespace *ipc_ns = current->nsproxy->ipc_ns; get_mq()
H A Dipc_sysctl.c14 #include <linux/nsproxy.h>
24 struct ipc_namespace *ipc_ns = current->nsproxy->ipc_ns; get_ipc()
55 struct ipc_namespace *ns = current->nsproxy->ipc_ns; proc_ipc_dointvec_minmax_orphans()
H A Dmsg.c38 #include <linux/nsproxy.h>
250 ns = current->nsproxy->ipc_ns; SYSCALL_DEFINE2()
531 ns = current->nsproxy->ipc_ns; SYSCALL_DEFINE3()
615 ns = current->nsproxy->ipc_ns; do_msgsnd()
831 ns = current->nsproxy->ipc_ns; do_msgrcv()
H A Dshm.c42 #include <linux/nsproxy.h>
332 struct ipc_namespace *ns = task->nsproxy->ipc_ns; exit_shm()
662 ns = current->nsproxy->ipc_ns; SYSCALL_DEFINE3()
991 ns = current->nsproxy->ipc_ns; SYSCALL_DEFINE3()
1142 ns = current->nsproxy->ipc_ns; do_shmat()
H A Dmqueue.c33 #include <linux/nsproxy.h>
331 struct ipc_namespace *ns = current->nsproxy->ipc_ns; mqueue_mount()
783 struct ipc_namespace *ipc_ns = current->nsproxy->ipc_ns; SYSCALL_DEFINE4()
862 struct ipc_namespace *ipc_ns = current->nsproxy->ipc_ns; SYSCALL_DEFINE1()
H A Dsem.c86 #include <linux/nsproxy.h>
592 ns = current->nsproxy->ipc_ns; SYSCALL_DEFINE3()
1597 ns = current->nsproxy->ipc_ns; SYSCALL_DEFINE4()
1806 ns = current->nsproxy->ipc_ns; SYSCALL_DEFINE4()
2108 sma = sem_obtain_object_check(tsk->nsproxy->ipc_ns, semid); exit_sem()
H A Dutil.c58 #include <linux/nsproxy.h>
864 iter->ns = get_ipc_ns(current->nsproxy->ipc_ns); sysvipc_proc_open()
/linux-4.1.27/fs/lockd/
H A Dprocfs.c10 #include <linux/nsproxy.h>
24 struct lockd_net *ln = net_generic(current->nsproxy->net_ns, nlm_end_grace_write()
51 struct lockd_net *ln = net_generic(current->nsproxy->net_ns, nlm_end_grace_read()
/linux-4.1.27/net/
H A Dsysctl_net.c17 #include <linux/nsproxy.h>
30 net_ctl_header_lookup(struct ctl_table_root *root, struct nsproxy *namespaces) net_ctl_header_lookup()
37 return &current->nsproxy->net_ns->sysctls == set; is_seen()
H A Dsocket.c88 #include <linux/nsproxy.h>
1212 return __sock_create(current->nsproxy->net_ns, family, type, protocol, res, 0); sock_create()
/linux-4.1.27/net/core/
H A Dnet_namespace.c12 #include <linux/nsproxy.h>
459 struct nsproxy *nsproxy; get_net_ns_by_pid() local
461 nsproxy = tsk->nsproxy; get_net_ns_by_pid()
462 if (nsproxy) get_net_ns_by_pid()
463 net = get_net(nsproxy->net_ns); get_net_ns_by_pid()
924 struct nsproxy *nsproxy; netns_get() local
927 nsproxy = task->nsproxy; netns_get()
928 if (nsproxy) netns_get()
929 net = get_net(nsproxy->net_ns); netns_get()
945 static int netns_install(struct nsproxy *nsproxy, struct ns_common *ns) netns_install() argument
953 put_net(nsproxy->net_ns); netns_install()
954 nsproxy->net_ns = get_net(net); netns_install()
H A Dscm.c29 #include <linux/nsproxy.h>
H A Dnet-sysfs.c18 #include <linux/nsproxy.h>
1368 struct net *net = current->nsproxy->net_ns; net_current_may_mount()
1375 struct net *ns = current->nsproxy->net_ns; net_grab_current_ns()
H A Dnetpoll.c657 struct net *net = current->nsproxy->net_ns; netpoll_setup()
H A Dpktgen.c484 struct pktgen_net *pn = net_generic(current->nsproxy->net_ns, pg_net_id); pgctrl_write()
/linux-4.1.27/fs/proc/
H A Dproc_net.c23 #include <linux/nsproxy.h>
110 struct nsproxy *ns; get_proc_task_net()
117 ns = task->nsproxy; get_proc_task_net()
H A Dnamespaces.c2 #include <linux/nsproxy.h>
H A Dproc_sysctl.c75 struct ctl_table **pentry, struct nsproxy *namespaces);
322 lookup_header_set(struct ctl_table_root *root, struct nsproxy *namespaces) lookup_header_set()
494 ret = sysctl_follow_link(&h, &p, current->nsproxy); proc_sys_lookup()
661 int err = sysctl_follow_link(&head, &table, current->nsproxy); proc_sys_link_fill_cache()
978 struct ctl_table **pentry, struct nsproxy *namespaces) sysctl_follow_link()
H A Dbase.c81 #include <linux/nsproxy.h>
/linux-4.1.27/fs/nfsd/
H A Dfault_inject.c11 #include <linux/nsproxy.h>
48 struct net *net = current->nsproxy->net_ns; fault_inject_write()
H A Dnfs4state.c5987 struct nfsd_net *nn = net_generic(current->nsproxy->net_ns, nfsd_find_client()
6005 struct nfsd_net *nn = net_generic(current->nsproxy->net_ns, nfsd_inject_print_clients()
6028 struct nfsd_net *nn = net_generic(current->nsproxy->net_ns, nfsd_inject_forget_client()
6055 struct nfsd_net *nn = net_generic(current->nsproxy->net_ns, nfsd_inject_forget_clients()
6091 struct nfsd_net *nn = net_generic(current->nsproxy->net_ns, nfsd_inject_add_lock_to_list()
6162 struct nfsd_net *nn = net_generic(current->nsproxy->net_ns, nfsd_inject_print_locks()
6195 struct nfsd_net *nn = net_generic(current->nsproxy->net_ns, nfsd_inject_forget_client_locks()
6216 struct nfsd_net *nn = net_generic(current->nsproxy->net_ns, nfsd_inject_forget_locks()
6240 struct nfsd_net *nn = net_generic(current->nsproxy->net_ns, nfsd_foreach_client_openowner()
6293 struct nfsd_net *nn = net_generic(current->nsproxy->net_ns, nfsd_inject_print_openowners()
6327 struct nfsd_net *nn = net_generic(current->nsproxy->net_ns, nfsd_inject_forget_client_openowners()
6348 struct nfsd_net *nn = net_generic(current->nsproxy->net_ns, nfsd_inject_forget_openowners()
6371 struct nfsd_net *nn = net_generic(current->nsproxy->net_ns, nfsd_find_all_delegations()
6422 struct nfsd_net *nn = net_generic(current->nsproxy->net_ns, nfsd_inject_print_delegations()
6456 struct nfsd_net *nn = net_generic(current->nsproxy->net_ns, nfsd_inject_forget_client_delegations()
6478 struct nfsd_net *nn = net_generic(current->nsproxy->net_ns, nfsd_inject_forget_delegations()
6525 struct nfsd_net *nn = net_generic(current->nsproxy->net_ns, nfsd_inject_recall_client_delegations()
6547 struct nfsd_net *nn = net_generic(current->nsproxy->net_ns, nfsd_inject_recall_delegations()
H A Dnfsctl.c153 return exports_net_open(current->nsproxy->net_ns, file); exports_proc_open()
1170 return mount_ns(fs_type, flags, current->nsproxy->net_ns, nfsd_fill_super); nfsd_mount()
/linux-4.1.27/net/sctp/
H A Dsysctl.c319 struct net *net = current->nsproxy->net_ns; proc_sctp_do_hmac_alg()
365 struct net *net = current->nsproxy->net_ns; proc_sctp_do_rto_min()
394 struct net *net = current->nsproxy->net_ns; proc_sctp_do_rto_max()
434 struct net *net = current->nsproxy->net_ns; proc_sctp_do_auth()
/linux-4.1.27/fs/
H A Dproc_namespace.c10 #include <linux/nsproxy.h>
237 struct nsproxy *nsp; mounts_open_common()
247 nsp = task->nsproxy; mounts_open_common()
H A Dnamespace.c700 struct mnt_namespace *ns = current->nsproxy->mnt_ns; __is_local_mountpoint()
773 return mnt->mnt_ns == current->nsproxy->mnt_ns; check_mnt()
1573 return ns_capable(current->nsproxy->mnt_ns->user_ns, CAP_SYS_ADMIN); may_mount()
1658 return current->nsproxy->mnt_ns->seq >= mnt_ns->seq; mnt_ns_loop()
2369 struct user_namespace *user_ns = current->nsproxy->mnt_ns->user_ns; do_new_mount()
3043 touch_mnt_namespace(current->nsproxy->mnt_ns); SYSCALL_DEFINE2()
3085 init_task.nsproxy->mnt_ns = ns; init_mount_tree()
3183 ns_root.mnt = &current->nsproxy->mnt_ns->root->mnt; current_chrooted()
3201 struct mnt_namespace *ns = current->nsproxy->mnt_ns; fs_fully_visible()
3263 struct nsproxy *nsproxy; mntns_get() local
3266 nsproxy = task->nsproxy; mntns_get()
3267 if (nsproxy) { mntns_get()
3268 ns = &nsproxy->mnt_ns->ns; mntns_get()
3281 static int mntns_install(struct nsproxy *nsproxy, struct ns_common *ns) mntns_install() argument
3296 put_mnt_ns(nsproxy->mnt_ns); mntns_install()
3297 nsproxy->mnt_ns = mnt_ns; mntns_install()
H A Dpnode.c12 #include <linux/nsproxy.h>
289 user_ns = current->nsproxy->mnt_ns->user_ns; propagate_mnt()
/linux-4.1.27/include/net/
H A Dscm.h8 #include <linux/nsproxy.h>
H A Dnet_namespace.h149 #include <linux/nsproxy.h> copy_net_ns()
/linux-4.1.27/net/ipv4/
H A Dtcp_memcontrol.c5 #include <linux/nsproxy.h>
H A Dsysctl_net_ipv4.c16 #include <linux/nsproxy.h>
/linux-4.1.27/fs/afs/
H A Dsuper.c27 #include <linux/nsproxy.h>
370 if (current->nsproxy->net_ns != &init_net) afs_mount()
/linux-4.1.27/net/ceph/
H A Dceph_common.c19 #include <linux/nsproxy.h>
338 if (current->nsproxy->net_ns != &init_net) ceph_parse_options()
/linux-4.1.27/security/apparmor/
H A Dpath.c18 #include <linux/nsproxy.h>
/linux-4.1.27/net/netfilter/
H A Dnf_log.c404 struct net *net = current->nsproxy->net_ns; nf_log_proc_dostring()
H A Dnf_conntrack_core.c34 #include <linux/nsproxy.h>
1546 if (current->nsproxy->net_ns != &init_net) nf_conntrack_set_hashsize()
/linux-4.1.27/drivers/net/
H A Dtun.c65 #include <linux/nsproxy.h>
1900 tun_get_iff(current->nsproxy->net_ns, tun, &ifr); __tun_chr_ioctl()
2166 tfile->net = get_net(current->nsproxy->net_ns); tun_chr_open()
2213 tun_get_iff(current->nsproxy->net_ns, tun, &ifr); tun_chr_show_fdinfo()
H A Dmacvtap.c5 #include <linux/nsproxy.h>
467 struct net *net = current->nsproxy->net_ns; macvtap_open()
/linux-4.1.27/fs/ecryptfs/
H A Dmessaging.c25 #include <linux/nsproxy.h>
H A Decryptfs_kernel.h38 #include <linux/nsproxy.h>
/linux-4.1.27/net/9p/
H A Dtrans_fd.c944 err = __sock_create(current->nsproxy->net_ns, PF_INET, p9_fd_create_tcp()
992 err = __sock_create(current->nsproxy->net_ns, PF_UNIX, p9_fd_create_unix()
/linux-4.1.27/net/sunrpc/
H A Drpc_pipe.c31 #include <linux/nsproxy.h>
1451 return mount_ns(fs_type, flags, current->nsproxy->net_ns, rpc_fill_super); rpc_mount()
/linux-4.1.27/fs/nfs/
H A Dsuper.c55 #include <linux/nsproxy.h>
931 data->net = current->nsproxy->net_ns; nfs_alloc_parsed_mount_data()
2252 data->net = current->nsproxy->net_ns; nfs_remount()
H A Dclient.c42 #include <linux/nsproxy.h>
/linux-4.1.27/drivers/net/bonding/
H A Dbond_sysfs.c41 #include <linux/nsproxy.h>
/linux-4.1.27/drivers/net/ppp/
H A Dppp_generic.c53 #include <linux/nsproxy.h>
577 return ppp_unattached_ioctl(current->nsproxy->net_ns, ppp_ioctl()
2230 return ppp_register_net_channel(current->nsproxy->net_ns, chan); ppp_register_channel()
H A Dpppoe.c81 #include <linux/nsproxy.h>
/linux-4.1.27/net/netfilter/ipvs/
H A Dip_vs_ctl.c41 #include <linux/nsproxy.h>
1618 struct net *net = current->nsproxy->net_ns; proc_do_defense_mode()
/linux-4.1.27/net/l2tp/
H A Dl2tp_ppp.c93 #include <linux/nsproxy.h>
H A Dl2tp_core.c49 #include <linux/nsproxy.h>
/linux-4.1.27/mm/
H A Dmigrate.c22 #include <linux/nsproxy.h>
H A Dmempolicy.c81 #include <linux/nsproxy.h>
/linux-4.1.27/fs/cifs/
H A Dconnect.c2035 if (!net_eq(cifs_net_ns(server), current->nsproxy->net_ns)) match_server()
2125 cifs_set_net_ns(tcp_ses, get_net(current->nsproxy->net_ns)); cifs_get_tcp_session()
/linux-4.1.27/drivers/android/
H A Dbinder.c30 #include <linux/nsproxy.h>
/linux-4.1.27/net/ipv6/
H A Droute.c45 #include <linux/nsproxy.h>
/linux-4.1.27/drivers/tty/
H A Dtty_io.c106 #include <linux/nsproxy.h>

Completed in 2495 milliseconds