All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-review:UPDATE-20200911-024129/Borislav-Petkov/x86-mce-Make-mce_rdmsrl-do-a-plain-RDMSR-only/20200907-111756 1/1] arch/x86/kernel/cpu/mce/core.c:373:16: warning: no previous prototype for 'ex_handler_rdmsr_fault'
@ 2020-09-11  2:28 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-09-11  2:28 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 3975 bytes --]

tree:   https://github.com/0day-ci/linux/commits/UPDATE-20200911-024129/Borislav-Petkov/x86-mce-Make-mce_rdmsrl-do-a-plain-RDMSR-only/20200907-111756
head:   730776685aa51f334b6186924ad8fb8ae8e10608
commit: 730776685aa51f334b6186924ad8fb8ae8e10608 [1/1] x86/mce: Make mce_rdmsrl() panic on an inaccessible MSR
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
        git checkout 730776685aa51f334b6186924ad8fb8ae8e10608
        # save the attached .config to linux build tree
        make W=1 ARCH=x86_64 

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

All warnings (new ones prefixed by >>):

>> arch/x86/kernel/cpu/mce/core.c:373:16: warning: no previous prototype for 'ex_handler_rdmsr_fault' [-Wmissing-prototypes]
     373 | __visible bool ex_handler_rdmsr_fault(const struct exception_table_entry *fixup,
         |                ^~~~~~~~~~~~~~~~~~~~~~
>> arch/x86/kernel/cpu/mce/core.c:418:16: warning: no previous prototype for 'ex_handler_wrmsr_fault' [-Wmissing-prototypes]
     418 | __visible bool ex_handler_wrmsr_fault(const struct exception_table_entry *fixup,
         |                ^~~~~~~~~~~~~~~~~~~~~~

# https://github.com/0day-ci/linux/commit/730776685aa51f334b6186924ad8fb8ae8e10608
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review UPDATE-20200911-024129/Borislav-Petkov/x86-mce-Make-mce_rdmsrl-do-a-plain-RDMSR-only/20200907-111756
git checkout 730776685aa51f334b6186924ad8fb8ae8e10608
vim +/ex_handler_rdmsr_fault +373 arch/x86/kernel/cpu/mce/core.c

   372	
 > 373	__visible bool ex_handler_rdmsr_fault(const struct exception_table_entry *fixup,
   374					      struct pt_regs *regs, int trapnr,
   375					      unsigned long error_code,
   376					      unsigned long fault_addr)
   377	{
   378		pr_emerg("MSR access error: RDMSR from 0x%x at rIP: 0x%lx (%pS)\n",
   379			 (unsigned int)regs->cx, regs->ip, (void *)regs->ip);
   380	
   381		show_stack_regs(regs);
   382	
   383		panic("MCA architectural violation!\n");
   384	
   385		while (true)
   386			cpu_relax();
   387	
   388		return true;
   389	}
   390	
   391	/* MSR access wrappers used for error injection */
   392	static u64 mce_rdmsrl(u32 msr)
   393	{
   394		DECLARE_ARGS(val, low, high);
   395	
   396		if (__this_cpu_read(injectm.finished)) {
   397			int offset = msr_to_offset(msr);
   398	
   399			if (offset < 0)
   400				return 0;
   401			return *(u64 *)((char *)this_cpu_ptr(&injectm) + offset);
   402		}
   403	
   404		/*
   405		 * RDMSR on MCA MSRs should not fault. If they do, this is very much an
   406		 * architectural violation and needs to be reported to hw vendor. Panic
   407		 * the box to not allow any further progress.
   408		 */
   409		asm volatile("1: rdmsr\n"
   410			     "2:\n"
   411			     _ASM_EXTABLE_HANDLE(1b, 2b, ex_handler_rdmsr_fault)
   412			     : EAX_EDX_RET(val, low, high) : "c" (msr));
   413	
   414	
   415		return EAX_EDX_VAL(val, low, high);
   416	}
   417	
 > 418	__visible bool ex_handler_wrmsr_fault(const struct exception_table_entry *fixup,
   419					      struct pt_regs *regs, int trapnr,
   420					      unsigned long error_code,
   421					      unsigned long fault_addr)
   422	{
   423		pr_emerg("MSR access error: WRMSR to 0x%x (tried to write 0x%08x%08x) at rIP: 0x%lx (%pS)\n",
   424			 (unsigned int)regs->cx, (unsigned int)regs->dx, (unsigned int)regs->ax,
   425			  regs->ip, (void *)regs->ip);
   426	
   427		show_stack_regs(regs);
   428	
   429		panic("MCA architectural violation!\n");
   430	
   431		while (true)
   432			cpu_relax();
   433	
   434		return true;
   435	}
   436	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 75210 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-09-11  2:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-11  2:28 [linux-review:UPDATE-20200911-024129/Borislav-Petkov/x86-mce-Make-mce_rdmsrl-do-a-plain-RDMSR-only/20200907-111756 1/1] arch/x86/kernel/cpu/mce/core.c:373:16: warning: no previous prototype for 'ex_handler_rdmsr_fault' 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.