All of lore.kernel.org
 help / color / mirror / Atom feed
* include/linux/string.h:355:4: error: call to '__read_overflow2' declared with attribute error: detected read beyond size of object passed as 2nd parameter
@ 2019-12-26  8:56 ` kbuild test robot
  0 siblings, 0 replies; 4+ messages in thread
From: kbuild test robot @ 2019-12-26  8:56 UTC (permalink / raw)
  To: Dmitry Korotin; +Cc: kbuild-all, linux-kernel, Paul Burton

[-- Attachment #1: Type: text/plain, Size: 3581 bytes --]

Hi Dmitry,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   46cf053efec6a3a5f343fead837777efe8252a46
commit: a2ecb233e3e759730269b31b7d8add823cf196ba mips: Kconfig: Add ARCH_HAS_FORTIFY_SOURCE
date:   3 months ago
config: mips-randconfig-a001-20191226 (attached as .config)
compiler: mips64el-linux-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout a2ecb233e3e759730269b31b7d8add823cf196ba
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=mips 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   In file included from include/linux/bitmap.h:9:0,
                    from include/linux/cpumask.h:12,
                    from arch/mips/include/asm/processor.h:15,
                    from arch/mips/include/asm/thread_info.h:16,
                    from include/linux/thread_info.h:38,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/mips/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:51,
                    from include/linux/mmzone.h:8,
                    from include/linux/gfp.h:6,
                    from include/linux/mm.h:10,
                    from include/linux/memblock.h:13,
                    from arch/mips/loongson64/common/init.c:7:
   In function 'memcpy',
       inlined from 'mips_nmi_setup' at arch/mips/loongson64/common/init.c:24:2:
>> include/linux/string.h:355: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 +355 include/linux/string.h

6974f0c4555e28 Daniel Micay 2017-07-12  346  
6974f0c4555e28 Daniel Micay 2017-07-12  347  __FORTIFY_INLINE void *memcpy(void *p, const void *q, __kernel_size_t size)
6974f0c4555e28 Daniel Micay 2017-07-12  348  {
6974f0c4555e28 Daniel Micay 2017-07-12  349  	size_t p_size = __builtin_object_size(p, 0);
6974f0c4555e28 Daniel Micay 2017-07-12  350  	size_t q_size = __builtin_object_size(q, 0);
6974f0c4555e28 Daniel Micay 2017-07-12  351  	if (__builtin_constant_p(size)) {
6974f0c4555e28 Daniel Micay 2017-07-12  352  		if (p_size < size)
6974f0c4555e28 Daniel Micay 2017-07-12  353  			__write_overflow();
6974f0c4555e28 Daniel Micay 2017-07-12  354  		if (q_size < size)
6974f0c4555e28 Daniel Micay 2017-07-12 @355  			__read_overflow2();
6974f0c4555e28 Daniel Micay 2017-07-12  356  	}
6974f0c4555e28 Daniel Micay 2017-07-12  357  	if (p_size < size || q_size < size)
6974f0c4555e28 Daniel Micay 2017-07-12  358  		fortify_panic(__func__);
6974f0c4555e28 Daniel Micay 2017-07-12  359  	return __builtin_memcpy(p, q, size);
6974f0c4555e28 Daniel Micay 2017-07-12  360  }
6974f0c4555e28 Daniel Micay 2017-07-12  361  

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

:::::: TO: Daniel Micay <danielmicay@gmail.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 31677 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* include/linux/string.h:355:4: error: call to '__read_overflow2' declared with attribute error: detected read beyond size of object passed as 2nd parameter
@ 2019-12-26  8:56 ` kbuild test robot
  0 siblings, 0 replies; 4+ messages in thread
From: kbuild test robot @ 2019-12-26  8:56 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 3650 bytes --]

Hi Dmitry,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   46cf053efec6a3a5f343fead837777efe8252a46
commit: a2ecb233e3e759730269b31b7d8add823cf196ba mips: Kconfig: Add ARCH_HAS_FORTIFY_SOURCE
date:   3 months ago
config: mips-randconfig-a001-20191226 (attached as .config)
compiler: mips64el-linux-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout a2ecb233e3e759730269b31b7d8add823cf196ba
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=mips 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   In file included from include/linux/bitmap.h:9:0,
                    from include/linux/cpumask.h:12,
                    from arch/mips/include/asm/processor.h:15,
                    from arch/mips/include/asm/thread_info.h:16,
                    from include/linux/thread_info.h:38,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/mips/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:51,
                    from include/linux/mmzone.h:8,
                    from include/linux/gfp.h:6,
                    from include/linux/mm.h:10,
                    from include/linux/memblock.h:13,
                    from arch/mips/loongson64/common/init.c:7:
   In function 'memcpy',
       inlined from 'mips_nmi_setup' at arch/mips/loongson64/common/init.c:24:2:
