All of lore.kernel.org
 help / color / mirror / Atom feed
* [openeuler:openEuler-1.0-LTS 21050/21544] arch/x86/include/asm/msr.h:272:9: warning: 'mcu_ctrl' may be used uninitialized
@ 2024-01-13  0:42 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-01-13  0:42 UTC (permalink / raw)
  To: kernel; +Cc: oe-kbuild-all

tree:   https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS
head:   1f0983450549eeea71fb9333517330947a779262
commit: 99dec2700cf36e58d3fdb295e1fed7e9d04a916c [21050/21544] x86/speculation: Add Gather Data Sampling mitigation
config: x86_64-allnoconfig (https://download.01.org/0day-ci/archive/20240113/202401130830.UR68iRGU-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240113/202401130830.UR68iRGU-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/202401130830.UR68iRGU-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/processor.h:21,
                    from arch/x86/include/asm/cpufeature.h:5,
                    from arch/x86/include/asm/thread_info.h:53,
                    from include/linux/thread_bits.h:22,
                    from include/linux/thread_info.h:14,
                    from arch/x86/include/asm/preempt.h:7,
                    from include/linux/preempt.h:81,
                    from include/linux/rcupdate.h:40,
                    from include/linux/rculist.h:11,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from include/linux/utsname.h:6,
                    from arch/x86/kernel/cpu/bugs.c:12:
   In function 'wrmsrl',
       inlined from 'update_gds_msr' at arch/x86/kernel/cpu/bugs.c:689:2:
>> arch/x86/include/asm/msr.h:272:9: warning: 'mcu_ctrl' may be used uninitialized [-Wmaybe-uninitialized]
     272 |         native_write_msr(msr, (u32)(val & 0xffffffffULL), (u32)(val >> 32));
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/x86/kernel/cpu/bugs.c: In function 'update_gds_msr':
   arch/x86/kernel/cpu/bugs.c:667:13: note: 'mcu_ctrl' was declared here
     667 |         u64 mcu_ctrl;
         |             ^~~~~~~~


vim +/mcu_ctrl +272 arch/x86/include/asm/msr.h

be7baf80a69964 include/asm-x86/msr.h      Thomas Gleixner 2007-10-23  266  
be7baf80a69964 include/asm-x86/msr.h      Thomas Gleixner 2007-10-23  267  #define rdmsrl(msr, val)			\
abb0ade013507c include/asm-x86/msr.h      Joe Perches     2008-03-23  268  	((val) = native_read_msr((msr)))
be7baf80a69964 include/asm-x86/msr.h      Thomas Gleixner 2007-10-23  269  
5d07c2cc1962fa arch/x86/include/asm/msr.h Borislav Petkov 2016-11-02  270  static inline void wrmsrl(unsigned int msr, u64 val)
47edb65178cb70 arch/x86/include/asm/msr.h Andy Lutomirski 2015-07-23  271  {
679bcea857d728 arch/x86/include/asm/msr.h Borislav Petkov 2015-11-23 @272  	native_write_msr(msr, (u32)(val & 0xffffffffULL), (u32)(val >> 32));
47edb65178cb70 arch/x86/include/asm/msr.h Andy Lutomirski 2015-07-23  273  }
be7baf80a69964 include/asm-x86/msr.h      Thomas Gleixner 2007-10-23  274  

:::::: The code at line 272 was first introduced by commit
:::::: 679bcea857d72868e3431dde3a0e158bf0ed9119 x86/MSR: Chop off lower 32-bit value

:::::: TO: Borislav Petkov <bp@suse.de>
:::::: CC: Ingo Molnar <mingo@kernel.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:[~2024-01-13  0:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-13  0:42 [openeuler:openEuler-1.0-LTS 21050/21544] arch/x86/include/asm/msr.h:272:9: warning: 'mcu_ctrl' may be used uninitialized 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.