]> www.infradead.org Git - users/jedix/linux-maple.git/commit
timer_list: Don't use %pK through printk()
authorThomas Weißschuh <thomas.weissschuh@linutronix.de>
Tue, 11 Mar 2025 09:54:47 +0000 (10:54 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 13 Mar 2025 07:19:19 +0000 (08:19 +0100)
commita52067c24ccf6ee4c85acffa0f155e9714f9adce
tree8ecf440188c9603dd1b7a8cc9b122c663eaa90bf
parent7a6b158e00c862ccfa7fe447682bd0bf5c229c73
timer_list: Don't use %pK through printk()

This reverts commit f590308536db ("timer debug: Hide kernel addresses via
%pK in /proc/timer_list")

The timer list helper SEQ_printf() uses either the real seq_printf() for
procfs output or vprintk() to print to the kernel log, when invoked from
SysRq-q. It uses %pK for printing pointers.

In the past %pK was prefered over %p as it would not leak raw pointer
values into the kernel log. Since commit ad67b74d2469 ("printk: hash
addresses printed with %p") the regular %p has been improved to avoid this
issue.

Furthermore, restricted pointers ("%pK") were never meant to be used
through printk(). They can still unintentionally leak raw pointers or
acquire sleeping looks in atomic contexts.

Switch to the regular pointer formatting which is safer, easier to reason
about and sufficient here.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/lkml/20250113171731-dc10e3c1-da64-4af0-b767-7c7070468023@linutronix.de/
Link: https://lore.kernel.org/all/20250311-restricted-pointers-timer-v1-1-6626b91e54ab@linutronix.de
kernel/time/timer_list.c