wifi: ath: Don't use %pK through printk
Subsystems (5)
cover wifi: ath: Don't use %pK through printk
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.
These patches were originally part of
https://lore.kernel.org/lkml/[email protected]/
---
Thomas Weißschuh (4):
wifi: ath10k: Don't use %pK through printk
wifi: ath11k: Don't use %pK through printk
wifi: ath12k: Don't use %pK through printk
wifi: wcn36xx: Don't use %pK through printk
drivers/net/wireless/ath/ath10k/ahb.c | 2 +- drivers/net/wireless/ath/ath10k/bmi.c | 6 +++--- drivers/net/wireless/ath/ath10k/ce.c | 4 ++-- drivers/net/wireless/ath/ath10k/core.c | 4 ++-- drivers/net/wireless/ath/ath10k/htc.c | 6 +++--- drivers/net/wireless/ath/ath10k/htt_rx.c | 2 +- drivers/net/wireless/ath/ath10k/mac.c | 22 +++++++++++----------- drivers/net/wireless/ath/ath10k/pci.c | 2 +- drivers/net/wireless/ath/ath10k/testmode.c | 4 ++-- drivers/net/wireless/ath/ath10k/txrx.c | 2 +- drivers/net/wireless/ath/ath10k/usb.c | 4 ++-- drivers/net/wireless/ath/ath10k/wmi.c | 4 ++-- drivers/net/wireless/ath/ath11k/testmode.c | 2 +- drivers/net/wireless/ath/ath12k/testmode.c | 4 ++-- drivers/net/wireless/ath/wcn36xx/testmode.c | 2 +- 15 files changed, 35 insertions(+), 35 deletions(-)
---
base-commit: cfb2e2c57aef75a414c0f18445c7441df5bc13be
change-id: 20250417-restricted-pointers-ath-4f279530336d
Best regards,
Signature · 1 line
Thomas Weißschuh <[email protected]>
PATCH 1/4 wifi: ath10k: Don't use %pK through printk
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.
--- drivers/net/wireless/ath/ath10k/ahb.c | 2 +- drivers/net/wireless/ath/ath10k/bmi.c | 6 +++--- drivers/net/wireless/ath/ath10k/ce.c | 4 ++-- drivers/net/wireless/ath/ath10k/core.c | 4 ++-- drivers/net/wireless/ath/ath10k/htc.c | 6 +++--- drivers/net/wireless/ath/ath10k/htt_rx.c | 2 +- drivers/net/wireless/ath/ath10k/mac.c | 22 +++++++++++----------- drivers/net/wireless/ath/ath10k/pci.c | 2 +- drivers/net/wireless/ath/ath10k/testmode.c | 4 ++-- drivers/net/wireless/ath/ath10k/txrx.c | 2 +- drivers/net/wireless/ath/ath10k/usb.c | 4 ++-- drivers/net/wireless/ath/ath10k/wmi.c | 4 ++-- 12 files changed, 31 insertions(+), 31 deletions(-)
drivers/net/wireless/ath/ath10k/ahb.c +1 -1
@@ -497,7 +497,7 @@ static int ath10k_ahb_resource_init(struct ath10k *ar)ath10k_dbg (ar,ATH10K_DBG_BOOT ,"irq: %d\n" , ar_ahb->irq); -ath10k_dbg (ar,ATH10K_DBG_BOOT ,"mem: 0x%pK mem_len: %lu gcc mem: 0x%pK tcsr_mem: 0x%pK\n" , +ath10k_dbg (ar,ATH10K_DBG_BOOT ,"mem: 0x%p mem_len: %lu gcc mem: 0x%p tcsr_mem: 0x%p\n" , ar_ahb->mem, ar_ahb->mem_len, ar_ahb->gcc_mem, ar_ahb->tcsr_mem);return 0 ;
drivers/net/wireless/ath/ath10k/bmi.c +3 -3
@@ -349,7 +349,7 @@ static int ath10k_bmi_lz_data_large(struct ath10k *ar, const void *buffer, u32 lint ret;size_t buf_len; -ath10k_dbg (ar,ATH10K_DBG_BMI ,"large bmi lz data buffer 0x%pK length %d\n" , +ath10k_dbg (ar,ATH10K_DBG_BMI ,"large bmi lz data buffer 0x%p length %d\n" , buffer, length);if (ar->bmi.done_sent) {
@@ -395,7 +395,7 @@ int ath10k_bmi_lz_data(struct ath10k *ar, const void *buffer, u32 length)u32 txlen;int ret; -ath10k_dbg (ar,ATH10K_DBG_BMI ,"bmi lz data buffer 0x%pK length %d\n" , +ath10k_dbg (ar,ATH10K_DBG_BMI ,"bmi lz data buffer 0x%p length %d\n" , buffer, length);if (ar->bmi.done_sent) {
@@ -461,7 +461,7 @@ int ath10k_bmi_fast_download(struct ath10k *ar,int ret;ath10k_dbg (ar,ATH10K_DBG_BMI , -"bmi fast download address 0x%x buffer 0x%pK length %d\n" , +"bmi fast download address 0x%x buffer 0x%p length %d\n" , address, buffer, length); ret =ath10k_bmi_lz_stream_start (ar, address);
drivers/net/wireless/ath/ath10k/ce.c +2 -2
@@ -1388,7 +1388,7 @@ static int ath10k_ce_init_src_ring(struct ath10k *ar,ath10k_ce_src_ring_highmark_set (ar, ctrl_addr, nentries);ath10k_dbg (ar,ATH10K_DBG_BOOT , -"boot init ce src ring id %d entries %d base_addr %pK\n" , +"boot init ce src ring id %d entries %d base_addr %p\n" , ce_id, nentries, src_ring->base_addr_owner_space);return 0 ;
@@ -1426,7 +1426,7 @@ static int ath10k_ce_init_dest_ring(struct ath10k *ar,ath10k_ce_dest_ring_highmark_set (ar, ctrl_addr, nentries);ath10k_dbg (ar,ATH10K_DBG_BOOT , -"boot ce dest ring id %d entries %d base_addr %pK\n" , +"boot ce dest ring id %d entries %d base_addr %p\n" , ce_id, nentries, dest_ring->base_addr_owner_space);return 0 ;
drivers/net/wireless/ath/ath10k/core.c +2 -2
@@ -1200,7 +1200,7 @@ static int ath10k_download_fw(struct ath10k *ar) }ath10k_dbg (ar,ATH10K_DBG_BOOT , -"boot uploading firmware image %pK len %d\n" , +"boot uploading firmware image %p len %d\n" , data, data_len);/* Check if device supports to download firmware via
@@ -1826,7 +1826,7 @@ static int ath10k_download_and_run_otp(struct ath10k *ar)if (!ar->running_fw->fw_file.otp_data || !ar->running_fw->fw_file.otp_len) { -ath10k_warn (ar,"Not running otp, calibration will be incorrect (otp-data %pK otp_len %zd)!\n" , +ath10k_warn (ar,"Not running otp, calibration will be incorrect (otp-data %p otp_len %zd)!\n" , ar->running_fw->fw_file.otp_data, ar->running_fw->fw_file.otp_len);return 0 ;
drivers/net/wireless/ath/ath10k/htc.c +3 -3
@@ -34,7 +34,7 @@ static struct sk_buff *ath10k_htc_build_tx_ctrl_skb(void *ar) skb_cb =ATH10K_SKB_CB (skb);memset (skb_cb,0 ,sizeof (*skb_cb)); -ath10k_dbg (ar,ATH10K_DBG_HTC ,"%s: skb %pK\n" , __func__, skb); +ath10k_dbg (ar,ATH10K_DBG_HTC ,"%s: skb %p\n" , __func__, skb);return skb; }
@@ -54,7 +54,7 @@ void ath10k_htc_notify_tx_completion(struct ath10k_htc_ep *ep,struct ath10k *ar = ep->htc->ar;struct ath10k_htc_hdr *hdr; -ath10k_dbg (ar,ATH10K_DBG_HTC ,"%s: ep %d skb %pK\n" , __func__, +ath10k_dbg (ar,ATH10K_DBG_HTC ,"%s: ep %d skb %p\n" , __func__, ep->eid, skb);/* A corner case where the copy completion is reaching to host but still
@@ -515,7 +515,7 @@ void ath10k_htc_rx_completion_handler(struct ath10k *ar, struct sk_buff *skb)/* zero length packet with trailer data, just drop these */ goto out; -ath10k_dbg (ar,ATH10K_DBG_HTC ,"htc rx completion ep %d skb %pK\n" , +ath10k_dbg (ar,ATH10K_DBG_HTC ,"htc rx completion ep %d skb %p\n" , eid, skb); ep->ep_ops.ep_rx_complete (ar, skb);
drivers/net/wireless/ath/ath10k/htt_rx.c +1 -1
@@ -1373,7 +1373,7 @@ static void ath10k_process_rx(struct ath10k *ar, struct sk_buff *skb) } ath10k_dbg(ar, ATH10K_DBG_DATA, - "rx skb %pK len %u peer %pM %s %s sn %u %s%s%s%s%s%s %srate_idx %u vht_nss %u freq %u band %u flag 0x%x fcs-err %i mic-err %i amsdu-more %i\n", + "rx skb %p len %u peer %pM %s %s sn %u %s%s%s%s%s%s %srate_idx %u vht_nss %u freq %u band %u flag 0x%x fcs-err %i mic-err %i amsdu-more %i\n", skb, skb->len, ieee80211_get_SA(hdr),
drivers/net/wireless/ath/ath10k/mac.c +11 -11
@@ -875,7 +875,7 @@ static void ath10k_peer_map_cleanup(struct ath10k *ar, struct ath10k_peer *peer)*/ for (i =0 ; i <ARRAY_SIZE (ar->peer_map); i++) {if (ar->peer_map[i] == peer) { -ath10k_warn (ar,"removing stale peer_map entry for %pM (ptr %pK idx %d)\n" , +ath10k_warn (ar,"removing stale peer_map entry for %pM (ptr %p idx %d)\n" , peer->addr, peer, i); ar->peer_map[i] =NULL ; }
@@ -4063,7 +4063,7 @@ static int ath10k_mac_tx(struct ath10k *ar,if (!noque_offchan && info->flags &IEEE80211_TX_CTL_TX_OFFCHAN ) {if (!ath10k_mac_tx_frm_has_freq (ar)) { -ath10k_dbg (ar,ATH10K_DBG_MAC ,"mac queued offchannel skb %pK len %d\n" , +ath10k_dbg (ar,ATH10K_DBG_MAC ,"mac queued offchannel skb %p len %d\n" , skb, skb->len);skb_queue_tail (&ar->offchan_tx_queue, skb);
@@ -4126,7 +4126,7 @@ void ath10k_offchan_tx_work(struct work_struct *work)mutex_lock (&ar->conf_mutex); -ath10k_dbg (ar,ATH10K_DBG_MAC ,"mac offchannel skb %pK len %d\n" , +ath10k_dbg (ar,ATH10K_DBG_MAC ,"mac offchannel skb %p len %d\n" , skb, skb->len); hdr = (struct ieee80211_hdr *)skb->data;
@@ -4181,7 +4181,7 @@ void ath10k_offchan_tx_work(struct work_struct *work) time_left =wait_for_completion_timeout (&ar->offchan_tx_completed,3 *HZ );if (time_left ==0 ) -ath10k_warn (ar,"timed out waiting for offchannel skb %pK, len: %d\n" , +ath10k_warn (ar,"timed out waiting for offchannel skb %p, len: %d\n" , skb, skb->len);if (!peer && tmp_peer_created) {
@@ -7604,7 +7604,7 @@ static int ath10k_sta_state(struct ieee80211_hw *hw,* Existing station deletion. */ ath10k_dbg (ar,ATH10K_DBG_STA , -"mac vdev %d peer delete %pM sta %pK (sta gone)\n" , +"mac vdev %d peer delete %pM sta %p (sta gone)\n" , arvif->vdev_id, sta->addr, sta);if (sta->tdls) {
@@ -7631,7 +7631,7 @@ static int ath10k_sta_state(struct ieee80211_hw *hw,continue ;if (peer->sta == sta) { -ath10k_warn (ar,"found sta peer %pM (ptr %pK id %d) entry on vdev %i after it was supposedly removed\n" , +ath10k_warn (ar,"found sta peer %pM (ptr %p id %d) entry on vdev %i after it was supposedly removed\n" , sta->addr, peer, i, arvif->vdev_id); peer->sta =NULL ;
@@ -8811,7 +8811,7 @@ ath10k_mac_op_add_chanctx(struct ieee80211_hw *hw,struct ath10k *ar = hw->priv;ath10k_dbg (ar,ATH10K_DBG_MAC , -"mac chanctx add freq %u width %d ptr %pK\n" , +"mac chanctx add freq %u width %d ptr %p\n" , ctx->def.chan->center_freq, ctx->def.width, ctx);mutex_lock (&ar->conf_mutex);
@@ -8835,7 +8835,7 @@ ath10k_mac_op_remove_chanctx(struct ieee80211_hw *hw,struct ath10k *ar = hw->priv;ath10k_dbg (ar,ATH10K_DBG_MAC , -"mac chanctx remove freq %u width %d ptr %pK\n" , +"mac chanctx remove freq %u width %d ptr %p\n" , ctx->def.chan->center_freq, ctx->def.width, ctx);mutex_lock (&ar->conf_mutex);
@@ -8900,7 +8900,7 @@ ath10k_mac_op_change_chanctx(struct ieee80211_hw *hw,mutex_lock (&ar->conf_mutex);ath10k_dbg (ar,ATH10K_DBG_MAC , -"mac chanctx change freq %u width %d ptr %pK changed %x\n" , +"mac chanctx change freq %u width %d ptr %p changed %x\n" , ctx->def.chan->center_freq, ctx->def.width, ctx, changed);/* This shouldn't really happen because channel switching should use
@@ -8959,7 +8959,7 @@ ath10k_mac_op_assign_vif_chanctx(struct ieee80211_hw *hw,mutex_lock (&ar->conf_mutex);ath10k_dbg (ar,ATH10K_DBG_MAC , -"mac chanctx assign ptr %pK vdev_id %i\n" , +"mac chanctx assign ptr %p vdev_id %i\n" , ctx, arvif->vdev_id);if (WARN_ON (arvif->is_started)) {
@@ -9039,7 +9039,7 @@ ath10k_mac_op_unassign_vif_chanctx(struct ieee80211_hw *hw,mutex_lock (&ar->conf_mutex);ath10k_dbg (ar,ATH10K_DBG_MAC , -"mac chanctx unassign ptr %pK vdev_id %i\n" , +"mac chanctx unassign ptr %p vdev_id %i\n" , ctx, arvif->vdev_id);WARN_ON (!arvif->is_started);
drivers/net/wireless/ath/ath10k/pci.c +1 -1
@@ -3411,7 +3411,7 @@ static int ath10k_pci_claim(struct ath10k *ar) goto err_region; } -ath10k_dbg (ar,ATH10K_DBG_BOOT ,"boot pci_mem 0x%pK\n" , ar_pci->mem); +ath10k_dbg (ar,ATH10K_DBG_BOOT ,"boot pci_mem 0x%p\n" , ar_pci->mem);return 0 ; err_region:
drivers/net/wireless/ath/ath10k/testmode.c +2 -2
@@ -35,7 +35,7 @@ bool ath10k_tm_event_wmi(struct ath10k *ar, u32 cmd_id, struct sk_buff *skb)int ret;ath10k_dbg (ar,ATH10K_DBG_TESTMODE , -"testmode event wmi cmd_id %d skb %pK skb->len %d\n" , +"testmode event wmi cmd_id %d skb %p skb->len %d\n" , cmd_id, skb, skb->len);ath10k_dbg_dump (ar,ATH10K_DBG_TESTMODE ,NULL ,"" , skb->data, skb->len);
@@ -397,7 +397,7 @@ static int ath10k_tm_cmd_wmi(struct ath10k *ar, struct nlattr *tb[]) cmd_id =nla_get_u32 (tb[ATH10K_TM_ATTR_WMI_CMDID ]);ath10k_dbg (ar,ATH10K_DBG_TESTMODE , -"testmode cmd wmi cmd_id %d buf %pK buf_len %d\n" , +"testmode cmd wmi cmd_id %d buf %p buf_len %d\n" , cmd_id, buf, buf_len);ath10k_dbg_dump (ar,ATH10K_DBG_TESTMODE ,NULL ,"" , buf, buf_len);
drivers/net/wireless/ath/ath10k/txrx.c +1 -1
@@ -35,7 +35,7 @@ static void ath10k_report_offchan_tx(struct ath10k *ar, struct sk_buff *skb)complete (&ar->offchan_tx_completed); ar->offchan_tx_skb =NULL ;/* just for sanity */ -ath10k_dbg (ar,ATH10K_DBG_HTT ,"completed offchannel skb %pK\n" , skb); +ath10k_dbg (ar,ATH10K_DBG_HTT ,"completed offchannel skb %p\n" , skb); out:spin_unlock_bh (&ar->data_lock); }
drivers/net/wireless/ath/ath10k/usb.c +2 -2
@@ -131,7 +131,7 @@ static void ath10k_usb_recv_complete(struct urb *urb)int status =0 ;ath10k_dbg (ar,ATH10K_DBG_USB_BULK , -"usb recv pipe %d stat %d len %d urb 0x%pK\n" , +"usb recv pipe %d stat %d len %d urb 0x%p\n" , pipe->logical_pipe_num, urb->status, urb->actual_length, urb);
@@ -230,7 +230,7 @@ static void ath10k_usb_post_recv_transfers(struct ath10k *ar, ath10k_usb_recv_complete, urb_context);ath10k_dbg (ar,ATH10K_DBG_USB_BULK , -"usb bulk recv submit %d 0x%x ep 0x%2.2x len %d buf 0x%pK\n" , +"usb bulk recv submit %d 0x%x ep 0x%2.2x len %d buf 0x%p\n" , recv_pipe->logical_pipe_num, recv_pipe->usb_pipe_handle, recv_pipe->ep_address,ATH10K_USB_RX_BUFFER_SIZE , urb_context->skb);
drivers/net/wireless/ath/ath10k/wmi.c +2 -2
@@ -2029,7 +2029,7 @@ ath10k_wmi_op_gen_mgmt_tx(struct ath10k *ar, struct sk_buff *msdu)ether_addr_copy (cmd->hdr.peer_macaddr.addr,ieee80211_get_DA (hdr));memcpy (cmd->buf, msdu->data, msdu->len); -ath10k_dbg (ar,ATH10K_DBG_WMI ,"wmi mgmt tx skb %pK len %d ftype %02x stype %02x\n" , +ath10k_dbg (ar,ATH10K_DBG_WMI ,"wmi mgmt tx skb %p len %d ftype %02x stype %02x\n" , msdu, skb->len, fc &IEEE80211_FCTL_FTYPE , fc &IEEE80211_FCTL_STYPE );trace_ath10k_tx_hdr (ar, skb->data, skb->len);
@@ -2637,7 +2637,7 @@ int ath10k_wmi_event_mgmt_rx(struct ath10k *ar, struct sk_buff *skb) status->boottime_ns =ktime_get_boottime_ns ();ath10k_dbg (ar,ATH10K_DBG_MGMT , -"event mgmt rx skb %pK len %d ftype %02x stype %02x\n" , +"event mgmt rx skb %p len %d ftype %02x stype %02x\n" , skb, skb->len, fc &IEEE80211_FCTL_FTYPE , fc &IEEE80211_FCTL_STYPE );
Signature · 1 line
2.49.0
PATCH 2/4 wifi: ath11k: Don't use %pK through printk
In reply to Thomas WeißschuhIn 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.
--- drivers/net/wireless/ath/ath11k/testmode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/ath/ath11k/testmode.c +1 -1
@@ -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);
Signature · 1 line
2.49.0
PATCH 3/4 wifi: ath12k: Don't use %pK through printk
In reply to Thomas WeißschuhIn 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.
--- drivers/net/wireless/ath/ath12k/testmode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/ath12k/testmode.c +2 -2
@@ -97,7 +97,7 @@ void ath12k_tm_process_event(struct ath12k_base *ab, u32 cmd_id,u8 const *buf_pos;ath12k_dbg (ab,ATH12K_DBG_TESTMODE , -"testmode event wmi cmd_id %d ftm event msg %pK datalen %d\n" , +"testmode event wmi cmd_id %d ftm event msg %p datalen %d\n" , cmd_id, ftm_msg, length);ath12k_dbg_dump (ab,ATH12K_DBG_TESTMODE ,NULL ,"" , ftm_msg, length); pdev_id =DP_HW2SW_MACID (le32_to_cpu (ftm_msg->seg_hdr.pdev_id));
@@ -227,7 +227,7 @@ static int ath12k_tm_cmd_process_ftm(struct ath12k *ar, struct nlattr *tb[]) buf_len =nla_len (tb[ATH_TM_ATTR_DATA ]); cmd_id =WMI_PDEV_UTF_CMDID ;ath12k_dbg (ar->ab,ATH12K_DBG_TESTMODE , -"testmode cmd wmi cmd_id %d buf %pK buf_len %d\n" , +"testmode cmd wmi cmd_id %d buf %p buf_len %d\n" , cmd_id, buf, buf_len);ath12k_dbg_dump (ar->ab,ATH12K_DBG_TESTMODE ,NULL ,"" , buf, buf_len); bufpos = buf;
Signature · 1 line
2.49.0
PATCH 4/4 wifi: wcn36xx: Don't use %pK through printk
In reply to Thomas WeißschuhIn 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.
--- drivers/net/wireless/ath/wcn36xx/testmode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/ath/wcn36xx/testmode.c +1 -1
@@ -56,7 +56,7 @@ static int wcn36xx_tm_cmd_ptt(struct wcn36xx *wcn, struct ieee80211_vif *vif, msg = buf;wcn36xx_dbg (WCN36XX_DBG_TESTMODE , -"testmode cmd wmi msg_id 0x%04X msg_len %d buf %pK buf_len %d\n" , +"testmode cmd wmi msg_id 0x%04X msg_len %d buf %p buf_len %d\n" , msg->msg_id, msg->msg_body_length, buf, buf_len);
Signature · 1 line
2.49.0
Jeff Johnson
AppliedQuoted 9 lines · Thomas Weißschuh
In the past %pK was preferable to %p as it would not leak raw pointer values into the kernel log.
Since commitad67b74d2469("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 throughprintk(). They can still unintentionally leak raw pointers or acquire sleeping locks in atomic contexts.[...]
Applied, thanks!
[1/4] wifi: ath10k: Don't use %pK through printk
commit: 8add2b8d72722b60c749b559db2a2aef6c9def68
[2/4] wifi: ath11k: Don't use %pK through printk
commit: 27c57c84922ef1dc72a2ea3a5427cdbaadc9be44
[3/4] wifi: ath12k: Don't use %pK through printk
commit: 7e7f948c7d14ab5a6cfb26146a0d4734781903e3
[4/4] wifi: wcn36xx: Don't use %pK through printk
commit: 75f90ba47b2cda7de7a7bc1d099172516f6f96faBest regards,
Signature · 1 line
Jeff Johnson <[email protected]>