* [PATCH] ASoC: stm32: dfsdm: don't use %pK through printk
@ 2025-11-06 14:41 Thomas Weißschuh
2025-11-07 9:34 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Weißschuh @ 2025-11-06 14:41 UTC (permalink / raw)
To: Olivier Moysan, Arnaud Pouliquen, Liam Girdwood, Mark Brown,
Jaroslav Kysela, Takashi Iwai, Maxime Coquelin, Alexandre Torgue
Cc: linux-sound, linux-stm32, linux-arm-kernel, linux-kernel,
Thomas Weißschuh
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>
---
sound/soc/stm/stm32_adfsdm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/stm/stm32_adfsdm.c b/sound/soc/stm/stm32_adfsdm.c
index c914d1c4685019ef1fd66ab92d73bd06cf8d14a1..1797a91fea7ae85671ba9991c2f8bfa8c9d1ce92 100644
--- a/sound/soc/stm/stm32_adfsdm.c
+++ b/sound/soc/stm/stm32_adfsdm.c
@@ -180,7 +180,7 @@ static int stm32_afsdm_pcm_cb(const void *data, size_t size, void *private)
src_size >>= 1;
cur_size = src_size;
- dev_dbg(rtd->dev, "%s: buff_add :%pK, pos = %d, size = %zu\n",
+ dev_dbg(rtd->dev, "%s: buff_add :%p, pos = %d, size = %zu\n",
__func__, &pcm_buff[priv->pos], priv->pos, src_size);
if ((priv->pos + src_size) > buff_size) {
---
base-commit: 7ea30958b3054f5e488fa0b33c352723f7ab3a2a
change-id: 20251106-restricted-pointers-stm-5bfc48d3a4c5
Best regards,
--
Thomas Weißschuh <thomas.weissschuh@linutronix.de>
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] ASoC: stm32: dfsdm: don't use %pK through printk
2025-11-06 14:41 [PATCH] ASoC: stm32: dfsdm: don't use %pK through printk Thomas Weißschuh
@ 2025-11-07 9:34 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2025-11-07 9:34 UTC (permalink / raw)
To: Olivier Moysan, Arnaud Pouliquen, Liam Girdwood, Jaroslav Kysela,
Takashi Iwai, Maxime Coquelin, Alexandre Torgue,
Thomas Weißschuh
Cc: linux-sound, linux-stm32, linux-arm-kernel, linux-kernel
On Thu, 06 Nov 2025 15:41:57 +0100, Thomas Weißschuh wrote:
> 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.
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: stm32: dfsdm: don't use %pK through printk
commit: 4db4ce15706d6423cc4cac4b05114b0469507bad
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-11-07 9:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-06 14:41 [PATCH] ASoC: stm32: dfsdm: don't use %pK through printk Thomas Weißschuh
2025-11-07 9:34 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).