* [linux-next:master 5090/5337] include/linux/string.h:380:9: warning: argument 1 null where non-null expected
@ 2019-12-26 4:31 kbuild test robot
0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2019-12-26 4:31 UTC (permalink / raw)
To: Oleksandr Natalenko
Cc: kbuild-all, Andrew Morton, Linux Memory Management List
[-- Attachment #1: Type: text/plain, Size: 5451 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 7ddd09fc4b745fb1d8942f95389583e08412e0cd
commit: 27fc2e84ab6df89e3c8f333701055af6704634c5 [5090/5337] init/Kconfig: enable -O3 for all arches
config: x86_64-randconfig-f003-20191226 (attached as .config)
compiler: gcc-7 (Debian 7.5.0-3) 7.5.0
reproduce:
git checkout 27fc2e84ab6df89e3c8f333701055af6704634c5
# save the attached .config to linux build tree
make ARCH=x86_64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/bitmap.h:9:0,
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:22,
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:78,
from include/linux/spinlock.h:51,
from include/linux/seqlock.h:36,
from include/linux/time.h:6,
from include/linux/ktime.h:24,
from include/linux/timer.h:6,
from include/linux/netdevice.h:24,
from net/wireless/wext-core.c:11:
net/wireless/wext-core.c: In function 'wext_handle_ioctl':
>> include/linux/string.h:380:9: warning: argument 1 null where non-null expected [-Wnonnull]
return __builtin_memcpy(p, q, size);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/string.h:380:9: note: in a call to built-in function '__builtin_memcpy'
net/wireless/wext-core.c: In function 'compat_wext_handle_ioctl':
>> include/linux/string.h:380:9: warning: argument 1 null where non-null expected [-Wnonnull]
return __builtin_memcpy(p, q, size);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/string.h:380:9: note: in a call to built-in function '__builtin_memcpy'
--
In file included from include/linux/bitmap.h:9:0,
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:22,
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:78,
from include/linux/spinlock.h:51,
from include/linux/seqlock.h:36,
from include/linux/time.h:6,
from include/linux/ktime.h:24,
from include/linux/timer.h:6,
from include/linux/netdevice.h:24,
from net//wireless/wext-core.c:11:
net//wireless/wext-core.c: In function 'wext_handle_ioctl':
>> include/linux/string.h:380:9: warning: argument 1 null where non-null expected [-Wnonnull]
return __builtin_memcpy(p, q, size);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/string.h:380:9: note: in a call to built-in function '__builtin_memcpy'
net//wireless/wext-core.c: In function 'compat_wext_handle_ioctl':
>> include/linux/string.h:380:9: warning: argument 1 null where non-null expected [-Wnonnull]
return __builtin_memcpy(p, q, size);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/string.h:380:9: note: in a call to built-in function '__builtin_memcpy'
vim +380 include/linux/string.h
6974f0c4555e28 Daniel Micay 2017-07-12 367
6974f0c4555e28 Daniel Micay 2017-07-12 368 __FORTIFY_INLINE void *memcpy(void *p, const void *q, __kernel_size_t size)
6974f0c4555e28 Daniel Micay 2017-07-12 369 {
6974f0c4555e28 Daniel Micay 2017-07-12 370 size_t p_size = __builtin_object_size(p, 0);
6974f0c4555e28 Daniel Micay 2017-07-12 371 size_t q_size = __builtin_object_size(q, 0);
6974f0c4555e28 Daniel Micay 2017-07-12 372 if (__builtin_constant_p(size)) {
6974f0c4555e28 Daniel Micay 2017-07-12 373 if (p_size < size)
6974f0c4555e28 Daniel Micay 2017-07-12 374 __write_overflow();
6974f0c4555e28 Daniel Micay 2017-07-12 375 if (q_size < size)
6974f0c4555e28 Daniel Micay 2017-07-12 376 __read_overflow2();
6974f0c4555e28 Daniel Micay 2017-07-12 377 }
6974f0c4555e28 Daniel Micay 2017-07-12 378 if (p_size < size || q_size < size)
6974f0c4555e28 Daniel Micay 2017-07-12 379 fortify_panic(__func__);
6974f0c4555e28 Daniel Micay 2017-07-12 @380 return __builtin_memcpy(p, q, size);
6974f0c4555e28 Daniel Micay 2017-07-12 381 }
6974f0c4555e28 Daniel Micay 2017-07-12 382
:::::: The code at line 380 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: 35180 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-12-26 4:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-26 4:31 [linux-next:master 5090/5337] include/linux/string.h:380:9: warning: argument 1 null where non-null expected kbuild test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox