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 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...

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