/kernel/ |
D | utsname.c | 38 struct uts_namespace *ns; in clone_uts_ns() local 41 ns = create_uts_ns(); in clone_uts_ns() 42 if (!ns) in clone_uts_ns() 45 err = proc_alloc_inum(&ns->proc_inum); in clone_uts_ns() 47 kfree(ns); in clone_uts_ns() 52 memcpy(&ns->name, &old_ns->name, sizeof(ns->name)); in clone_uts_ns() 53 ns->user_ns = get_user_ns(user_ns); in clone_uts_ns() 55 return ns; in clone_uts_ns() 83 struct uts_namespace *ns; in free_uts_ns() local 85 ns = container_of(kref, struct uts_namespace, kref); in free_uts_ns() [all …]
|
D | pid_namespace.c | 75 struct pid_namespace *ns = container_of(work, struct pid_namespace, proc_work); in proc_cleanup_work() local 76 pid_ns_release_proc(ns); in proc_cleanup_work() 85 struct pid_namespace *ns; in create_pid_namespace() local 96 ns = kmem_cache_zalloc(pid_ns_cachep, GFP_KERNEL); in create_pid_namespace() 97 if (ns == NULL) in create_pid_namespace() 100 ns->pidmap[0].page = kzalloc(PAGE_SIZE, GFP_KERNEL); in create_pid_namespace() 101 if (!ns->pidmap[0].page) in create_pid_namespace() 104 ns->pid_cachep = create_pid_cachep(level + 1); in create_pid_namespace() 105 if (ns->pid_cachep == NULL) in create_pid_namespace() 108 err = proc_alloc_inum(&ns->proc_inum); in create_pid_namespace() [all …]
|
D | user_namespace.c | 29 struct user_namespace *ns, int cap_setid, 61 struct user_namespace *ns, *parent_ns = new->user_ns; in create_user_ns() local 83 ns = kmem_cache_zalloc(user_ns_cachep, GFP_KERNEL); in create_user_ns() 84 if (!ns) in create_user_ns() 87 ret = proc_alloc_inum(&ns->proc_inum); in create_user_ns() 89 kmem_cache_free(user_ns_cachep, ns); in create_user_ns() 93 atomic_set(&ns->count, 1); in create_user_ns() 95 ns->parent = parent_ns; in create_user_ns() 96 ns->owner = owner; in create_user_ns() 97 ns->group = group; in create_user_ns() [all …]
|
D | pid.c | 42 #define pid_hashfn(nr, ns) \ argument 43 hash_long((unsigned long)nr + (unsigned long)ns, pidhash_shift) 104 struct pidmap *map = upid->ns->pidmap + nr / BITS_PER_PAGE; in free_pidmap() 235 struct pid_namespace *ns; in put_pid() local 240 ns = pid->numbers[pid->level].ns; in put_pid() 243 kmem_cache_free(ns->pid_cachep, pid); in put_pid() 244 put_pid_ns(ns); in put_pid() 264 struct pid_namespace *ns = upid->ns; in free_pid() local 266 switch(--ns->nr_hashed) { in free_pid() 272 wake_up_process(ns->child_reaper); in free_pid() [all …]
|
D | acct.c | 79 struct pid_namespace *ns, struct file *); 90 struct pid_namespace *ns; member 167 struct pid_namespace *ns) in acct_file_reopen() argument 174 old_ns = acct->ns; in acct_file_reopen() 177 acct->ns = NULL; in acct_file_reopen() 182 acct->ns = ns; in acct_file_reopen() 200 struct pid_namespace *ns; in acct_on() local 218 ns = task_active_pid_ns(current); in acct_on() 219 if (ns->bacct == NULL) { in acct_on() 228 if (ns->bacct == NULL) { in acct_on() [all …]
|
D | nsproxy.c | 169 void free_nsproxy(struct nsproxy *ns) in free_nsproxy() argument 171 if (ns->mnt_ns) in free_nsproxy() 172 put_mnt_ns(ns->mnt_ns); in free_nsproxy() 173 if (ns->uts_ns) in free_nsproxy() 174 put_uts_ns(ns->uts_ns); in free_nsproxy() 175 if (ns->ipc_ns) in free_nsproxy() 176 put_ipc_ns(ns->ipc_ns); in free_nsproxy() 177 if (ns->pid_ns) in free_nsproxy() 178 put_pid_ns(ns->pid_ns); in free_nsproxy() 179 put_net(ns->net_ns); in free_nsproxy() [all …]
|
D | capability.c | 301 struct user_namespace *ns, int cap) in has_ns_capability() argument 306 ret = security_capable(__task_cred(t), ns, cap); in has_ns_capability() 341 struct user_namespace *ns, int cap) in has_ns_capability_noaudit() argument 346 ret = security_capable_noaudit(__task_cred(t), ns, cap); in has_ns_capability_noaudit() 380 bool ns_capable(struct user_namespace *ns, int cap) in ns_capable() argument 387 if (security_capable(current_cred(), ns, cap) == 0) { in ns_capable() 407 bool file_ns_capable(const struct file *file, struct user_namespace *ns, int cap) in file_ns_capable() argument 412 if (security_capable(file->f_cred, ns, cap) == 0) in file_ns_capable() 458 struct user_namespace *ns = current_user_ns(); in capable_wrt_inode_uidgid() local 460 return ns_capable(ns, cap) && kuid_has_mapping(ns, inode->i_uid) && in capable_wrt_inode_uidgid() [all …]
|
D | delayacct.c | 67 s64 ns; in delayacct_end() local 72 ns = timespec_to_ns(&ts); in delayacct_end() 73 if (ns < 0) in delayacct_end() 77 *total += ns; in delayacct_end()
|
D | sys.c | 601 struct user_namespace *ns = current_user_ns(); in SYSCALL_DEFINE2() local 607 krgid = make_kgid(ns, rgid); in SYSCALL_DEFINE2() 608 kegid = make_kgid(ns, egid); in SYSCALL_DEFINE2() 658 struct user_namespace *ns = current_user_ns(); in SYSCALL_DEFINE1() local 664 kgid = make_kgid(ns, gid); in SYSCALL_DEFINE1() 734 struct user_namespace *ns = current_user_ns(); in SYSCALL_DEFINE2() local 740 kruid = make_kuid(ns, ruid); in SYSCALL_DEFINE2() 741 keuid = make_kuid(ns, euid); in SYSCALL_DEFINE2() 805 struct user_namespace *ns = current_user_ns(); in SYSCALL_DEFINE1() local 811 kuid = make_kuid(ns, uid); in SYSCALL_DEFINE1() [all …]
|
D | ptrace.c | 216 static int ptrace_has_cap(struct user_namespace *ns, unsigned int mode) in ptrace_has_cap() argument 219 return has_ns_capability_noaudit(current, ns, CAP_SYS_PTRACE); in ptrace_has_cap() 221 return has_ns_capability(current, ns, CAP_SYS_PTRACE); in ptrace_has_cap()
|
D | cgroup.c | 3361 struct { enum cgroup_filetype type; struct pid_namespace *ns; } key; member 3443 struct pid_namespace *ns = task_active_pid_ns(current); in cgroup_pidlist_find() local 3453 if (l->key.type == type && l->key.ns == ns) { in cgroup_pidlist_find() 3469 l->key.ns = get_pid_ns(ns); in cgroup_pidlist_find() 3688 put_pid_ns(l->key.ns); in cgroup_release_pid_array()
|
/kernel/sched/ |
D | stats.h | 221 unsigned long long ns) in account_group_exec_runtime() argument 229 cputimer->cputime.sum_exec_runtime += ns; in account_group_exec_runtime()
|
D | core.c | 2685 u64 ns = 0; in do_task_delta_exec() local 2689 ns = rq->clock_task - p->se.exec_start; in do_task_delta_exec() 2690 if ((s64)ns < 0) in do_task_delta_exec() 2691 ns = 0; in do_task_delta_exec() 2694 return ns; in do_task_delta_exec() 2701 u64 ns = 0; in task_delta_exec() local 2704 ns = do_task_delta_exec(p, rq); in task_delta_exec() 2707 return ns; in task_delta_exec() 2719 u64 ns = 0; in task_sched_runtime() local 2722 ns = p->se.sum_exec_runtime + do_task_delta_exec(p, rq); in task_sched_runtime() [all …]
|
/kernel/events/ |
D | core.c | 802 return task_tgid_nr_ns(p, event->ns); in perf_event_pid() 813 return task_pid_nr_ns(p, event->ns); in perf_event_tid() 3027 if (event->ns) in free_event_rcu() 3028 put_pid_ns(event->ns); in free_event_rcu() 6389 event->ns = get_pid_ns(task_active_pid_ns(current)); in perf_event_alloc() 6444 if (event->ns) in perf_event_alloc() 6445 put_pid_ns(event->ns); in perf_event_alloc()
|