ath10k.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: "Thomas Weißschuh" <thomas.weissschuh@linutronix.de>
To: Jeff Johnson <jjohnson@kernel.org>,
	 Loic Poulain <loic.poulain@linaro.org>,
	 Brian Norris <briannorris@chromium.org>,
	 Francesco Dolcini <francesco@dolcini.it>,
	 Tony Nguyen <anthony.l.nguyen@intel.com>,
	 Przemek Kitszel <przemyslaw.kitszel@intel.com>,
	 Andrew Lunn <andrew+netdev@lunn.ch>,
	 "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	 Jakub Kicinski <kuba@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>,
	 Saeed Mahameed <saeedm@nvidia.com>,
	Leon Romanovsky <leon@kernel.org>,
	 Tariq Toukan <tariqt@nvidia.com>
Cc: ath10k@lists.infradead.org, linux-kernel@vger.kernel.org,
	ath11k@lists.infradead.org, ath12k@lists.infradead.org,
	wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org,
	intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
	linux-rdma@vger.kernel.org,
	"Thomas Weißschuh" <thomas.weissschuh@linutronix.de>
Subject: [PATCH net-next 2/7] wifi: ath11k: Don't use %pK through printk
Date: Mon, 14 Apr 2025 10:26:03 +0200	[thread overview]
Message-ID: <20250414-restricted-pointers-net-v1-2-12af0ce46cdd@linutronix.de> (raw)
In-Reply-To: <20250414-restricted-pointers-net-v1-0-12af0ce46cdd@linutronix.de>

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>
---
 drivers/net/wireless/ath/ath11k/testmode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath11k/testmode.c b/drivers/net/wireless/ath/ath11k/testmode.c
index 9be1cd742339c95ffa74c09bee924f4eff15134a..a9751ea2a0b73009bfb600d51c3978200ce99114 100644
--- a/drivers/net/wireless/ath/ath11k/testmode.c
+++ b/drivers/net/wireless/ath/ath11k/testmode.c
@@ -107,7 +107,7 @@ static int ath11k_tm_process_event(struct ath11k_base *ab, u32 cmd_id,
 	u32 pdev_id;
 
 	ath11k_dbg(ab, ATH11K_DBG_TESTMODE,
-		   "event wmi cmd_id %d ftm event msg %pK datalen %d\n",
+		   "event wmi cmd_id %d ftm event msg %p datalen %d\n",
 		   cmd_id, ftm_msg, length);
 	ath11k_dbg_dump(ab, ATH11K_DBG_TESTMODE, NULL, "", ftm_msg, length);
 	pdev_id = DP_HW2SW_MACID(ftm_msg->seg_hdr.pdev_id);

-- 
2.49.0



  parent reply	other threads:[~2025-04-14  8:26 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-14  8:26 [PATCH net-next 0/7] net: Don't use %pK through printk Thomas Weißschuh
2025-04-14  8:26 ` [PATCH net-next 1/7] wifi: ath10k: " Thomas Weißschuh
2025-04-14 16:16   ` [Intel-wired-lan] " Loktionov, Aleksandr
2025-04-14  8:26 ` Thomas Weißschuh [this message]
2025-04-14 16:17   ` [Intel-wired-lan] [PATCH net-next 2/7] wifi: ath11k: " Loktionov, Aleksandr
2025-04-14  8:26 ` [PATCH net-next 3/7] wifi: ath12k: " Thomas Weißschuh
2025-04-14 16:16   ` [Intel-wired-lan] " Loktionov, Aleksandr
2025-04-14  8:26 ` [PATCH net-next 4/7] wifi: wcn36xx: " Thomas Weißschuh
2025-04-14 19:04   ` Loic Poulain
2025-04-14  8:26 ` [PATCH net-next 5/7] wifi: mwifiex: " Thomas Weißschuh
2025-04-14 16:15   ` [Intel-wired-lan] " Loktionov, Aleksandr
2025-04-14  8:26 ` [PATCH net-next 6/7] ice: Don't use %pK through printk or tracepoints Thomas Weißschuh
2025-04-14  9:59   ` Przemek Kitszel
2025-04-14 16:18   ` [Intel-wired-lan] " Loktionov, Aleksandr
2025-04-14  8:26 ` [PATCH net-next 7/7] net/mlx5: Don't use %pK through tracepoints Thomas Weißschuh
2025-04-14 10:49   ` Tariq Toukan
2025-04-14 16:17   ` [Intel-wired-lan] " Loktionov, Aleksandr
2025-04-14 15:02 ` [PATCH net-next 0/7] net: Don't use %pK through printk Jeff Johnson
2025-04-15  6:42   ` Thomas Weißschuh
2025-04-14 16:17 ` [Intel-wired-lan] " Loktionov, Aleksandr
2025-04-14 18:44 ` Brian Norris
2025-04-15  6:59   ` Thomas Weißschuh

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=20250414-restricted-pointers-net-v1-2-12af0ce46cdd@linutronix.de \
    --to=thomas.weissschuh@linutronix.de \
    --cc=andrew+netdev@lunn.ch \
    --cc=anthony.l.nguyen@intel.com \
    --cc=ath10k@lists.infradead.org \
    --cc=ath11k@lists.infradead.org \
    --cc=ath12k@lists.infradead.org \
    --cc=briannorris@chromium.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=francesco@dolcini.it \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jjohnson@kernel.org \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=loic.poulain@linaro.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=przemyslaw.kitszel@intel.com \
    --cc=saeedm@nvidia.com \
    --cc=tariqt@nvidia.com \
    --cc=wcn36xx@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).