aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2012-02-07 20:56:49 -0500
committerEric W. Biederman <ebiederm@xmission.com>2012-09-18 04:01:32 -0400
commit4bd6e32acec66c55c6c1af4672f3216b2ac88e35 (patch)
tree10800ae46eac8cba0f947b9ec3b7c8bc694d834a /include/linux
parentcca080d9b622094831672a136e5ee4f702d116b1 (diff)
userns: Convert taskstats to handle the user and pid namespaces.
- Explicitly limit exit task stat broadcast to the initial user and pid namespaces, as it is already limited to the initial network namespace. - For broadcast task stats explicitly generate all of the idenitiers in terms of the initial user namespace and the initial pid namespace. - For request stats report them in terms of the current user namespace and the current pid namespace. Netlink messages are delivered syncrhonously to the kernel allowing us to get the user namespace and the pid namespace from the current task. - Pass the namespaces for representing pids and uids and gids into bacct_add_task. Cc: Balbir Singh <bsingharora@gmail.com> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/tsacct_kern.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/tsacct_kern.h b/include/linux/tsacct_kern.h
index 7e50ac795b0b..44893e5ec8f7 100644
--- a/include/linux/tsacct_kern.h
+++ b/include/linux/tsacct_kern.h
@@ -10,9 +10,13 @@
10#include <linux/taskstats.h> 10#include <linux/taskstats.h>
11 11
12#ifdef CONFIG_TASKSTATS 12#ifdef CONFIG_TASKSTATS
13extern void bacct_add_tsk(struct taskstats *stats, struct task_struct *tsk); 13extern void bacct_add_tsk(struct user_namespace *user_ns,
14 struct pid_namespace *pid_ns,
15 struct taskstats *stats, struct task_struct *tsk);
14#else 16#else
15static inline void bacct_add_tsk(struct taskstats *stats, struct task_struct *tsk) 17static inline void bacct_add_tsk(struct user_namespace *user_ns,
18 struct pid_namespace *pid_ns,
19 struct taskstats *stats, struct task_struct *tsk)
16{} 20{}
17#endif /* CONFIG_TASKSTATS */ 21#endif /* CONFIG_TASKSTATS */
18 22