Skip to content

Commit 21e649b

Browse files
ojedagregkh
authored andcommitted
objtool/rust: add one more noreturn Rust function for Rust 1.89.0
commit aa7b65c upstream. Starting with Rust 1.89.0 (expected 2025-08-07), under `CONFIG_RUST_DEBUG_ASSERTIONS=y`, `objtool` may report: rust/kernel.o: warning: objtool: _R..._6kernel4pageNtB5_4Page8read_raw() falls through to next function _R..._6kernel4pageNtB5_4Page9write_raw() (and many others) due to calls to the `noreturn` symbol: core::panicking::panic_nounwind_fmt 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> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/r/20250712160103.1244945-2-ojeda@kernel.org Signed-off-by: Miguel Ojeda <ojeda@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 7bb9ea5 commit 21e649b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tools/objtool/check.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ static bool is_rust_noreturn(const struct symbol *func)
216216
str_ends_with(func->name, "_4core9panicking14panic_explicit") ||
217217
str_ends_with(func->name, "_4core9panicking14panic_nounwind") ||
218218
str_ends_with(func->name, "_4core9panicking18panic_bounds_check") ||
219+
str_ends_with(func->name, "_4core9panicking18panic_nounwind_fmt") ||
219220
str_ends_with(func->name, "_4core9panicking19assert_failed_inner") ||
220221
str_ends_with(func->name, "_4core9panicking30panic_null_pointer_dereference") ||
221222
str_ends_with(func->name, "_4core9panicking36panic_misaligned_pointer_dereference") ||

0 commit comments

Comments
 (0)