Skip to content

Commit 381ab30

Browse files
ojedaSasha Levin
authored and
Sasha Levin
committed
objtool/rust: add one more noreturn Rust function for Rust 1.86.0
commit a3cd5f5 upstream. Starting with Rust 1.86.0 (see upstream commit b151b513ba2b ("Insert null checks for pointer dereferences when debug assertions are enabled") [1]), under some kernel configurations with `CONFIG_RUST_DEBUG_ASSERTIONS=y`, one may trigger a new `objtool` warning: rust/kernel.o: warning: objtool: _R..._6kernel9workqueue6system() falls through to next function _R...9workqueue14system_highpri() due to a call to the `noreturn` symbol: core::panicking::panic_null_pointer_dereference Thus add it to the list so that `objtool` knows it is actually `noreturn`. See commit 56d680d ("objtool/rust: list `noreturn` Rust functions") for more details. Cc: [email protected] # Needed in 6.12.y and later (Rust is pinned in older LTSs). Fixes: 56d680d ("objtool/rust: list `noreturn` Rust functions") Link: rust-lang/rust@b151b51 [1] Reviewed-by: Alice Ryhl <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Miguel Ojeda <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 3f49582 commit 381ab30

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
@@ -217,6 +217,7 @@ static bool is_rust_noreturn(const struct symbol *func)
217217
str_ends_with(func->name, "_4core9panicking14panic_nounwind") ||
218218
str_ends_with(func->name, "_4core9panicking18panic_bounds_check") ||
219219
str_ends_with(func->name, "_4core9panicking19assert_failed_inner") ||
220+
str_ends_with(func->name, "_4core9panicking30panic_null_pointer_dereference") ||
220221
str_ends_with(func->name, "_4core9panicking36panic_misaligned_pointer_dereference") ||
221222
strstr(func->name, "_4core9panicking13assert_failed") ||
222223
strstr(func->name, "_4core9panicking11panic_const24panic_const_") ||

0 commit comments

Comments
 (0)