public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [peterz-queue:objtool/urgent 9/9] arch/x86/include/asm/extable.h:47:86: warning: 'noreturn' function does return
@ 2022-05-26 14:11 kernel test robot
  2022-05-27 10:08 ` Peter Zijlstra
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2022-05-26 14:11 UTC (permalink / raw)
  To: Borislav Petkov; +Cc: kbuild-all, linux-kernel, Peter Zijlstra

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git objtool/urgent
head:   43c6fc6a431b43163dc3950543dd87b986f25945
commit: 43c6fc6a431b43163dc3950543dd87b986f25945 [9/9] x86/extable: Annotate ex_handler_msr_mce() as a dead end
config: x86_64-randconfig-a013 (https://download.01.org/0day-ci/archive/20220526/202205262227.2m2DJfpJ-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-1) 11.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?id=43c6fc6a431b43163dc3950543dd87b986f25945
        git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
        git fetch --no-tags peterz-queue objtool/urgent
        git checkout 43c6fc6a431b43163dc3950543dd87b986f25945
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash arch/x86/mm/

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

All warnings (new ones prefixed by >>):

   In file included from arch/x86/include/asm/uaccess.h:13,
                    from include/linux/uaccess.h:11,
                    from arch/x86/mm/extable.c:3:
   arch/x86/include/asm/extable.h: In function 'ex_handler_msr_mce':
>> arch/x86/include/asm/extable.h:47:86: warning: 'noreturn' function does return
      47 | static inline void __noreturn ex_handler_msr_mce(struct pt_regs *regs, bool wrmsr) { }
         |                                                                                      ^


vim +/noreturn +47 arch/x86/include/asm/extable.h

    43	
    44	#ifdef CONFIG_X86_MCE
    45	extern void __noreturn ex_handler_msr_mce(struct pt_regs *regs, bool wrmsr);
    46	#else
  > 47	static inline void __noreturn ex_handler_msr_mce(struct pt_regs *regs, bool wrmsr) { }
    48	#endif
    49	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [peterz-queue:objtool/urgent 9/9] arch/x86/include/asm/extable.h:47:86: warning: 'noreturn' function does return
  2022-05-26 14:11 [peterz-queue:objtool/urgent 9/9] arch/x86/include/asm/extable.h:47:86: warning: 'noreturn' function does return kernel test robot
@ 2022-05-27 10:08 ` Peter Zijlstra
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Zijlstra @ 2022-05-27 10:08 UTC (permalink / raw)
  To: kernel test robot; +Cc: Borislav Petkov, kbuild-all, linux-kernel

On Thu, May 26, 2022 at 10:11:34PM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git objtool/urgent
> head:   43c6fc6a431b43163dc3950543dd87b986f25945
> commit: 43c6fc6a431b43163dc3950543dd87b986f25945 [9/9] x86/extable: Annotate ex_handler_msr_mce() as a dead end
> config: x86_64-randconfig-a013 (https://download.01.org/0day-ci/archive/20220526/202205262227.2m2DJfpJ-lkp@intel.com/config)
> compiler: gcc-11 (Debian 11.3.0-1) 11.3.0
> reproduce (this is a W=1 build):
>         # https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?id=43c6fc6a431b43163dc3950543dd87b986f25945
>         git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
>         git fetch --no-tags peterz-queue objtool/urgent
>         git checkout 43c6fc6a431b43163dc3950543dd87b986f25945
>         # save the config file
>         mkdir build_dir && cp config build_dir/.config
>         make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash arch/x86/mm/
> 
> If you fix the issue, kindly add following tag where applicable
> Reported-by: kernel test robot <lkp@intel.com>
> 
> All warnings (new ones prefixed by >>):
> 
>    In file included from arch/x86/include/asm/uaccess.h:13,
>                     from include/linux/uaccess.h:11,
>                     from arch/x86/mm/extable.c:3:
>    arch/x86/include/asm/extable.h: In function 'ex_handler_msr_mce':
> >> arch/x86/include/asm/extable.h:47:86: warning: 'noreturn' function does return
>       47 | static inline void __noreturn ex_handler_msr_mce(struct pt_regs *regs, bool wrmsr) { }
>          |                                                                                      ^
> 
> 
> vim +/noreturn +47 arch/x86/include/asm/extable.h
> 
>     43	
>     44	#ifdef CONFIG_X86_MCE
>     45	extern void __noreturn ex_handler_msr_mce(struct pt_regs *regs, bool wrmsr);
>     46	#else
>   > 47	static inline void __noreturn ex_handler_msr_mce(struct pt_regs *regs, bool wrmsr) { }
>     48	#endif
>     49	

This seems to cure...

--- a/arch/x86/include/asm/extable.h
+++ b/arch/x86/include/asm/extable.h
@@ -44,7 +44,11 @@ extern void early_fixup_exception(struct
 #ifdef CONFIG_X86_MCE
 extern void __noreturn ex_handler_msr_mce(struct pt_regs *regs, bool wrmsr);
 #else
-static inline void __noreturn ex_handler_msr_mce(struct pt_regs *regs, bool wrmsr) { }
+static inline void __noreturn ex_handler_msr_mce(struct pt_regs *regs, bool wrmsr)
+{
+	for (;;)
+		cpu_relax();
+}
 #endif
 
 #if defined(CONFIG_BPF_JIT) && defined(CONFIG_X86_64)


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-05-27 10:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-26 14:11 [peterz-queue:objtool/urgent 9/9] arch/x86/include/asm/extable.h:47:86: warning: 'noreturn' function does return kernel test robot
2022-05-27 10:08 ` Peter Zijlstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox