summaryrefslogtreecommitdiff
path: root/fs/proc
diff options
context:
space:
mode:
authorchunx <chunx@nvidia.com>2013-07-05 11:42:05 +0800
committerDan Willemsen <dwillemsen@nvidia.com>2013-09-14 13:40:37 -0700
commitdb969bbf31dbb79c0f06497f083b4bad16ad88c7 (patch)
tree79b3f7b9091cbb454e70b1b0e28585175daa904c /fs/proc
parentd8461f401990820027131da3ec597361d8906cb8 (diff)
net: show cmdline in /proc/net/{tcp udp tcp6 udp6}
Get process's cmdline from a sock's corresponding inode pointer, so that cmdline can't be used by Android active-standby app to find the corresponding package name. Bug 1185001 Change-Id: Idc8651e4bb85b8a152dfade9689a719f7d72687d Signed-off-by: Chun Xu <chunx@nvidia.com> Reviewed-on: http://git-master/r/253458 (cherry picked from commit 5dcfe4f561bd8d1767e0938dfd7565b2b7718478) Reviewed-on: http://git-master/r/260013 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
Diffstat (limited to 'fs/proc')
-rw-r--r--fs/proc/base.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 2d00fdde9345..77377014887c 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -45,6 +45,8 @@
*
* Paul Mundt <paul.mundt@nokia.com>:
* Overall revision about smaps.
+ *
+ * Copyright (c) 2013, NVIDIA CORPORATION. All rights reserved.
*/
#include <asm/uaccess.h>
@@ -206,7 +208,12 @@ static int proc_root_link(struct dentry *dentry, struct path *path)
return result;
}
-static int proc_pid_cmdline(struct task_struct *task, char * buffer)
+struct mm_struct *mm_for_maps(struct task_struct *task)
+{
+ return mm_access(task, PTRACE_MODE_READ);
+}
+
+static int proc_pid_cmdline(struct task_struct *task, char *buffer)
{
int res = 0;
unsigned int len;