All of lore.kernel.org
 help / color / mirror / Atom feed
From: "John W. Linville" <linville@tuxdriver.com>
To: castet.matthieu@free.fr
Cc: Michael Buesch <mb@bu3sch.de>,
	linux-wireless@vger.kernel.org, bcm43xx-dev@lists.berlios.de
Subject: Re: [PATCH] b43: Fix possible unaligned u32 access
Date: Fri, 5 Jun 2009 15:08:56 -0400	[thread overview]
Message-ID: <20090605190855.GC7361@tuxdriver.com> (raw)
In-Reply-To: <20090605185307.GB7361@tuxdriver.com>

On Fri, Jun 05, 2009 at 02:53:07PM -0400, John W. Linville wrote:
> On Fri, Jun 05, 2009 at 05:03:57PM +0200, castet.matthieu@free.fr wrote:
> > Quoting "John W. Linville" <linville@tuxdriver.com>:
> > 
> > > On Thu, Jun 04, 2009 at 11:18:33PM +0200, Michael Buesch wrote:
> > > > From: Matthieu CASTET <castet.matthieu@free.fr>
> > > >
> > > > Fix possible unaligned u32 access in b43_generate_plcp_hdr().
> > > > Unaligned data is read/write with a u32 pointer instead of using the
> > > > packed structure. Some versions of gcc ignore the "packed" attribute, if
> > > the
> > > > structure element is accessed through a local pointer.
> > > >
> > > > Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr>
> > > > Signed-off-by: Michael Buesch <mb@bu3sch.de>
> > >
> > > That seems pretty brain-dead...can you cite a source for this
> > > information?
> > The test I did with the attached test case in the first post.
> 
> Link?
> 
> > I don't see why gcc should propagate packed structure info to assignment.
> > That will be impossible to handle (think of passing it to function parameter).
> 
> Perhaps this is obvious to you, but it isn't to me.

OK, I got an explanation from Kyle McMartin that I grok...

> > 
> > > The patch seems like a no-op...
> > At least the code produced on mips is different.
> 
> Then why aren't you trying to get the mips gcc guys to fix it?

Still worth wondering...anyway, the patch is fine -- I just didn't
grok the explanation.

John
-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

  reply	other threads:[~2009-06-05 19:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-04 21:18 [PATCH] b43: Fix possible unaligned u32 access Michael Buesch
2009-06-05 12:25 ` John W. Linville
2009-06-05 15:03   ` castet.matthieu
2009-06-05 18:53     ` John W. Linville
2009-06-05 19:08       ` John W. Linville [this message]
2009-06-05 17:29   ` Michael Buesch
2009-06-05 18:50     ` John W. Linville
2009-06-05 19:03       ` Michael Buesch
2009-06-06  1:03       ` David Miller
2009-06-06  1:00   ` David Miller

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=20090605190855.GC7361@tuxdriver.com \
    --to=linville@tuxdriver.com \
    --cc=bcm43xx-dev@lists.berlios.de \
    --cc=castet.matthieu@free.fr \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mb@bu3sch.de \
    /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.