]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ice: Don't use %pK through printk or tracepoints
authorThomas Weißschuh <thomas.weissschuh@linutronix.de>
Mon, 11 Aug 2025 09:43:18 +0000 (11:43 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 14 Aug 2025 01:26:17 +0000 (18:26 -0700)
commit66ceb45b7d7e9673254116eefe5b6d3a44eba267
treed76de0ffb72545f02e34cd5ba9f8ba6a57bc2dc3
parentacfea9361073134e828fddbd5f8201d428d7a7b1
ice: Don't use %pK through printk or tracepoints

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 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>
Acked-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Link: https://patch.msgid.link/20250811-restricted-pointers-net-v5-1-2e2fdc7d3f2c@linutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/intel/ice/ice_main.c
drivers/net/ethernet/intel/ice/ice_trace.h