All of lore.kernel.org
 help / color / mirror / Atom feed
* [openeuler:openEuler-1.0-LTS 1753/1753] include/linux/string.h:249:16: warning: '__builtin_strncpy' accessing 80 bytes at offsets 100 and 36 may overlap up to 0 bytes at offset [9223372036854775807, -9223372036854775808]
@ 2025-08-09  5:29 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-08-09  5:29 UTC (permalink / raw)
  To: kernel, Xie XiuQi; +Cc: oe-kbuild-all

tree:   https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS
head:   748957057cef2d3b3e35d749c9a1ade66e2b5e73
commit: a24ec7d8d3462ba48b4bd932960c397d92de8782 [1753/1753] ASoC: dmaengine: Make the pcm->name equal to pcm->id if the name is not set
config: x86_64-buildonly-randconfig-2002-20250806 (https://download.01.org/0day-ci/archive/20250809/202508090752.oTu2Do8L-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250809/202508090752.oTu2Do8L-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202508090752.oTu2Do8L-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from include/linux/bitmap.h:9,
                    from include/linux/cpumask.h:12,
                    from arch/x86/include/asm/cpumask.h:5,
                    from arch/x86/include/asm/msr.h:11,
                    from arch/x86/include/asm/processor.h:21,
                    from arch/x86/include/asm/cpufeature.h:5,
                    from arch/x86/include/asm/thread_info.h:53,
                    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:11,
                    from sound/soc/soc-generic-dmaengine-pcm.c:6:
   In function 'strncpy',
       inlined from 'dmaengine_pcm_new' at sound/soc/soc-generic-dmaengine-pcm.c:318:4:
>> include/linux/string.h:249:16: warning: '__builtin_strncpy' accessing 80 bytes at offsets 100 and 36 may overlap up to 0 bytes at offset [9223372036854775807, -9223372036854775808] [-Wrestrict]
     249 |         return __builtin_strncpy(p, q, size);
         |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +/__builtin_strncpy +249 include/linux/string.h

6974f0c4555e28 Daniel Micay 2017-07-12  240  
6974f0c4555e28 Daniel Micay 2017-07-12  241  #if !defined(__NO_FORTIFY) && defined(__OPTIMIZE__) && defined(CONFIG_FORTIFY_SOURCE)
6974f0c4555e28 Daniel Micay 2017-07-12  242  __FORTIFY_INLINE char *strncpy(char *p, const char *q, __kernel_size_t size)
6974f0c4555e28 Daniel Micay 2017-07-12  243  {
6974f0c4555e28 Daniel Micay 2017-07-12  244  	size_t p_size = __builtin_object_size(p, 0);
6974f0c4555e28 Daniel Micay 2017-07-12  245  	if (__builtin_constant_p(size) && p_size < size)
6974f0c4555e28 Daniel Micay 2017-07-12  246  		__write_overflow();
6974f0c4555e28 Daniel Micay 2017-07-12  247  	if (p_size < size)
6974f0c4555e28 Daniel Micay 2017-07-12  248  		fortify_panic(__func__);
6974f0c4555e28 Daniel Micay 2017-07-12 @249  	return __builtin_strncpy(p, q, size);
6974f0c4555e28 Daniel Micay 2017-07-12  250  }
6974f0c4555e28 Daniel Micay 2017-07-12  251  

:::::: The code at line 249 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 CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-08-09  5:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-09  5:29 [openeuler:openEuler-1.0-LTS 1753/1753] include/linux/string.h:249:16: warning: '__builtin_strncpy' accessing 80 bytes at offsets 100 and 36 may overlap up to 0 bytes at offset [9223372036854775807, -9223372036854775808] kernel 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.