lkml.org 
[lkml]   [2020]   [Jan]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectarch/x86/include/asm/string_32.h:182:25: warning: 'val' may be used uninitialized in this function
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 738d2902773e30939a982c8df7a7f94293659810
commit: 6c3edaf9fd6a3be7fb5bc6931897c24cd3848f84 tracing: Introduce trace event injection
date: 4 weeks ago
config: i386-randconfig-a003-20200102 (attached as .config)
compiler: gcc-6 (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
reproduce:
git checkout 6c3edaf9fd6a3be7fb5bc6931897c24cd3848f84
# save the attached .config to linux build tree
make ARCH=i386

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

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

All warnings (new ones prefixed by >>):

In file included from arch/x86/include/asm/string.h:3:0,
from include/linux/string.h:20,
from arch/x86/include/asm/page_32.h:35,
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:78,
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 kernel/trace/trace_events_inject.c:8:
kernel/trace/trace_events_inject.c: In function 'event_inject_write':
>> arch/x86/include/asm/string_32.h:182:25: warning: 'val' may be used uninitialized in this function [-Wmaybe-uninitialized]
#define memcpy(t, f, n) __builtin_memcpy(t, f, n)
^~~~~~~~~~~~~~~~
kernel/trace/trace_events_inject.c:200:6: note: 'val' was declared here
u64 val;
^~~
--
In file included from arch/x86/include/asm/string.h:3:0,
from include/linux/string.h:20,
from arch/x86/include/asm/page_32.h:35,
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:78,
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 kernel//trace/trace_events_inject.c:8:
kernel//trace/trace_events_inject.c: In function 'event_inject_write':
>> arch/x86/include/asm/string_32.h:182:25: warning: 'val' may be used uninitialized in this function [-Wmaybe-uninitialized]
#define memcpy(t, f, n) __builtin_memcpy(t, f, n)
^~~~~~~~~~~~~~~~
kernel//trace/trace_events_inject.c:200:6: note: 'val' was declared here
u64 val;
^~~

vim +/val +182 arch/x86/include/asm/string_32.h

^1da177e4c3f41 include/asm-i386/string.h Linus Torvalds 2005-04-16 177
^1da177e4c3f41 include/asm-i386/string.h Linus Torvalds 2005-04-16 178 /*
^1da177e4c3f41 include/asm-i386/string.h Linus Torvalds 2005-04-16 179 * No 3D Now!
^1da177e4c3f41 include/asm-i386/string.h Linus Torvalds 2005-04-16 180 */
^1da177e4c3f41 include/asm-i386/string.h Linus Torvalds 2005-04-16 181
ff60fab71bb3b4 arch/x86/include/asm/string_32.h Arjan van de Ven 2009-09-28 @182 #define memcpy(t, f, n) __builtin_memcpy(t, f, n)
^1da177e4c3f41 include/asm-i386/string.h Linus Torvalds 2005-04-16 183

:::::: The code at line 182 was first introduced by commit
:::::: ff60fab71bb3b4fdbf8caf57ff3739ffd0887396 x86: Use __builtin_memset and __builtin_memcpy for memset/memcpy

:::::: TO: Arjan van de Ven <arjan@infradead.org>
:::::: CC: H. Peter Anvin <hpa@zytor.com>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2020-01-01 20:53    [W:0.032 / U:7.812 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site