]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
Merge branch 'net-don-t-use-pk-through-printk-or-tracepoints'
authorJakub Kicinski <kuba@kernel.org>
Thu, 14 Aug 2025 01:26:18 +0000 (18:26 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 14 Aug 2025 01:26:52 +0000 (18:26 -0700)
commit3b5ca25ecfa85098c7015251a0e7c78a8ff392e5
tree06aad39f3fea007cba3e343113f5adbf1467e555
parentacfea9361073134e828fddbd5f8201d428d7a7b1
parente2068f74b97653356ad7d6ce456db1f5b7fb575e
Merge branch 'net-don-t-use-pk-through-printk-or-tracepoints'

Thomas Weißschuh says:

====================
net: Don't use %pK through printk or tracepoints

In the past %pK was preferable to %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 locks in atomic contexts.

Switch to the regular pointer formatting which is safer and
easier to reason about.
There are still a few users of %pK left, but these use it through seq_file,
for which its usage is safe.
====================

Link: https://patch.msgid.link/20250811-restricted-pointers-net-v5-0-2e2fdc7d3f2c@linutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>