[PATCH 17/27] x86/entry: Make rewind_stack_and_make_dead() a real function
Josh Poimboeuf <[email protected]>
| Newsgroups | gmane.linux.kbuild.devel,gmane.linux.kernel,gmane.linux.kernel.rust |
|---|---|
| Message-ID | <8f13a2da7d267bffb1b2675f26152429da56a273.1787890035.git.jpoimboe@kernel.org> |
rewind_stack_and_make_dead() is SYM_CODE because it switches stacks, but it's otherwise a callable function from C. Convert it to SYM_FUNC so objtool can detect that it's noreturn and its entry can be removed from the hard-coded global noreturns list. Signed-off-by: Josh Poimboeuf <[email protected]> --- arch/x86/entry/entry_64.S | 7 +++---- tools/objtool/noreturns.h | 1 - 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S index c6d996593f329..1184bf1f9ed7e 100644 --- a/arch/x86/entry/entry_64.S +++ b/arch/x86/entry/entry_64.S @@ -1480,9 +1480,7 @@ SYM_CODE_START(entry_SYSCALL32_ignore) SYM_CODE_END(entry_SYSCALL32_ignore) .pushsection .text, "ax" - __FUNC_ALIGN -SYM_CODE_START_NOALIGN(rewind_stack_and_make_dead) - UNWIND_HINT_FUNC +SYM_FUNC_START(rewind_stack_and_make_dead) /* Prevent any naive code from trying to unwind to our caller. */ xorl %ebp, %ebp @@ -1491,7 +1489,8 @@ SYM_CODE_START_NOALIGN(rewind_stack_and_make_dead) UNWIND_HINT_REGS call make_task_dead -SYM_CODE_END(rewind_stack_and_make_dead) +SYM_FUNC_END(rewind_stack_and_make_dead) +STACK_FRAME_NON_STANDARD_FP(rewind_stack_and_make_dead) .popsection /* diff --git a/tools/objtool/noreturns.h b/tools/objtool/noreturns.h index 26f62f98bc8ef..ff93e94ee09a0 100644 --- a/tools/objtool/noreturns.h +++ b/tools/objtool/noreturns.h @@ -19,7 +19,6 @@ NORETURN(kunit_try_catch_throw) NORETURN(mpt_halt_firmware) NORETURN(panic) NORETURN(vpanic) -NORETURN(rewind_stack_and_make_dead) NORETURN(rust_helper_BUG) NORETURN(sev_es_terminate) NORETURN(xen_cpu_bringup_again) -- 2.55.0