usb/gadget: Add driver for Aspeed SoC virtual hub
PATCH v6 2/2 usb/gadget: Add driver for Aspeed SoC virtual hub
Quoted 18 lines · Benjamin Herrenschmidt
Quoted 9 lines · Benjamin Herrenschmidt
Quoted 4 lines
In function ‘memcpy’,
inlined from ‘ast_vhub_rep_desc’ atdrivers/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:
Quoted 7 lines
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...
Quoted 8 lines
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_64build 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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html