>> include/linux/string.h:355: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 +355 include/linux/string.h

6974f0c4555e28 Daniel Micay 2017-07-12  346  
6974f0c4555e28 Daniel Micay 2017-07-12  347  __FORTIFY_INLINE void *memcpy(void *p, const void *q, __kernel_size_t size)
6974f0c4555e28 Daniel Micay 2017-07-12  348  {
6974f0c4555e28 Daniel Micay 2017-07-12  349  	size_t p_size = __builtin_object_size(p, 0);
6974f0c4555e28 Daniel Micay 2017-07-12  350  	size_t q_size = __builtin_object_size(q, 0);
6974f0c4555e28 Daniel Micay 2017-07-12  351  	if (__builtin_constant_p(size)) {
6974f0c4555e28 Daniel Micay 2017-07-12  352  		if (p_size < size)
6974f0c4555e28 Daniel Micay 2017-07-12  353  			__write_overflow();
6974f0c4555e28 Daniel Micay 2017-07-12  354  		if (q_size < size)
6974f0c4555e28 Daniel Micay 2017-07-12 @355  			__read_overflow2();
6974f0c4555e28 Daniel Micay 2017-07-12  356  	}
6974f0c4555e28 Daniel Micay 2017-07-12  357  	if (p_size < size || q_size < size)
6974f0c4555e28 Daniel Micay 2017-07-12  358  		fortify_panic(__func__);
6974f0c4555e28 Daniel Micay 2017-07-12  359  	return __builtin_memcpy(p, q, size);
6974f0c4555e28 Daniel Micay 2017-07-12  360  }
6974f0c4555e28 Daniel Micay 2017-07-12  361  

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

:::::: TO: Daniel Micay <danielmicay@gmail.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 31677 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* include/linux/string.h:355:4: error: call to '__read_overflow2' declared with attribute error: detected read beyond size of object passed as 2nd parameter
@ 2019-12-12  5:34 ` kbuild test robot
  0 siblings, 0 replies; 4+ messages in thread
From: kbuild test robot @ 2019-12-12  5:34 UTC (permalink / raw)
  To: Dmitry Korotin; +Cc: kbuild-all, linux-kernel, Paul Burton

[-- Attachment #1: Type: text/plain, Size: 3368 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   687dec9b94599b19e218f89fd034d6449c3ff57c
commit: a2ecb233e3e759730269b31b7d8add823cf196ba mips: Kconfig: Add ARCH_HAS_FORTIFY_SOURCE
date:   9 weeks ago
config: mips-randconfig-a001-20191212 (attached as .config)
compiler: mipsel-linux-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout a2ecb233e3e759730269b31b7d8add823cf196ba
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=mips 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   In file included from include/linux/bitmap.h:9:0,
                    from include/linux/cpumask.h:12,
                    from arch/mips/include/asm/processor.h:15,
                    from arch/mips/include/asm/io.h:31,
                    from include/linux/io.h:13,
                    from arch/mips/pistachio/init.c:10:
   In function 'memcpy',
       inlined from 'mips_nmi_setup' at arch/mips/pistachio/init.c:91:2:
>> include/linux/string.h:355:4: error: call to '__read_overflow2' declared with attribute error: detected read beyond size of object passed as 2nd parameter
       __read_overflow2();
       ^~~~~~~~~~~~~~~~~~
   In function 'memcpy',
       inlined from 'mips_ejtag_setup' at arch/mips/pistachio/init.c:104:2:
>> include/linux/string.h:355: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 +355 include/linux/string.h

6974f0c4555e28 Daniel Micay 2017-07-12  346  
6974f0c4555e28 Daniel Micay 2017-07-12  347  __FORTIFY_INLINE void *memcpy(void *p, const void *q, __kernel_size_t size)
6974f0c4555e28 Daniel Micay 2017-07-12  348  {
6974f0c4555e28 Daniel Micay 2017-07-12  349  	size_t p_size = __builtin_object_size(p, 0);
6974f0c4555e28 Daniel Micay 2017-07-12  350  	size_t q_size = __builtin_object_size(q, 0);
6974f0c4555e28 Daniel Micay 2017-07-12  351  	if (__builtin_constant_p(size)) {
6974f0c4555e28 Daniel Micay 2017-07-12  352  		if (p_size < size)
6974f0c4555e28 Daniel Micay 2017-07-12  353  			__write_overflow();
6974f0c4555e28 Daniel Micay 2017-07-12  354  		if (q_size < size)
6974f0c4555e28 Daniel Micay 2017-07-12 @355  			__read_overflow2();
6974f0c4555e28 Daniel Micay 2017-07-12  356  	}
6974f0c4555e28 Daniel Micay 2017-07-12  357  	if (p_size < size || q_size < size)
6974f0c4555e28 Daniel Micay 2017-07-12  358  		fortify_panic(__func__);
6974f0c4555e28 Daniel Micay 2017-07-12  359  	return __builtin_memcpy(p, q, size);
6974f0c4555e28 Daniel Micay 2017-07-12  360  }
6974f0c4555e28 Daniel Micay 2017-07-12  361  

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

:::::: TO: Daniel Micay <danielmicay@gmail.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 31401 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* include/linux/string.h:355:4: error: call to '__read_overflow2' declared with attribute error: detected read beyond size of object passed as 2nd parameter
@ 2019-12-12  5:34 ` kbuild test robot
  0 siblings, 0 replies; 4+ messages in thread
