mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/2] net: Don't use %pK through printk
@ 2025-04-17 13:24 Thomas Weißschuh
  2025-04-17 13:24 ` [PATCH net-next v2 1/2] ice: Don't use %pK through printk or tracepoints Thomas Weißschuh
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Thomas Weißschuh @ 2025-04-17 13:24 UTC (permalink / raw)
  To: Tony Nguyen, Przemek Kitszel, Andrew Lunn, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Saeed Mahameed,
	Leon Romanovsky, Tariq Toukan
  Cc: intel-wired-lan, netdev, linux-kernel, linux-rdma,
	Thomas Weißschuh, Aleksandr Loktionov

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 looks in atomic contexts.

Switch to the regular pointer formatting which is safer and
easier to reason about.
There are still a few users of %pK left, but these use it through seq_file,
for which its usage is safe.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
Changes in v2:
- Drop wifi/ath patches, they are submitted on their own now
- Link to v1: https://lore.kernel.org/r/20250414-restricted-pointers-net-v1-0-12af0ce46cdd@linutronix.de

---
Thomas Weißschuh (2):
      ice: Don't use %pK through printk or tracepoints
      net/mlx5: Don't use %pK through tracepoints

 drivers/net/ethernet/intel/ice/ice_main.c                      |  2 +-
 drivers/net/ethernet/intel/ice/ice_trace.h                     | 10 +++++-----
 .../ethernet/mellanox/mlx5/core/sf/dev/diag/dev_tracepoint.h   |  2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)
---
base-commit: cfb2e2c57aef75a414c0f18445c7441df5bc13be
change-id: 20250404-restricted-pointers-net-a8cddd03e5d1

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


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

end of thread, other threads:[~2025-04-23 10:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-17 13:24 [PATCH net-next v2 0/2] net: Don't use %pK through printk Thomas Weißschuh
2025-04-17 13:24 ` [PATCH net-next v2 1/2] ice: Don't use %pK through printk or tracepoints Thomas Weißschuh
2025-04-17 13:24 ` [PATCH net-next v2 2/2] net/mlx5: Don't use %pK through tracepoints Thomas Weißschuh
2025-04-17 13:39 ` [Intel-wired-lan] [PATCH net-next v2 0/2] net: Don't use %pK through printk Dawid Osuchowski
2025-04-23 10:24   ` 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

all inboxes | Powered by JetHome®