]> git.ipfire.org Git - thirdparty/linux.git/commit
staging: vchiq_arm: Don't use %pK through printk
authorThomas Weißschuh <thomas.weissschuh@linutronix.de>
Tue, 11 Mar 2025 09:40:49 +0000 (10:40 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 20 Mar 2025 14:10:48 +0000 (07:10 -0700)
commit96622d58f50b8f364bb11d48f2d41e3348020b9e
treebdaa1bef5353139caf79405ece8c95ab2a957f23
parentb2a9a6a26b7e954297e51822e396572026480bad
staging: vchiq_arm: Don't use %pK through printk

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 looks 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://lore.kernel.org/lkml/20250113171731-dc10e3c1-da64-4af0-b767-7c7070468023@linutronix.de/
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20250311-restricted-pointers-vchiq_arm-v2-1-a14e1c0681fc@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_dev.c