Skip to content

Commit c404b1f

Browse files
ojedagregkh
authored andcommitted
objtool/rust: add one more noreturn Rust function for Rust 1.99.0
commit 5a81c35 upstream. Starting with Rust 1.99.0 (expected 2026-10-01), under `CONFIG_RUST_DEBUG_ASSERTIONS=y`, `objtool` may report: rust/kernel.o: warning: objtool: _R..._6kernel12module_param9set_paramaEB4_() falls through to next function _R..._6kernel12module_param9set_paramhEB4_() (and many others) due to calls to the `noreturn` symbol [1]: core::panicking::panic_null_reference_constructed Thus add the mangled one to the list so that `objtool` knows it is actually `noreturn`. See commit 56d680d ("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> Cc: Petr Pavlu <petr.pavlu@suse.com> Link: rust-lang/rust#158796 [1] Reported-by: Alice Ryhl <aliceryhl@google.com> Closes: https://lore.kernel.org/rust-for-linux/alEBInX9gD1M5NAr@google.com/ Reviewed-by: Alice Ryhl <aliceryhl@google.com> Tested-by: Alice Ryhl <aliceryhl@google.com> Link: https://patch.msgid.link/20260710173252.191781-1-ojeda@kernel.org Signed-off-by: Miguel Ojeda <ojeda@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 8ccfb3b commit c404b1f

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

tools/objtool/check.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ static bool is_rust_noreturn(const struct symbol *func)
228228
str_ends_with(func->name, "_4core9panicking18panic_nounwind_fmt") ||
229229
str_ends_with(func->name, "_4core9panicking19assert_failed_inner") ||
230230
str_ends_with(func->name, "_4core9panicking30panic_null_pointer_dereference") ||
231+
str_ends_with(func->name, "_4core9panicking32panic_null_reference_constructed") ||
231232
str_ends_with(func->name, "_4core9panicking36panic_misaligned_pointer_dereference") ||
232233
str_ends_with(func->name, "_7___rustc17rust_begin_unwind") ||
233234
strstr(func->name, "_4core9panicking13assert_failed") ||

0 commit comments

Comments
 (0)