dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] drm: Don't use %pK through printk
@ 2025-06-18  7:52 Thomas Weißschuh
  2025-06-18  7:52 ` [PATCH 1/3] drm/bridge: samsung-dsim: " Thomas Weißschuh
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Thomas Weißschuh @ 2025-06-18  7:52 UTC (permalink / raw)
  To: Inki Dae, Jagan Teki, Marek Szyprowski, Andrzej Hajda,
	Neil Armstrong, Robert Foss, Laurent Pinchart, Jonas Karlman,
	Jernej Skrabec, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Seung-Woo Kim,
	Kyungmin Park, Krzysztof Kozlowski, Alim Akhtar, Rob Clark,
	Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang, Sean Paul,
	Marijn Suijten
  Cc: dri-devel, linux-kernel, linux-arm-kernel, linux-samsung-soc,
	linux-arm-msm, freedreno, 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.
There is still a user of %pK left, but this uses it through seq_file,
for which its usage is safe.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
Thomas Weißschuh (3):
      drm/bridge: samsung-dsim: Don't use %pK through printk
      drm/exynos: Don't use %pK through printk
      drm/msm: Don't use %pK through printk

 drivers/gpu/drm/bridge/samsung-dsim.c       |  4 ++--
 drivers/gpu/drm/exynos/exynos_drm_gem.c     |  2 +-
 drivers/gpu/drm/exynos/exynos_drm_ipp.c     | 32 ++++++++++++++---------------
 drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c    |  2 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.c |  4 ++--
 drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c     |  4 ++--
 drivers/gpu/drm/msm/msm_mdss.c              |  2 +-
 7 files changed, 25 insertions(+), 25 deletions(-)
---
base-commit: f09079bd04a924c72d555cd97942d5f8d7eca98c
change-id: 20250404-restricted-pointers-drm-87b703679fad

Best regards,
-- 
Thomas Weißschuh <thomas.weissschuh@linutronix.de>


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-06-27  2:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-18  7:52 [PATCH 0/3] drm: Don't use %pK through printk Thomas Weißschuh
2025-06-18  7:52 ` [PATCH 1/3] drm/bridge: samsung-dsim: " Thomas Weißschuh
2025-06-27  2:00   ` Inki Dae
2025-06-18  7:52 ` [PATCH 2/3] drm/exynos: " Thomas Weißschuh
2025-06-27  2:02   ` Inki Dae
2025-06-18  7:52 ` [PATCH 3/3] drm/msm: " Thomas Weißschuh

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).