public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Albert ARIBAUD <albert.u.boot@aribaud.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] usb: fix unaligned access in device_qual()
Date: Thu, 4 Jul 2013 13:50:27 +0200	[thread overview]
Message-ID: <20130704135027.1fa89a27@lilith> (raw)
In-Reply-To: <201307031530.20299.marex@denx.de>

Hi Marek,

On Wed, 3 Jul 2013 15:30:20 +0200, Marek Vasut <marex@denx.de> wrote:

> Dear Albert ARIBAUD,
> 
> > Hi Marek,
> > 
> > On Thu, 27 Jun 2013 15:23:33 +0200, Marek Vasut <marex@denx.de> wrote:
> > > Hello Albert,
> > > 
> > > > Hi Marek,
> > > > 
> > > > On Thu, 27 Jun 2013 13:26:39 +0200, Marek Vasut <marex@denx.de> wrote:
> > > > > Dear Heiko Schocher,
> > > > > 
> > > > > > while playing with dfu, I tapped in an unaligned access
> > > > > > when doing on the host side a "lsusb -d [vendornr]: -v"
> > > > > 
> > > > > > I get on the board:
> > > > > Applied, thanks
> > > > 
> > > > Now we have console log output in commit messages. :(
> > > 
> > > Don't be sad, I will buy you a tartelette ;)
> > 
> > Actually the sad part is that the patch in itself is bad: the actual
> > alignment boundary should have been 16 bit, not one cacheline. Also,
> > the issue could / should have been solved by reordering the fields
> > rather than using an attribute.
> 
> Why 16 bit? I think cacheline alignment here makes sense if the descriptor is to 
> be flush()'d from dcache.

If it is then it should be moved out of the struct it currently lives
in, in order to avoid a big alignment gap, and replaced with a pointer.
Also, the commit message would then be wrong...

> > And I'm not going to eat a tartelette when I'm about 30 minutes from
> > going to a restaurant (admittedly small, but undoubtedly near).
> 
> You should have one to survive the journey ;-)

I'm more addicted to the raw stuff. No one should need anything beyond
90+%-cocoa chocolate.

> Best regards,
> Marek Vasut

Amicalement,
-- 
Albert.

  reply	other threads:[~2013-07-04 11:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-27  8:04 [U-Boot] [PATCH] usb: fix unaligned access in device_qual() Heiko Schocher
2013-06-27 10:11 ` Albert ARIBAUD
2013-06-27 10:26   ` Stefan Roese
2013-06-27 11:25     ` Marek Vasut
2013-06-27 12:06     ` Albert ARIBAUD
2013-06-27 11:26 ` Marek Vasut
2013-06-27 12:06   ` Albert ARIBAUD
2013-06-27 13:23     ` Marek Vasut
2013-06-27 16:52       ` Albert ARIBAUD
2013-07-03 13:30         ` Marek Vasut
2013-07-04 11:50           ` Albert ARIBAUD [this message]
2013-07-08 13:06             ` Marek Vasut

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=20130704135027.1fa89a27@lilith \
    --to=albert.u.boot@aribaud.net \
    --cc=u-boot@lists.denx.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox