Re: [PATCH v2] drm/msm: Don't use %pK through printk
From: Dmitry Baryshkov
Date: Fri Jul 18 2025 - 13:28:35 EST
On Fri, Jul 18, 2025 at 03:27:37PM +0200, 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.
>
> Switch to the regular pointer formatting which is safer and
> easier to reason about.
>
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@xxxxxxxxxxxxx>
> ---
> Changes in v2:
> - Drop already applied patches
> - Link to v1: https://lore.kernel.org/r/20250618-restricted-pointers-drm-v1-0-781e0d88cd92@xxxxxxxxxxxxx
> ---
> 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 +-
> 4 files changed, 6 insertions(+), 6 deletions(-)
>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
--
With best wishes
Dmitry