* [PATCH] mwifiex: don't print SSID to logs
@ 2021-02-25 2:44 Brian Norris
2021-04-17 17:47 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Brian Norris @ 2021-02-25 2:44 UTC (permalink / raw)
To: linux-wireless
Cc: linux-kernel, Ganapathi Bhat, Sharvari Harisangam,
Amitkumar Karwar, Xinming Hu, Brian Norris
There are a few reasons not to dump SSIDs as-is in kernel logs:
1) they're not guaranteed to be any particular text encoding (UTF-8,
ASCII, ...) in general
2) it's somewhat redundant; the BSSID should be enough to uniquely
identify the AP/STA to which we're connecting
3) BSSIDs have an easily-recognized format, whereas SSIDs do not (they
are free-form)
4) other common drivers (e.g., everything based on mac80211) get along
just fine by only including BSSIDs when logging state transitions
Additional notes on reason #3: this is important for the
privacy-conscious, especially when providing tools that convey
kernel logs on behalf of a user -- e.g., when reporting bugs. So for
example, it's easy to automatically filter logs for MAC addresses, but
it's much harder to filter SSIDs out of unstructured text.
Signed-off-by: Brian Norris <briannorris@chromium.org>
---
drivers/net/wireless/marvell/mwifiex/cfg80211.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
index a2ed268ce0da..0961f4a5e415 100644
--- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
@@ -2300,8 +2300,7 @@ mwifiex_cfg80211_assoc(struct mwifiex_private *priv, size_t ssid_len,
is_scanning_required = 1;
} else {
mwifiex_dbg(priv->adapter, MSG,
- "info: trying to associate to '%.*s' bssid %pM\n",
- req_ssid.ssid_len, (char *)req_ssid.ssid,
+ "info: trying to associate to bssid %pM\n",
bss->bssid);
memcpy(&priv->cfg_bssid, bss->bssid, ETH_ALEN);
break;
@@ -2378,8 +2377,7 @@ mwifiex_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
}
mwifiex_dbg(adapter, INFO,
- "info: Trying to associate to %.*s and bssid %pM\n",
- (int)sme->ssid_len, (char *)sme->ssid, sme->bssid);
+ "info: Trying to associate to bssid %pM\n", sme->bssid);
if (!mwifiex_stop_bg_scan(priv))
cfg80211_sched_scan_stopped_locked(priv->wdev.wiphy, 0);
@@ -2512,9 +2510,8 @@ mwifiex_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev,
goto done;
}
- mwifiex_dbg(priv->adapter, MSG,
- "info: trying to join to %.*s and bssid %pM\n",
- params->ssid_len, (char *)params->ssid, params->bssid);
+ mwifiex_dbg(priv->adapter, MSG, "info: trying to join to bssid %pM\n",
+ params->bssid);
mwifiex_set_ibss_params(priv, params);
--
2.30.0.617.g56c4b15f3c-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mwifiex: don't print SSID to logs
2021-02-25 2:44 [PATCH] mwifiex: don't print SSID to logs Brian Norris
@ 2021-04-17 17:47 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2021-04-17 17:47 UTC (permalink / raw)
To: Brian Norris
Cc: linux-wireless, linux-kernel, Ganapathi Bhat,
Sharvari Harisangam, Amitkumar Karwar, Xinming Hu, Brian Norris
Brian Norris <briannorris@chromium.org> wrote:
> There are a few reasons not to dump SSIDs as-is in kernel logs:
>
> 1) they're not guaranteed to be any particular text encoding (UTF-8,
> ASCII, ...) in general
> 2) it's somewhat redundant; the BSSID should be enough to uniquely
> identify the AP/STA to which we're connecting
> 3) BSSIDs have an easily-recognized format, whereas SSIDs do not (they
> are free-form)
> 4) other common drivers (e.g., everything based on mac80211) get along
> just fine by only including BSSIDs when logging state transitions
>
> Additional notes on reason #3: this is important for the
> privacy-conscious, especially when providing tools that convey
> kernel logs on behalf of a user -- e.g., when reporting bugs. So for
> example, it's easy to automatically filter logs for MAC addresses, but
> it's much harder to filter SSIDs out of unstructured text.
>
> Signed-off-by: Brian Norris <briannorris@chromium.org>
Patch applied to wireless-drivers-next.git, thanks.
d23a96220353 mwifiex: don't print SSID to logs
--
https://patchwork.kernel.org/project/linux-wireless/patch/20210225024454.4106485-1-briannorris@chromium.org/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-04-17 17:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-25 2:44 [PATCH] mwifiex: don't print SSID to logs Brian Norris
2021-04-17 17:47 ` Kalle Valo
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).