From: Daniel Drake <dsd@gentoo.org>
To: linux-wireless@vger.kernel.org,
David Miller <davem@davemloft.net>,
Johannes Berg <johannes@sipsolutions.net>,
Daniel Drake <dsd@gentoo.org>,
jt@hpl.hp.com
Subject: Re: zd1211rw (2.6.22 sparc64): unaligned access (do_rx)
Date: Wed, 21 Nov 2007 14:23:52 +0000 [thread overview]
Message-ID: <47443F78.60701@gentoo.org> (raw)
In-Reply-To: <474432E8.90304@hotmail.com>
[-- Attachment #1: Type: text/plain, Size: 2151 bytes --]
Shaddy Baddah wrote:
> Interestingly, after performing the above actions, I am now getting
> additional log messages:
>
> SoftMAC: Open Authentication completed with GG:GG:GG:GG:GG:GG
> Kernel unaligned access at TPC[100df410]
> ieee80211softmac_handle_assoc_response]
> Kernel unaligned access at TPC[100df548]
> ieee80211softmac_handle_assoc_response]
This one doesn't include any offsets, did the line get cut off?
I'm spoilt by the luxuries of i386/x86_64 and am not clear on exactly
what forms an unaligned access. I am wondering if this line is causing it:
network = ieee80211softmac_get_network_by_bssid_locked(mac,
resp->header.addr3);
addr3 is offset 20 bytes in the struct and is 6 bytes long. Because 20
is not evenly divisible by 6 does that make it an unaligned access?
Is there any documentation I can read on this topic? In my current
uneducated state I'm likely to write further code with these problems...
> ADDRCONF(NETDEV_CHANGE): eth2: link becomes ready
> Kernel unaligned access at TPC[100d03ec] ieee80211_copy_snap+0x74/0x78
> [ieee802]
> Kernel unaligned access at TPC[100d03ec] ieee80211_copy_snap+0x74/0x78
> [ieee802]
> Kernel unaligned access at TPC[100d03ec] ieee80211_copy_snap+0x74/0x78
> [ieee802]
> Kernel unaligned access at TPC[100d03ec] ieee80211_copy_snap+0x74/0x78
> [ieee802]
> Kernel unaligned access at TPC[100d03ec] ieee80211_copy_snap+0x74/0x78
> [ieee802]
This one should be fixed by the attached patch. Sorry for not sending it
sooner, the contributor has not yet solved all problems and I was
waiting to see if more patches would come.
> Kernel unaligned access at TPC[100ee624] do_rx+0x394/0x5ec [zd1211rw]
> Kernel unaligned access at TPC[100ee62c] do_rx+0x39c/0x5ec [zd1211rw]
> Kernel unaligned access at TPC[100ee638] do_rx+0x3a8/0x5ec [zd1211rw]
> Kernel unaligned access at TPC[100ee668] do_rx+0x3d8/0x5ec [zd1211rw]
> Kernel unaligned access at TPC[100ee670] do_rx+0x3e0/0x5ec [zd1211rw]
These might be solved by the patch David sent to the list a few days ago
(thanks!). Have you applied it? If you can confirm it helps I will send
it up through John.
Thanks,
Daniel
[-- Attachment #2: ieee80211-copy-snap.patch --]
[-- Type: text/plain, Size: 645 bytes --]
[PATCH] ieee80211: fix unaligned access in ieee80211_copy_snap
From: Daniel Drake <dsd@gentoo.org>
Based on a patch from Jun Sun.
Signed-off-by: Daniel Drake <dsd@gentoo.org>
diff --git a/net/ieee80211/ieee80211_tx.c b/net/ieee80211/ieee80211_tx.c
index a4c3c51..6d06f13 100644
--- a/net/ieee80211/ieee80211_tx.c
+++ b/net/ieee80211/ieee80211_tx.c
@@ -144,7 +144,8 @@ static int ieee80211_copy_snap(u8 * data, u16 h_proto)
snap->oui[1] = oui[1];
snap->oui[2] = oui[2];
- *(u16 *) (data + SNAP_SIZE) = htons(h_proto);
+ h_proto = htons(h_proto);
+ memcpy(data + SNAP_SIZE, &h_proto, sizeof(u16));
return SNAP_SIZE + sizeof(u16);
}
next prev parent reply other threads:[~2007-11-21 14:24 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-19 0:56 zd1211rw (2.6.22 sparc64): unaligned access (do_rx) Shaddy Baddah
2007-11-19 8:27 ` David Miller
2007-11-19 12:11 ` Shaddy Baddah
2007-11-19 12:19 ` David Miller
2007-11-21 13:08 ` Shaddy Baddah
2007-11-19 15:03 ` Johannes Berg
2007-11-19 18:04 ` Jean Tourrilhes
2007-11-21 13:18 ` Shaddy Baddah
2007-11-21 13:30 ` Shaddy Baddah
2007-11-21 14:23 ` Daniel Drake [this message]
2007-11-21 18:05 ` Kyle McMartin
2007-11-30 5:31 ` Shaddy Baddah
2007-11-21 14:33 ` Daniel Drake
2007-11-21 18:44 ` Jean Tourrilhes
2007-11-30 3:42 ` Shaddy Baddah
2007-11-30 20:21 ` Jean Tourrilhes
2007-12-04 0:01 ` Jean Tourrilhes
[not found] ` <4756AABC.3000204@hotmail.com>
[not found] ` <20071205215600.GA28349@bougret.hpl.hp.com>
2007-12-05 23:25 ` Shaddy Baddah
2007-12-05 23:40 ` Jean Tourrilhes
2007-12-06 21:59 ` Jean Tourrilhes
2007-12-06 2:36 ` David Miller
2007-12-06 21:25 ` Jean Tourrilhes
2007-12-06 21:33 ` Michael Buesch
2007-12-06 21:43 ` Jean Tourrilhes
2007-12-07 3:52 ` David Miller
2007-12-07 11:35 ` Michael Buesch
2007-12-07 12:34 ` David Miller
2007-12-07 13:36 ` Michael Buesch
2007-12-07 14:48 ` Daniel Drake
2007-12-08 1:36 ` David Miller
2007-12-08 1:35 ` David Miller
2007-12-08 11:21 ` Michael Buesch
2007-12-08 12:54 ` Daniel Drake
2007-12-07 3:50 ` David Miller
2007-12-07 3:49 ` David Miller
2007-11-19 22:20 ` David Miller
2007-11-19 22:35 ` Jean Tourrilhes
2007-11-20 7:42 ` David Miller
2007-11-20 17:43 ` Jean Tourrilhes
2007-11-20 21:56 ` David Miller
2007-11-20 12:40 ` Johannes Berg
2007-11-20 12:46 ` David Miller
[not found] ` <20071120180016.GC1480@bougret.hpl.hp.com>
2007-11-20 21:58 ` David Miller
2007-11-20 22:08 ` John W. Linville
2007-11-20 22:38 ` David Miller
2007-11-20 22:16 ` Jean Tourrilhes
2007-11-20 22:41 ` David Miller
[not found] ` <20071120180601.GA2019@bougret.hpl.hp.com>
[not found] ` <47443430.3010504@hotmail.com>
2007-11-21 19:06 ` Jean Tourrilhes
2007-11-20 17:38 ` Jean Tourrilhes
2007-11-20 12:34 ` David Miller
2007-11-20 13:15 ` Johannes Berg
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=47443F78.60701@gentoo.org \
--to=dsd@gentoo.org \
--cc=davem@davemloft.net \
--cc=johannes@sipsolutions.net \
--cc=jt@hpl.hp.com \
--cc=linux-wireless@vger.kernel.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).