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

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

 



Hi Benjamin,

I love your patch! Yet something to improve:

[auto build test ERROR on v4.16-rc4]
[also build test ERROR on next-20180316]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Benjamin-Herrenschmidt/usb-gadget-Add-an-EP-dispose-callback-for-EP-lifetime-tracking/20180317-004216
config: i386-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   In file included from arch/x86/include/asm/page_32.h:35:0,
                    from arch/x86/include/asm/page.h:14,
                    from arch/x86/include/asm/thread_info.h:12,
                    from include/linux/thread_info.h:38,
                    from arch/x86/include/asm/preempt.h:7,
                    from include/linux/preempt.h:81,
                    from include/linux/spinlock.h:51,
                    from include/linux/seqlock.h:36,
                    from include/linux/time.h:6,
                    from include/linux/stat.h:19,
                    from include/linux/module.h:10,
                    from drivers/usb/gadget/udc/aspeed-vhub/hub.c:16:
   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();
       ^~~~~~~~~~~~~~~~~~

vim +/__read_overflow2 +341 include/linux/string.h

6974f0c4 Daniel Micay 2017-07-12  332  
6974f0c4 Daniel Micay 2017-07-12  333  __FORTIFY_INLINE void *memcpy(void *p, const void *q, __kernel_size_t size)
6974f0c4 Daniel Micay 2017-07-12  334  {
6974f0c4 Daniel Micay 2017-07-12  335  	size_t p_size = __builtin_object_size(p, 0);
6974f0c4 Daniel Micay 2017-07-12  336  	size_t q_size = __builtin_object_size(q, 0);
6974f0c4 Daniel Micay 2017-07-12  337  	if (__builtin_constant_p(size)) {
6974f0c4 Daniel Micay 2017-07-12  338  		if (p_size < size)
6974f0c4 Daniel Micay 2017-07-12  339  			__write_overflow();
6974f0c4 Daniel Micay 2017-07-12  340  		if (q_size < size)
6974f0c4 Daniel Micay 2017-07-12 @341  			__read_overflow2();
6974f0c4 Daniel Micay 2017-07-12  342  	}
6974f0c4 Daniel Micay 2017-07-12  343  	if (p_size < size || q_size < size)
6974f0c4 Daniel Micay 2017-07-12  344  		fortify_panic(__func__);
6974f0c4 Daniel Micay 2017-07-12  345  	return __builtin_memcpy(p, q, size);
6974f0c4 Daniel Micay 2017-07-12  346  }
6974f0c4 Daniel Micay 2017-07-12  347  

:::::: The code at line 341 was first introduced by commit
:::::: 6974f0c4555e285ab217cee58b6e874f776ff409 include/linux/string.h: add the option of fortified string.h functions

:::::: TO: Daniel Micay <danielmicay@xxxxxxxxx>
:::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


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

  Powered by Linux