summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorConnor O'Brien <connoro@google.com>2017-10-16 10:30:24 -0700
committerConnor O'Brien <connoro@google.com>2018-03-06 20:39:55 +0000
commit552095deb5650aa958cb29c6ae712728d38c4a5a (patch)
treede4eda73379603c0441fb3f4a1cca093d9b91cea /include/linux
parent229c03238f0cf3679d2fdf16fa9f207420d99d41 (diff)
ANDROID: proc: Add /proc/uid directory
Add support for reporting per-uid information through procfs, roughly following the approach used for per-tid and per-tgid directories in fs/proc/base.c. This also entails some new tracking of which uids have been used, to avoid losing information when the last task with a given uid exits. Signed-off-by: Connor O'Brien <connoro@google.com> Bug: 72339335 Test: ls /proc/uid/; compare with UIDs in /proc/uid_time_in_state Change-Id: I0908f0c04438b11ceb673d860e58441bf503d478
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/proc_fs.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
index b97bf2ef996e..b326d0a0cace 100644
--- a/include/linux/proc_fs.h
+++ b/include/linux/proc_fs.h
@@ -74,6 +74,12 @@ static inline int remove_proc_subtree(const char *name, struct proc_dir_entry *p
#endif /* CONFIG_PROC_FS */
+#ifdef CONFIG_PROC_UID
+extern void proc_register_uid(kuid_t uid);
+#else
+static inline void proc_register_uid(kuid_t uid) {}
+#endif
+
struct net;
static inline struct proc_dir_entry *proc_net_mkdir(