From: Kalle Valo <kvalo@codeaurora.org>
To: Petri Gynther <pgynther@google.com>
Cc: linux-wireless@vger.kernel.org, davem@davemloft.net,
joe@perches.com, akarwar@marvell.com,
Petri Gynther <pgynther@google.com>
Subject: Re: [2/2] mwifiex: fix unaligned read in mwifiex_config_scan()
Date: Mon, 26 Sep 2016 11:19:12 +0000 (UTC) [thread overview]
Message-ID: <20160926111912.AE5BD6155C@smtp.codeaurora.org> (raw)
In-Reply-To: <1471057200-58166-2-git-send-email-pgynther@google.com>
Petri Gynther <pgynther@google.com> wrote:
> $ iwconfig mlan0 essid MySSID
> [ 36.930000] Path: /sbin/iwconfig
> [ 36.930000] CPU: 0 PID: 203 Comm: iwconfig Not tainted 4.7.0 #2
> [ 36.940000] task: 866f83a0 ti: 866a6000 task.ti: 866a6000
> [ 36.940000]
> [ECR ]: 0x00230400 => Misaligned r/w from 0x8677f403
> [ 36.960000] [EFA ]: 0x8677f403
> [ 36.960000] [BLINK ]: mwifiex_scan_networks+0x17a/0x198c [mwifiex]
> [ 36.960000] [ERET ]: mwifiex_scan_networks+0x18a/0x198c [mwifiex]
> [ 36.980000] [STAT32]: 0x00000206 : K E2 E1
> [ 36.980000] BTA: 0x700736e2 SP: 0x866a7d0c FP: 0x5faddc84
> [ 37.000000] LPS: 0x806a37ec LPE: 0x806a37fa LPC: 0x00000000
> [ 37.000000] r00: 0x8677f401 r01: 0x8668aa08 r02: 0x00000001
> r03: 0x00000000 r04: 0x8668b600 r05: 0x8677f406
> r06: 0x8702b600 r07: 0x00000000 r08: 0x8702b600
> r09: 0x00000000 r10: 0x870b3b00 r11: 0x00000000
> r12: 0x00000000
> [ 37.040000]
> [ 37.040000] Stack Trace:
> [ 37.040000] mwifiex_scan_networks+0x18a/0x198c [mwifiex]
>
> Root cause:
> mwifiex driver calls is_zero_ether_addr() against byte-aligned address:
>
> drivers/net/wireless/marvell/mwifiex/fw.h:
> struct mwifiex_scan_cmd_config {
> /*
> * BSS mode to be sent in the firmware command
> */
> u8 bss_mode;
>
> /* Specific BSSID used to filter scan results in the firmware */
> u8 specific_bssid[ETH_ALEN];
>
> ...
> } __packed;
>
> drivers/net/wireless/marvell/mwifiex/scan.c:
> mwifiex_config_scan(..., struct mwifiex_scan_cmd_config *scan_cfg_out, ...)
> ...
> if (adapter->ext_scan &&
> !is_zero_ether_addr(scan_cfg_out->specific_bssid)) {
> ...
> }
>
> Since firmware-related struct mwifiex_scan_cmd_config cannot be changed,
> we need to use the new function is_zero_ether_addr_unaligned() here.
>
> This is v2 of the original patch:
> [PATCH] Modify is_zero_ether_addr() to handle byte-aligned addresses
>
> Per Joe's suggestion -- instead of modifying is_zero_ether_addr() --
> add is_zero_ether_addr_unaligned() and use it where needed.
>
> Cc: Kalle Valo <kvalo@codeaurora.org>
> Cc: David S. Miller <davem@davemloft.net>
> Cc: Joe Perches <joe@perches.com>
> Cc: Amitkumar Karwar <akarwar@marvell.com>
> Signed-off-by: Petri Gynther <pgynther@google.com>
Patch set to Rejected.
Reason: As is_zero_ether_addr_unaligned() patch is not applied I can't take
this. Please resend if that patch is accepted.
--
https://patchwork.kernel.org/patch/9306999/
Documentation about submitting wireless patches and checking status
from patchwork:
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
next prev parent reply other threads:[~2016-09-26 11:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-13 2:59 [PATCH 1/2] etherdevice: add is_zero_ether_addr_unaligned() Petri Gynther
2016-08-13 3:00 ` [PATCH 2/2] mwifiex: fix unaligned read in mwifiex_config_scan() Petri Gynther
2016-08-16 17:47 ` Petri Gynther
2016-09-08 16:10 ` Amitkumar Karwar
2016-09-08 18:01 ` Kalle Valo
2016-09-26 11:19 ` Kalle Valo [this message]
2016-08-13 4:11 ` [PATCH 1/2] etherdevice: add is_zero_ether_addr_unaligned() Joe Perches
2016-08-13 4:40 ` Petri Gynther
2016-08-13 4:59 ` Joe Perches
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=20160926111912.AE5BD6155C@smtp.codeaurora.org \
--to=kvalo@codeaurora.org \
--cc=akarwar@marvell.com \
--cc=davem@davemloft.net \
--cc=joe@perches.com \
--cc=linux-wireless@vger.kernel.org \
--cc=pgynther@google.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.