[PATCH 0/3] drm: Don't use %pK through printk

Thomas Weißschuh thomas.weissschuh at linutronix.de
Wed Jun 18 00:52:19 PDT 2025


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 at 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 at linutronix.de>




More information about the linux-arm-kernel mailing list