[PATCH] objtool: Re-add resume_play_dead() to noreturn list

Thorsten Blum posted 1 patch 3 months, 1 week ago
tools/objtool/noreturns.h | 1 +
1 file changed, 1 insertion(+)
[PATCH] objtool: Re-add resume_play_dead() to noreturn list
Posted by Thorsten Blum 3 months, 1 week ago
resume_play_dead() was added to the noreturn list in commit 52668badd34b
("x86/cpu: Mark {hlt,resume}_play_dead() __noreturn"), but was dropped
in commit 6245ce4ab670 ("objtool: Move noreturn function list to
separate file") when the list was moved to noreturns.h.

Fix this by adding resume_play_dead() to the list again.

Fixes: 6245ce4ab670 ("objtool: Move noreturn function list to separate file")
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
 tools/objtool/noreturns.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/objtool/noreturns.h b/tools/objtool/noreturns.h
index 14f8ab653449..e63d85968f83 100644
--- a/tools/objtool/noreturns.h
+++ b/tools/objtool/noreturns.h
@@ -42,6 +42,7 @@ NORETURN(panic)
 NORETURN(vpanic)
 NORETURN(panic_smp_self_stop)
 NORETURN(rest_init)
+NORETURN(resume_play_dead)
 NORETURN(rewind_stack_and_make_dead)
 NORETURN(rust_begin_unwind)
 NORETURN(rust_helper_BUG)
-- 
2.51.0
Re: [PATCH] objtool: Re-add resume_play_dead() to noreturn list
Posted by Josh Poimboeuf 3 months, 1 week ago
On Mon, Oct 27, 2025 at 05:39:07PM +0100, Thorsten Blum wrote:
> resume_play_dead() was added to the noreturn list in commit 52668badd34b
> ("x86/cpu: Mark {hlt,resume}_play_dead() __noreturn"), but was dropped
> in commit 6245ce4ab670 ("objtool: Move noreturn function list to
> separate file") when the list was moved to noreturns.h.
> 
> Fix this by adding resume_play_dead() to the list again.
> 
> Fixes: 6245ce4ab670 ("objtool: Move noreturn function list to separate file")
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>

Hm?  There's no "resume_play_dead" in the diff for 6245ce4ab670.

That was actually done intentionally with a different commit:

  34245659debd ("objtool: Remove superfluous global_noreturns entries")

-- 
Josh
Re: [PATCH] objtool: Re-add resume_play_dead() to noreturn list
Posted by Thorsten Blum 3 months, 1 week ago
On 27. Oct 2025, at 21:37, Josh Poimboeuf wrote:
> Hm?  There's no "resume_play_dead" in the diff for 6245ce4ab670.
> 
> That was actually done intentionally with a different commit:
> 
> 34245659debd ("objtool: Remove superfluous global_noreturns entries")

Sorry, I must have missed this. Please drop this patch then.

It's a bit unfortunate that this is neither documented in
objtool/noreturns.h, where it rather misleadingly says "all functions":

/*
* This is a (sorted!) list of all known __noreturn functions in the kernel.
* ...
*/

nor in objtool/Documentation/objtool.txt:

"A noreturn function must be marked __noreturn in both its declaration
and its definition, and must have a NORETURN() annotation in
tools/objtool/noreturns.h."

Only the __dead_end_function() function comment in objtool/check.c and
the implementation itself make this clear.

Thanks,
Thorsten