All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kernel@openeuler.org
Cc: oe-kbuild-all@lists.linux.dev
Subject: [openeuler:openEuler-1.0-LTS 21050/21544] arch/x86/include/asm/msr.h:272:9: warning: 'mcu_ctrl' may be used uninitialized
Date: Sat, 13 Jan 2024 08:42:58 +0800	[thread overview]
Message-ID: <202401130830.UR68iRGU-lkp@intel.com> (raw)

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

                 reply	other threads:[~2024-01-13  0:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202401130830.UR68iRGU-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kernel@openeuler.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.