summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMiguel Ojeda <ojeda@kernel.org>2025-01-12 15:39:51 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-02-21 14:11:06 +0100
commitbc36e2aa081263115dd245027723d5ad198b9f23 (patch)
treef572f421bca9d1fa660478fe4d266375c7817ab9 /tools
parentefa5f5dcb80ccc3a1e49843bbc66c47d29bab0a9 (diff)
downloadlinux-bc36e2aa081263115dd245027723d5ad198b9f23.tar.gz
linux-bc36e2aa081263115dd245027723d5ad198b9f23.tar.bz2
linux-bc36e2aa081263115dd245027723d5ad198b9f23.zip
objtool/rust: add one more `noreturn` Rust function
commit cee6f9a9c87b6ecfb51845950c28216b231c3610 upstream. Starting with Rust 1.85.0 (currently in beta, to be released 2025-02-20), under some kernel configurations with `CONFIG_RUST_DEBUG_ASSERTIONS=y`, one may trigger a new `objtool` warning: rust/kernel.o: warning: objtool: _R...securityNtB2_11SecurityCtx8as_bytes() falls through to next function _R...core3ops4drop4Drop4drop() due to a call to the `noreturn` symbol: core::panicking::assert_failed::<usize, usize> Thus add it to the list so that `objtool` knows it is actually `noreturn`. Do so matching with `strstr` since it is a generic. See commit 56d680dd23c3 ("objtool/rust: list `noreturn` Rust functions") for more details. Cc: stable@vger.kernel.org # Needed in 6.12.y and 6.13.y only (Rust is pinned in older LTSs). Fixes: 56d680dd23c3 ("objtool/rust: list `noreturn` Rust functions") Reviewed-by: Gary Guo <gary@garyguo.net> Link: https://lore.kernel.org/r/20250112143951.751139-1-ojeda@kernel.org [ Updated Cc: stable@ to include 6.13.y. - Miguel ] Signed-off-by: Miguel Ojeda <ojeda@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/objtool/check.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 76060da755b5..e7ec29dfdff2 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -218,6 +218,7 @@ static bool is_rust_noreturn(const struct symbol *func)
str_ends_with(func->name, "_4core9panicking18panic_bounds_check") ||
str_ends_with(func->name, "_4core9panicking19assert_failed_inner") ||
str_ends_with(func->name, "_4core9panicking36panic_misaligned_pointer_dereference") ||
+ strstr(func->name, "_4core9panicking13assert_failed") ||
strstr(func->name, "_4core9panicking11panic_const24panic_const_") ||
(strstr(func->name, "_4core5slice5index24slice_") &&
str_ends_with(func->name, "_fail"));