]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
soc: ti: pruss: don't use %pK through printk
authorThomas Weißschuh <thomas.weissschuh@linutronix.de>
Mon, 11 Aug 2025 07:48:30 +0000 (09:48 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Nov 2025 20:34:02 +0000 (15:34 -0500)
[ Upstream commit a5039648f86424885aae37f03dc39bc9cb972ecb ]

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.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Link: https://lore.kernel.org/r/20250811-restricted-pointers-soc-v2-1-7af7ed993546@linutronix.de
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/soc/ti/pruss.c

index 3ec758f50e24813f1ff3398746bc026400e6a839..f588153e8178df3cbe2654e0b175ea69218691a7 100644 (file)
@@ -449,7 +449,7 @@ static int pruss_of_setup_memories(struct device *dev, struct pruss *pruss)
                pruss->mem_regions[i].pa = res.start;
                pruss->mem_regions[i].size = resource_size(&res);
 
-               dev_dbg(dev, "memory %8s: pa %pa size 0x%zx va %pK\n",
+               dev_dbg(dev, "memory %8s: pa %pa size 0x%zx va %p\n",
                        mem_names[i], &pruss->mem_regions[i].pa,
                        pruss->mem_regions[i].size, pruss->mem_regions[i].va);
        }