diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-11-27 19:45:56 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-11-27 19:45:56 -0500 |
commit | 8f5abe842e84ba9e72485ddd9dc02a3562b54e2a (patch) | |
tree | fc791e24ad719f40949baa26323b2ee9185a9a05 /fs/proc | |
parent | 1751e8a6cb935e555fcdbcb9ab4f0446e322ca3e (diff) |
proc: don't report kernel addresses in /proc/<pid>/stack
This just changes the file to report them as zero, although maybe even
that could be removed. I checked, and at least procps doesn't actually
seem to parse the 'stack' file at all.
And since the file doesn't necessarily even exist (it requires
CONFIG_STACKTRACE), possibly other tools don't really use it either.
That said, in case somebody parses it with tools, just having that zero
there should keep such tools happy.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/proc')
-rw-r--r-- | fs/proc/base.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c index 31934cb9dfc8..28fa85276eec 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
@@ -443,8 +443,7 @@ static int proc_pid_stack(struct seq_file *m, struct pid_namespace *ns, | |||
443 | save_stack_trace_tsk(task, &trace); | 443 | save_stack_trace_tsk(task, &trace); |
444 | 444 | ||
445 | for (i = 0; i < trace.nr_entries; i++) { | 445 | for (i = 0; i < trace.nr_entries; i++) { |
446 | seq_printf(m, "[<%pK>] %pB\n", | 446 | seq_printf(m, "[<0>] %pB\n", (void *)entries[i]); |
447 | (void *)entries[i], (void *)entries[i]); | ||
448 | } | 447 | } |
449 | unlock_trace(task); | 448 | unlock_trace(task); |
450 | } | 449 | } |