Linux kernel -stable discussions
 help / color / mirror / Atom feed
* [PATCH] objtool/rust: add one more `noreturn` Rust function for Rust 1.101.0
@ 2026-10-18 13:13 Miguel Ojeda
  2026-10-20 23:38 ` Miguel Ojeda
  0 siblings, 1 reply; 2+ messages in thread
From: Miguel Ojeda @ 2026-10-18 13:13 UTC (permalink / raw)
  To: Josh Poimboeuf, Peter Zijlstra, Miguel Ojeda
  Cc: Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin,
	Andreas Hindborg, Alice Ryhl, Trevor Gross, Danilo Krummrich,
	Daniel Almeida, Tamir Duberstein, Alexandre Courbot,
	Onur Özkan, rust-for-linux, stable

Starting with Rust 1.101.0 (expected 2026-12-24), `objtool` may report:

    rust/kernel.o: warning: objtool: _R..._4core6result13unwrap_failed...()
    falls through to next function _R..._4core6result13unwrap_failed...()

(and others) due to calls to the `noreturn` symbol:

    core::result::unwrap_failed::unwrap_failed_inner

Rust introduced this helper when making `unwrap_failed` generic [1]. The
existing entry for `unwrap_failed` does not match the new helper.

Thus add the mangled one to the list so that `objtool` knows it is
actually `noreturn`.

See commit 56d680dd23c3 ("objtool/rust: list `noreturn` Rust functions")
for more details.

Cc: stable@vger.kernel.org # Needed in 6.12.y and later (Rust is pinned in older LTSs).
Cc: Josh Poimboeuf <jpoimboe@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Assisted-by: LLM
Link: https://github.com/rust-lang/rust/pull/164059 [1]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
---
 tools/objtool/check.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 464f6c9d9ff0..931c5c412f15 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -201,6 +201,7 @@ static bool is_rust_noreturn(const struct symbol *func)
 	       str_ends_with(func->name, "_4core6option13expect_failed")				||
 	       str_ends_with(func->name, "_4core6option13unwrap_failed")				||
 	       str_ends_with(func->name, "_4core6result13unwrap_failed")				||
+	       str_ends_with(func->name, "_4core6result13unwrap_failed19unwrap_failed_inner")		||
 	       str_ends_with(func->name, "_4core9panicking5panic")					||
 	       str_ends_with(func->name, "_4core9panicking9panic_fmt")					||
 	       str_ends_with(func->name, "_4core9panicking14panic_explicit")				||

base-commit: 24a19b953e2a3d0ea5a8c4951a0ab8f32720c907
-- 
2.56.0


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

* Re: [PATCH] objtool/rust: add one more `noreturn` Rust function for Rust 1.101.0
  2026-10-18 13:13 [PATCH] objtool/rust: add one more `noreturn` Rust function for Rust 1.101.0 Miguel Ojeda
@ 2026-10-20 23:38 ` Miguel Ojeda
  0 siblings, 0 replies; 2+ messages in thread
From: Miguel Ojeda @ 2026-10-20 23:38 UTC (permalink / raw)
  To: Miguel Ojeda
  Cc: Josh Poimboeuf, Peter Zijlstra, Boqun Feng, Gary Guo,
	Björn Roy Baron, Benno Lossin, Andreas Hindborg, Alice Ryhl,
	Trevor Gross, Danilo Krummrich, Daniel Almeida, Tamir Duberstein,
	Alexandre Courbot, Onur Özkan, rust-for-linux, stable

On Sun, Oct 18, 2026 at 3:13 PM Miguel Ojeda <ojeda@kernel.org> wrote:
>
> Starting with Rust 1.101.0 (expected 2026-12-24), `objtool` may report:
>
>     rust/kernel.o: warning: objtool: _R..._4core6result13unwrap_failed...()
>     falls through to next function _R..._4core6result13unwrap_failed...()
>
> (and others) due to calls to the `noreturn` symbol:
>
>     core::result::unwrap_failed::unwrap_failed_inner
>
> Rust introduced this helper when making `unwrap_failed` generic [1]. The
> existing entry for `unwrap_failed` does not match the new helper.
>
> Thus add the mangled one to the list so that `objtool` knows it is
> actually `noreturn`.
>
> See commit 56d680dd23c3 ("objtool/rust: list `noreturn` Rust functions")
> for more details.
>
> Cc: stable@vger.kernel.org # Needed in 6.12.y and later (Rust is pinned in older LTSs).
> Cc: Josh Poimboeuf <jpoimboe@kernel.org>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Assisted-by: LLM
> Link: https://github.com/rust-lang/rust/pull/164059 [1]
> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>

Applied to `rust-fixes` -- tags still welcome!

Cheers,
Miguel

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

end of thread, other threads:[~2026-10-20 23:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-18 13:13 [PATCH] objtool/rust: add one more `noreturn` Rust function for Rust 1.101.0 Miguel Ojeda
2026-10-20 23:38 ` Miguel Ojeda

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