Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: intel-gfx@lists.freedesktop.org
Cc: Jani Nikula <jani.nikula@linux.intel.com>,
	Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>,
	Tvrtko Ursulin <tursulin@ursulin.net>
Subject: [PATCH] drm/i915: Use %p for pointer formatting
Date: Fri, 18 Sep 2026 12:37:25 +0200	[thread overview]
Message-ID: <20260918103725.cfYzL1Wt@linutronix.de> (raw)

Commit 2563a4524febe ("drm/i915: restrict kernel address leak in
debugfs") introduced the %pK modifier in order not to leak kernel
pointer.
Since commit ad67b74d2469d ("printk: hash addresses printed with
%p") pointers are hashed by default and the behaviour can be controller
by `hash_pointers' boot argument.
The policy on %p is to not introduce new ones. Keeping the %p allows
to assign an id to the object.
Removing %pK makes it possible to remove its handling from the library.

Use %p instead %pK to allow debugging if needed.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 drivers/gpu/drm/i915/i915_debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index a3e27f9e4f476..93ba7369ba6e2 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -179,7 +179,7 @@ i915_debugfs_describe_obj(struct seq_file *m, struct drm_i915_gem_object *obj)
 	struct i915_vma *vma;
 	int pin_count = 0;
 
-	seq_printf(m, "%pK: %c%c%c %8zdKiB %02x %02x %s%s%s",
+	seq_printf(m, "%p: %c%c%c %8zdKiB %02x %02x %s%s%s",
 		   &obj->base,
 		   get_tiling_flag(obj),
 		   get_global_flag(obj),
-- 
2.55.0


             reply	other threads:[~2026-09-18 10:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-18 10:37 Sebastian Andrzej Siewior [this message]
2026-09-18 12:00 ` [PATCH] drm/i915: Use %p for pointer formatting Sebastian Brzezinka
2026-09-18 12:36   ` Sebastian Andrzej Siewior
2026-09-18 12:18 ` ✗ i915.CI.BAT: failure for " Patchwork
2026-09-18 12:44   ` Sebastian Andrzej Siewior
2026-09-29 23:40     ` Andi Shyti
2026-09-30  0:22 ` ✓ i915.CI.BAT: success for drm/i915: Use %p for pointer formatting (rev2) Patchwork
2026-09-30 12:33 ` ✗ i915.CI.Full: failure " Patchwork
2026-09-30 16:18 ` [PATCH] drm/i915: Use %p for pointer formatting Andi Shyti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260918103725.cfYzL1Wt@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=tursulin@ursulin.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox