[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220520192729.23969-1-bp@alien8.de>
Date: Fri, 20 May 2022 21:27:29 +0200
From: Borislav Petkov <bp@...en8.de>
To: X86 ML <x86@...nel.org>
Cc: LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH] x86/extable: Annotate ex_handler_msr_mce() as a dead end
From: Borislav Petkov <bp@...e.de>
Fix
vmlinux.o: warning: objtool: fixup_exception+0x2d6: unreachable instruction
Signed-off-by: Borislav Petkov <bp@...e.de>
---
arch/x86/include/asm/extable.h | 4 ++--
tools/objtool/check.c | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/arch/x86/include/asm/extable.h b/arch/x86/include/asm/extable.h
index 155c991ba95e..6ac53e98fff4 100644
--- a/arch/x86/include/asm/extable.h
+++ b/arch/x86/include/asm/extable.h
@@ -42,9 +42,9 @@ extern int ex_get_fixup_type(unsigned long ip);
extern void early_fixup_exception(struct pt_regs *regs, int trapnr);
#ifdef CONFIG_X86_MCE
-extern void ex_handler_msr_mce(struct pt_regs *regs, bool wrmsr);
+extern void __noreturn ex_handler_msr_mce(struct pt_regs *regs, bool wrmsr);
#else
-static inline void ex_handler_msr_mce(struct pt_regs *regs, bool wrmsr) { }
+static inline void __noreturn ex_handler_msr_mce(struct pt_regs *regs, bool wrmsr) { }
#endif
#if defined(CONFIG_BPF_JIT) && defined(CONFIG_X86_64)
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 190b2f6e360a..c23e46c4a882 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -185,7 +185,8 @@ static bool __dead_end_function(struct objtool_file *file, struct symbol *func,
"do_group_exit",
"stop_this_cpu",
"__invalid_creds",
- "cpu_startup_entry",
+ "cpu_startup_entry",
+ "ex_handler_msr_mce",
};
if (!func)
--
2.35.1
Powered by blists - more mailing lists