All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Felipe Balbi <balbi@kernel.org>, linux-usb@vger.kernel.org
Cc: Greg KH <greg@kroah.com>, Joel Stanley <joel@jms.id.au>,
	Andrew Jeffery <andrew@aj.id.au>
Subject: [v6,2/2] usb/gadget: Add driver for Aspeed SoC virtual hub
Date: Mon, 26 Mar 2018 11:25:44 +1100	[thread overview]
Message-ID: <1522023944.16434.386.camel@kernel.crashing.org> (raw)

On Sun, 2018-03-25 at 12:25 +1100, Benjamin Herrenschmidt wrote:
> On Sat, 2018-03-24 at 12:19 +1100, Benjamin Herrenschmidt wrote:
> > > In function ‘memcpy’,
> > >      inlined from ‘ast_vhub_rep_desc’ at drivers/usb/gadget/udc/aspeed-vhub/hub.c:276:2:
> > > ./include/linux/string.h:341:4: error: call to ‘__read_overflow2’ declared with attribute error: detected read beyond size of object passed as 2nd parameter
> > >      __read_overflow2();
> > 
> > That's really odd... some new gcc thing ? I don't understand where the
> > overflow would occur... Do you see anything ? Unless my brain is acting
> > up, there is no overflow and gcc is bogus:
> > 
> > I just hand counted the size of the 3 possible structures "desc" can
> > point to and compared to the constants used for the size, and it all
> > fits.
> > 
> > Unfortunately, I can't seem to reproduce with the version of cross
> > compiler I'm using here, so I'm not sure what construct to use to
> > make gcc stop erroneously barfing...
> 
> So I've tried with 2 ARM cross compilers (gcc 6.3.0 built by buildroot
> and 7.2.1 from Fedora 27) and couldn't reproduce this.
> 
> I also tried an x86_64 build with that driver with 7.3.1 20180130 (from
> Fedora 27) and here too, couldn't reproduce the problem.
> 
> What toolchain precisely are you using ? It really smells like a gcc
> bug to me...

Today Joel tried on a 7.3.0 from Ubuntu, still no error. We tried a
gcc 8, and while we didn't hit that error, it did spew a couple
of warnings, one of them being an actual typo/bug so I'll send a
v7 today, however, nothing like what you reported.

Cheers,
Ben.
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

             reply	other threads:[~2018-03-26  0:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-26  0:25 Benjamin Herrenschmidt [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-03-25  1:25 [v6,2/2] usb/gadget: Add driver for Aspeed SoC virtual hub Benjamin Herrenschmidt
2018-03-24  1:19 Benjamin Herrenschmidt
2018-03-23  7:54 Felipe Balbi
2018-03-23  2:44 Benjamin Herrenschmidt

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=1522023944.16434.386.camel@kernel.crashing.org \
    --to=benh@kernel.crashing.org \
    --cc=andrew@aj.id.au \
    --cc=balbi@kernel.org \
    --cc=greg@kroah.com \
    --cc=joel@jms.id.au \
    --cc=linux-usb@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 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.