Re: [PATCH v6 2/2] usb/gadget: Add driver for Aspeed SoC virtual hub

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux