public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] objtool: Re-add resume_play_dead() to noreturn list
@ 2025-10-27 16:39 Thorsten Blum
  2025-10-27 20:37 ` Josh Poimboeuf
  0 siblings, 1 reply; 3+ messages in thread
From: Thorsten Blum @ 2025-10-27 16:39 UTC (permalink / raw)
  To: Josh Poimboeuf, Peter Zijlstra, Miroslav Benes
  Cc: Thorsten Blum, linux-kernel

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


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

* Re: [PATCH] objtool: Re-add resume_play_dead() to noreturn list
  2025-10-27 16:39 [PATCH] objtool: Re-add resume_play_dead() to noreturn list Thorsten Blum
@ 2025-10-27 20:37 ` Josh Poimboeuf
  2025-10-27 21:33   ` Thorsten Blum
  0 siblings, 1 reply; 3+ messages in thread
From: Josh Poimboeuf @ 2025-10-27 20:37 UTC (permalink / raw)
  To: Thorsten Blum; +Cc: Peter Zijlstra, Miroslav Benes, linux-kernel

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

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

* Re: [PATCH] objtool: Re-add resume_play_dead() to noreturn list
  2025-10-27 20:37 ` Josh Poimboeuf
@ 2025-10-27 21:33   ` Thorsten Blum
  0 siblings, 0 replies; 3+ messages in thread
From: Thorsten Blum @ 2025-10-27 21:33 UTC (permalink / raw)
  To: Josh Poimboeuf; +Cc: Peter Zijlstra, Miroslav Benes, linux-kernel

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


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

end of thread, other threads:[~2025-10-27 21:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-27 16:39 [PATCH] objtool: Re-add resume_play_dead() to noreturn list Thorsten Blum
2025-10-27 20:37 ` Josh Poimboeuf
2025-10-27 21:33   ` Thorsten Blum

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