* [PATCH] mac80211: remove mic_fail_no_key label
@ 2017-08-02 9:04 Stanislaw Gruszka
2017-08-02 9:10 ` Arend van Spriel
0 siblings, 1 reply; 4+ messages in thread
From: Stanislaw Gruszka @ 2017-08-02 9:04 UTC (permalink / raw)
To: linux-wireless; +Cc: Michael Skeffington
For historic reasons we have separate cases for mic_fail and
mic_fail_no_key. But with current code we can merge those cases,
as we already have NULL key check since:
commit a66b98db570a638afd909459e1e6bfa272344bd3
Author: Arik Nemtsov <arik@wizery.com>
Date: Thu Jun 23 00:00:24 2011 +0300
mac80211: fix rx->key NULL dereference during mic failure
Patch makes the rx->key->u.tkip.mic_failures statistics
increase on all cases when RX_FLAG_MMIC_ERROR is set.
Reported-by: Michael Skeffington <mike@astro.ai>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
net/mac80211/wpa.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/net/mac80211/wpa.c b/net/mac80211/wpa.c
index 0d722ea..98fd9a0 100644
--- a/net/mac80211/wpa.c
+++ b/net/mac80211/wpa.c
@@ -111,7 +111,7 @@
*/
if (status->flag & (RX_FLAG_MMIC_STRIPPED | RX_FLAG_IV_STRIPPED)) {
if (status->flag & RX_FLAG_MMIC_ERROR)
- goto mic_fail_no_key;
+ goto mic_fail;
if (!(status->flag & RX_FLAG_IV_STRIPPED) && rx->key &&
rx->key->conf.cipher == WLAN_CIPHER_SUITE_TKIP)
@@ -170,7 +170,6 @@
mic_fail:
rx->key->u.tkip.mic_failures++;
-mic_fail_no_key:
/*
* In some cases the key can be unset - e.g. a multicast packet, in
* a driver that supports HW encryption. Send up the key idx only if
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] mac80211: remove mic_fail_no_key label
2017-08-02 9:04 [PATCH] mac80211: remove mic_fail_no_key label Stanislaw Gruszka
@ 2017-08-02 9:10 ` Arend van Spriel
2017-08-02 9:35 ` Stanislaw Gruszka
0 siblings, 1 reply; 4+ messages in thread
From: Arend van Spriel @ 2017-08-02 9:10 UTC (permalink / raw)
To: Stanislaw Gruszka; +Cc: linux-wireless, Michael Skeffington
On 8/2/2017 11:04 AM, Stanislaw Gruszka wrote:
> For historic reasons we have separate cases for mic_fail and
> mic_fail_no_key. But with current code we can merge those cases,
> as we already have NULL key check since:
>
> commit a66b98db570a638afd909459e1e6bfa272344bd3
> Author: Arik Nemtsov <arik@wizery.com>
> Date: Thu Jun 23 00:00:24 2011 +0300
>
> mac80211: fix rx->key NULL dereference during mic failure
Maybe better to use:
... since commit a66b98db570a ("mac80211: fix rx->key NULL dereference
during mic failure").
as it is the preferred method to reference git commits.
Regards,
Arend
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mac80211: remove mic_fail_no_key label
2017-08-02 9:10 ` Arend van Spriel
@ 2017-08-02 9:35 ` Stanislaw Gruszka
2017-08-02 10:07 ` Kalle Valo
0 siblings, 1 reply; 4+ messages in thread
From: Stanislaw Gruszka @ 2017-08-02 9:35 UTC (permalink / raw)
To: Arend van Spriel; +Cc: linux-wireless, Michael Skeffington
On Wed, Aug 02, 2017 at 11:10:11AM +0200, Arend van Spriel wrote:
> On 8/2/2017 11:04 AM, Stanislaw Gruszka wrote:
> >For historic reasons we have separate cases for mic_fail and
> >mic_fail_no_key. But with current code we can merge those cases,
> >as we already have NULL key check since:
> >
> >commit a66b98db570a638afd909459e1e6bfa272344bd3
> >Author: Arik Nemtsov <arik@wizery.com>
> >Date: Thu Jun 23 00:00:24 2011 +0300
> >
> > mac80211: fix rx->key NULL dereference during mic failure
>
> Maybe better to use:
> ... since commit a66b98db570a ("mac80211: fix rx->key NULL
> dereference during mic failure").
>
> as it is the preferred method to reference git commits.
Is easier for me to just copy-paste commit in form the git log/show
command provides, so I use that form. Is there tool or git log/show
option to get commit log in the preferred form, so I do not have to
change it manually?
Thanks
Stanislaw
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mac80211: remove mic_fail_no_key label
2017-08-02 9:35 ` Stanislaw Gruszka
@ 2017-08-02 10:07 ` Kalle Valo
0 siblings, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2017-08-02 10:07 UTC (permalink / raw)
To: Stanislaw Gruszka; +Cc: Arend van Spriel, linux-wireless, Michael Skeffington
Stanislaw Gruszka <sgruszka@redhat.com> writes:
> On Wed, Aug 02, 2017 at 11:10:11AM +0200, Arend van Spriel wrote:
>> On 8/2/2017 11:04 AM, Stanislaw Gruszka wrote:
>> >For historic reasons we have separate cases for mic_fail and
>> >mic_fail_no_key. But with current code we can merge those cases,
>> >as we already have NULL key check since:
>> >
>> >commit a66b98db570a638afd909459e1e6bfa272344bd3
>> >Author: Arik Nemtsov <arik@wizery.com>
>> >Date: Thu Jun 23 00:00:24 2011 +0300
>> >
>> > mac80211: fix rx->key NULL dereference during mic failure
>>
>> Maybe better to use:
>> ... since commit a66b98db570a ("mac80211: fix rx->key NULL
>> dereference during mic failure").
>>
>> as it is the preferred method to reference git commits.
>
> Is easier for me to just copy-paste commit in form the git log/show
> command provides, so I use that form. Is there tool or git log/show
> option to get commit log in the preferred form, so I do not have to
> change it manually?
I do it like this:
$ git show --format=fixes a66b98db570a638afd909459e1e6bfa272344bd3 | head -1
Fixes: a66b98db570a ("mac80211: fix rx->key NULL dereference during mic failure")
How to configure it is documented in SubmittingPatches:
https://www.kernel.org/doc/html/latest/process/submitting-patches.html#describe-your-changes
--
Kalle Valo
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-08-02 10:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-02 9:04 [PATCH] mac80211: remove mic_fail_no_key label Stanislaw Gruszka
2017-08-02 9:10 ` Arend van Spriel
2017-08-02 9:35 ` Stanislaw Gruszka
2017-08-02 10:07 ` 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).