Hi Daniel,
FYI, the error/warning still remains.
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: b5504db0db8375a77340b5bb54c17cfb75d3c754 commit: 99dec2700cf36e58d3fdb295e1fed7e9d04a916c [1298/1298] x86/speculation: Add Gather Data Sampling mitigation config: x86_64-buildonly-randconfig-006-20241118 (https://download.01.org/0day-ci/archive/20241202/202412020932.YwT4OkOM-lkp@i...) 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/20241202/202412020932.YwT4OkOM-lkp@i...)
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/202412020932.YwT4OkOM-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 >>):
arch/x86/kernel/cpu/bugs.c:2407:9: warning: no previous prototype for 'cpu_show_gds' [-Wmissing-prototypes] 2407 | ssize_t cpu_show_gds(struct device *dev, struct device_attribute *attr, char *buf) | ^~~~~~~~~~~~ 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