From: Linus Torvalds Date: Thu, 7 Dec 2017 02:23:27 +0000 (-0800) Subject: proc: show si_ptr in /proc//timers without hashing X-Git-Tag: v4.15~241 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=ba3edf1f770ebc486f9d69824f4a2e069da4d2d4;p=mirror_ubuntu-bionic-kernel.git proc: show si_ptr in /proc//timers without hashing It's a user pointer, and while the permissions of the file are pretty questionable (should it really be readable to everybody), hashing the pointer isn't going to be the solution. We should take a closer look at more of the /proc/ file permissions in general. Sure, we do want many of them to often be readable (for 'ps' and friends), but I think we should probably do a few conversions from S_IRUGO to S_IRUSR. Reported-by: Alexey Dobriyan Signed-off-by: Linus Torvalds --- diff --git a/fs/proc/base.c b/fs/proc/base.c index 28fa85276eec..60316b52d659 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -2268,7 +2268,7 @@ static int show_timer(struct seq_file *m, void *v) notify = timer->it_sigev_notify; seq_printf(m, "ID: %d\n", timer->it_id); - seq_printf(m, "signal: %d/%p\n", + seq_printf(m, "signal: %d/%px\n", timer->sigq->info.si_signo, timer->sigq->info.si_value.sival_ptr); seq_printf(m, "notify: %s/%s.%d\n",