* [PATCH] wil6210: Remove %pK and %p
@ 2026-09-18 10:56 Sebastian Andrzej Siewior
2026-09-18 15:25 ` Jeff Johnson
0 siblings, 1 reply; 4+ messages in thread
From: Sebastian Andrzej Siewior @ 2026-09-18 10:56 UTC (permalink / raw)
To: linux-wireless
Commit 71338aa7d050c ("net: convert %p usage to %pK") which is from
2011 and changed the %p annotation for pointer to %pK. Back then the
default behaviour for %p was to print the pointer. The %pK modifier was
introduced to able to control the behaviour of specific pointer values
without changing the behaviour of %p for everyone. It was dedicated to
avoid leaking pointers via /proc.
Things changed over time. The default behaviour for %p is now to print a
hash pointer which does not leak the address but allows to correlate if
two pointers are equal. I intend to remove %pK from the library.
The policy on %p is to not introduce new ones. This is somehow in
between since it already exists.
The driver uses %p to print the address of skb, %p for the address of a
transfer ring and %pK for the address of the status ring.
For the skb it is probably enough to print if there is one mapped. The
address of the ring probably not matter given the physical is address is
shown and it is virtually mapped.
Remove the %p and %pK line from wil_print_.*() so it does not end in
debugfs' output (debugfs is not ABI so removing does not break
anything).
Replace the skb pointer with yes/ no.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
drivers/net/wireless/ath/wil6210/debugfs.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/wireless/ath/wil6210/debugfs.c b/drivers/net/wireless/ath/wil6210/debugfs.c
index e06e45323272c..093ec04e4a052 100644
--- a/drivers/net/wireless/ath/wil6210/debugfs.c
+++ b/drivers/net/wireless/ath/wil6210/debugfs.c
@@ -80,7 +80,6 @@ static void wil_print_ring(struct seq_file *s, struct wil6210_priv *wil,
seq_printf(s, "RING %s = {\n", name);
seq_printf(s, " pa = %pad\n", &ring->pa);
- seq_printf(s, " va = 0x%p\n", ring->va);
seq_printf(s, " size = %d\n", ring->size);
if (wil->use_enhanced_dma_hw && ring->is_rx)
seq_printf(s, " swtail = %u\n", *ring->edma_rx_swtail.va);
@@ -200,7 +199,6 @@ static void wil_print_sring(struct seq_file *s, struct wil6210_priv *wil,
seq_printf(s, "Status Ring %s [ %d ] = {\n",
sring->is_rx ? "RX" : "TX", sring_idx);
seq_printf(s, " pa = %pad\n", &sring->pa);
- seq_printf(s, " va = 0x%pK\n", sring->va);
seq_printf(s, " size = %d\n", sring->size);
seq_printf(s, " elem_size = %zu\n", sring->elem_size);
seq_printf(s, " swhead = %d\n", sring->swhead);
@@ -1140,7 +1138,7 @@ static int txdesc_show(struct seq_file *s, void *data)
u[0], u[1], u[2], u[3]);
seq_printf(s, " DMA = 0x%08x 0x%08x 0x%08x 0x%08x\n",
u[4], u[5], u[6], u[7]);
- seq_printf(s, " SKB = 0x%p\n", skb);
+ seq_printf(s, " SKB = %s\n", skb ? "yes" : "no");
if (skb) {
skb_get(skb);
--
2.55.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] wil6210: Remove %pK and %p
2026-09-18 10:56 [PATCH] wil6210: Remove %pK and %p Sebastian Andrzej Siewior
@ 2026-09-18 15:25 ` Jeff Johnson
2026-09-18 16:58 ` Sebastian Andrzej Siewior
2026-09-18 20:11 ` [PATCH v2] wil6210: Replace %pK with %p Sebastian Andrzej Siewior
0 siblings, 2 replies; 4+ messages in thread
From: Jeff Johnson @ 2026-09-18 15:25 UTC (permalink / raw)
To: Sebastian Andrzej Siewior, linux-wireless
On 9/18/2026 3:56 AM, Sebastian Andrzej Siewior wrote:
> Commit 71338aa7d050c ("net: convert %p usage to %pK") which is from
> 2011 and changed the %p annotation for pointer to %pK. Back then the
> default behaviour for %p was to print the pointer. The %pK modifier was
> introduced to able to control the behaviour of specific pointer values
> without changing the behaviour of %p for everyone. It was dedicated to
> avoid leaking pointers via /proc.
>
> Things changed over time. The default behaviour for %p is now to print a
> hash pointer which does not leak the address but allows to correlate if
> two pointers are equal. I intend to remove %pK from the library.
> The policy on %p is to not introduce new ones. This is somehow in
> between since it already exists.
>
> The driver uses %p to print the address of skb, %p for the address of a
> transfer ring and %pK for the address of the status ring.
> For the skb it is probably enough to print if there is one mapped. The
> address of the ring probably not matter given the physical is address is
> shown and it is virtually mapped.
>
> Remove the %p and %pK line from wil_print_.*() so it does not end in
> debugfs' output (debugfs is not ABI so removing does not break
> anything).
> Replace the skb pointer with yes/ no.
NAK. debugfs may not be ABI, but it is a human interface, and you should not
assume that a human debugger doesn't need the information.
I'm ok with replacing %pK => %p but not ok with removing existing %p[K]
>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> ---
> drivers/net/wireless/ath/wil6210/debugfs.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/wil6210/debugfs.c b/drivers/net/wireless/ath/wil6210/debugfs.c
> index e06e45323272c..093ec04e4a052 100644
> --- a/drivers/net/wireless/ath/wil6210/debugfs.c
> +++ b/drivers/net/wireless/ath/wil6210/debugfs.c
> @@ -80,7 +80,6 @@ static void wil_print_ring(struct seq_file *s, struct wil6210_priv *wil,
>
> seq_printf(s, "RING %s = {\n", name);
> seq_printf(s, " pa = %pad\n", &ring->pa);
> - seq_printf(s, " va = 0x%p\n", ring->va);
> seq_printf(s, " size = %d\n", ring->size);
> if (wil->use_enhanced_dma_hw && ring->is_rx)
> seq_printf(s, " swtail = %u\n", *ring->edma_rx_swtail.va);
> @@ -200,7 +199,6 @@ static void wil_print_sring(struct seq_file *s, struct wil6210_priv *wil,
> seq_printf(s, "Status Ring %s [ %d ] = {\n",
> sring->is_rx ? "RX" : "TX", sring_idx);
> seq_printf(s, " pa = %pad\n", &sring->pa);
> - seq_printf(s, " va = 0x%pK\n", sring->va);
> seq_printf(s, " size = %d\n", sring->size);
> seq_printf(s, " elem_size = %zu\n", sring->elem_size);
> seq_printf(s, " swhead = %d\n", sring->swhead);
> @@ -1140,7 +1138,7 @@ static int txdesc_show(struct seq_file *s, void *data)
> u[0], u[1], u[2], u[3]);
> seq_printf(s, " DMA = 0x%08x 0x%08x 0x%08x 0x%08x\n",
> u[4], u[5], u[6], u[7]);
> - seq_printf(s, " SKB = 0x%p\n", skb);
> + seq_printf(s, " SKB = %s\n", skb ? "yes" : "no");
>
> if (skb) {
> skb_get(skb);
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] wil6210: Remove %pK and %p
2026-09-18 15:25 ` Jeff Johnson
@ 2026-09-18 16:58 ` Sebastian Andrzej Siewior
2026-09-18 20:11 ` [PATCH v2] wil6210: Replace %pK with %p Sebastian Andrzej Siewior
1 sibling, 0 replies; 4+ messages in thread
From: Sebastian Andrzej Siewior @ 2026-09-18 16:58 UTC (permalink / raw)
To: Jeff Johnson; +Cc: linux-wireless
On 2026-09-18 08:25:32 [-0700], Jeff Johnson wrote:
> > Remove the %p and %pK line from wil_print_.*() so it does not end in
> > debugfs' output (debugfs is not ABI so removing does not break
> > anything).
> > Replace the skb pointer with yes/ no.
>
> NAK. debugfs may not be ABI, but it is a human interface, and you should not
> assume that a human debugger doesn't need the information.
>
> I'm ok with replacing %pK => %p but not ok with removing existing %p[K]
I didn't expect that you need the VA and the skb pointer. If so, let me
update accordingly.
> > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Sebastian
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] wil6210: Replace %pK with %p
2026-09-18 15:25 ` Jeff Johnson
2026-09-18 16:58 ` Sebastian Andrzej Siewior
@ 2026-09-18 20:11 ` Sebastian Andrzej Siewior
1 sibling, 0 replies; 4+ messages in thread
From: Sebastian Andrzej Siewior @ 2026-09-18 20:11 UTC (permalink / raw)
To: Jeff Johnson; +Cc: linux-wireless
Commit 71338aa7d050c ("net: convert %p usage to %pK") which is from
2011 and changed the %p annotation for pointer to %pK. Back then the
default behaviour for %p was to print the pointer. The %pK modifier was
introduced to able to control the behaviour of specific pointer values
without changing the behaviour of %p for everyone. It was dedicated to
avoid leaking pointers via /proc.
Things changed over time. The default behaviour for %p is now to print a
hash pointer which does not leak the address but allows to correlate if
two pointers are equal. I intend to remove %pK from the library.
Replace %pK with %pK in order to retain the pointer output for
debugging.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
v1…v2: https://lore.kernel.org/all/20260918105632.pDhc9gIB@linutronix.de/
- Keep existing %p, just replace %pK.
drivers/net/wireless/ath/wil6210/debugfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/wil6210/debugfs.c b/drivers/net/wireless/ath/wil6210/debugfs.c
index e06e45323272c..79f5785697081 100644
--- a/drivers/net/wireless/ath/wil6210/debugfs.c
+++ b/drivers/net/wireless/ath/wil6210/debugfs.c
@@ -200,7 +200,7 @@ static void wil_print_sring(struct seq_file *s, struct wil6210_priv *wil,
seq_printf(s, "Status Ring %s [ %d ] = {\n",
sring->is_rx ? "RX" : "TX", sring_idx);
seq_printf(s, " pa = %pad\n", &sring->pa);
- seq_printf(s, " va = 0x%pK\n", sring->va);
+ seq_printf(s, " va = 0x%p\n", sring->va);
seq_printf(s, " size = %d\n", sring->size);
seq_printf(s, " elem_size = %zu\n", sring->elem_size);
seq_printf(s, " swhead = %d\n", sring->swhead);
--
2.55.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-09-18 20:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-18 10:56 [PATCH] wil6210: Remove %pK and %p Sebastian Andrzej Siewior
2026-09-18 15:25 ` Jeff Johnson
2026-09-18 16:58 ` Sebastian Andrzej Siewior
2026-09-18 20:11 ` [PATCH v2] wil6210: Replace %pK with %p Sebastian Andrzej Siewior
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox