linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Guo Wei Lim <limguowei@gmail.com>, linux-wireless@vger.kernel.org
Subject: Re: Unaligned Memory Access on mesh_*.c files
Date: Sat, 10 Aug 2019 10:50:18 +0200	[thread overview]
Message-ID: <64EA957F-B24A-4B1C-AAC0-B51790F47E9E@sipsolutions.net> (raw)
In-Reply-To: <CAJSNYx0k7k8RyRT6siC1xv_0xqf3ggKSwNp7sp9c7y-kOgSeAg@mail.gmail.com> (sfid-20190810_061249_170256_0906C3BF)



On August 10, 2019 6:07:15 AM GMT+02:00, Guo Wei Lim <limguowei@gmail.com> wrote:
>I have traced a large number of unaligned memory access on mips cpu
>due to ether_addr_equal(), is_multicast_ether_addr(),
>is_broadcast_ether_addr() being called on odd addresses.
>
>Even though the values are u8, the inlines in etherdevice.h converts
>them to u16 causing the issue.
>
>I can replace ether_addr_equal() with ether_addr_equal_unaligned() but
>it doesn't seem like a proper fix. Anyone has better ideas?

Can you say which places cause this,and which driver you're using? Also, I guess the type of frame and what address format it has would be good to know. 

If you aren't also hitting the warning in rx.c about alignment though, it might be that we do in fact need to use code not expecting alignment.

johannes
-- 
Sent from my phone. 

  reply	other threads:[~2019-08-10  8:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-10  4:07 Unaligned Memory Access on mesh_*.c files Guo Wei Lim
2019-08-10  8:50 ` Johannes Berg [this message]
2019-08-10 10:28   ` Guo Wei Lim
2019-08-21  7:39     ` 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=64EA957F-B24A-4B1C-AAC0-B51790F47E9E@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=limguowei@gmail.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).