Skip to content

Commit 8f5abe8

Browse files
committed
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 <[email protected]>
1 parent 1751e8a commit 8f5abe8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

fs/proc/base.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,8 +443,7 @@ static int proc_pid_stack(struct seq_file *m, struct pid_namespace *ns,
443443
save_stack_trace_tsk(task, &trace);
444444

445445
for (i = 0; i < trace.nr_entries; i++) {
446-
seq_printf(m, "[<%pK>] %pB\n",
447-
(void *)entries[i], (void *)entries[i]);
446+
seq_printf(m, "[<0>] %pB\n", (void *)entries[i]);
448447
}
449448
unlock_trace(task);
450449
}

0 commit comments

Comments
 (0)