From: kbuild test robot @ 2019-12-12  5:34 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 3430 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   687dec9b94599b19e218f89fd034d6449c3ff57c
commit: a2ecb233e3e759730269b31b7d8add823cf196ba mips: Kconfig: Add ARCH_HAS_FORTIFY_SOURCE
date:   9 weeks ago
config: mips-randconfig-a001-20191212 (attached as .config)
compiler: mipsel-linux-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout a2ecb233e3e759730269b31b7d8add823cf196ba
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=mips 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   In file included from include/linux/bitmap.h:9:0,
                    from include/linux/cpumask.h:12,
                    from arch/mips/include/asm/processor.h:15,
                    from arch/mips/include/asm/io.h:31,
                    from include/linux/io.h:13,
                    from arch/mips/pistachio/init.c:10:
   In function 'memcpy',
       inlined from 'mips_nmi_setup' at arch/mips/pistachio/init.c:91:2:
>> include/linux/string.h:355:4: error: call to '__read_overflow2' declared with attribute error: detected read beyond size of object passed as 2nd parameter
       __read_overflow2();
       ^~~~~~~~~~~~~~~~~~
   In function 'memcpy',
       inlined from 'mips_ejtag_setup' at arch/mips/pistachio/init.c:104:2:
>> include/linux/string.h:355: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 +355 include/linux/string.h

6974f0c4555e28 Daniel Micay 2017-07-12  346  
6974f0c4555e28 Daniel Micay 2017-07-12  347  __FORTIFY_INLINE void *memcpy(void *p, const void *q, __kernel_size_t size)
6974f0c4555e28 Daniel Micay 2017-07-12  348  {
6974f0c4555e28 Daniel Micay 2017-07-12  349  	size_t p_size = __builtin_object_size(p, 0);
6974f0c4555e28 Daniel Micay 2017-07-12  350  	size_t q_size = __builtin_object_size(q, 0);
6974f0c4555e28 Daniel Micay 2017-07-12  351  	if (__builtin_constant_p(size)) {
6974f0c4555e28 Daniel Micay 2017-07-12  352  		if (p_size < size)
6974f0c4555e28 Daniel Micay 2017-07-12  353  			__write_overflow();
6974f0c4555e28 Daniel Micay 2017-07-12  354  		if (q_size < size)
6974f0c4555e28 Daniel Micay 2017-07-12 @355  			__read_overflow2();
6974f0c4555e28 Daniel Micay 2017-07-12  356  	}
6974f0c4555e28 Daniel Micay 2017-07-12  357  	if (p_size < size || q_size < size)
6974f0c4555e28 Daniel Micay 2017-07-12  358  		fortify_panic(__func__);
6974f0c4555e28 Daniel Micay 2017-07-12  359  	return __builtin_memcpy(p, q, size);
6974f0c4555e28 Daniel Micay 2017-07-12  360  }
6974f0c4555e28 Daniel Micay 2017-07-12  361  

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

:::::: TO: Daniel Micay <danielmicay@gmail.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 31401 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-12-26  8:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-26  8:56 include/linux/string.h:355:4: error: call to '__read_overflow2' declared with attribute error: detected read beyond size of object passed as 2nd parameter kbuild test robot
2019-12-26  8:56 ` kbuild test robot
  -- strict thread matches above, loose matches on Subject: below --
2019-12-12  5:34 kbuild test robot
2019-12-12  5:34 ` kbuild test robot

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.