Skip to contentSkip to conversation

objtool/rust: add one more `noreturn` Rust function for Rust 1.99.0

PATCH Applied Miguel Ojeda 3 participants 3 messages Jul 28 – Aug 3

Subsystems (3)
lore
Share & tools
lore

Miguel Ojeda

author maintainer
#0 lore raw

PATCH 1/1 objtool/rust: add one more `noreturn` Rust function for Rust 1.99.0

Starting with Rust 1.99.0 (expected 2026-10-01), objtool may report:

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

due to calls to the noreturn symbol:

core::num::from_ascii_bytes_radix_panic

The function was renamed from from_ascii_radix_panic [1], which is already in the list.

Thus add the new 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 [email protected] # Needed in 6.12.y and later (Rust is pinned in older LTSs).
Cc Josh Poimboeuf <[email protected]>
Cc Peter Zijlstra <[email protected]>
---
 tools/objtool/check.c | 1 +
 1 file changed, 1 insertion(+)
tools/objtool/check.c +1 -0
index f03dd59e7fca..87db9f4ed9e2 100644
@@ -194,6 +194,7 @@ static bool is_rust_noreturn(const struct symbol *func)
 	 */
 	return str_ends_with(func->name, "_4core3num20from_str_radix_panic")				||
 	       str_ends_with(func->name, "_4core3num22from_ascii_radix_panic")				||
+	       str_ends_with(func->name, "_4core3num28from_ascii_bytes_radix_panic")			||
 	       str_ends_with(func->name, "_4core5sliceSp15copy_from_slice17len_mismatch_fail")		||
 	       str_ends_with(func->name, "_4core6option13expect_failed")				||
 	       str_ends_with(func->name, "_4core6option13unwrap_failed")				||

base-commit: f5098b6bae761e346ebcd9da7f95622c04733cff

Signature · 1 line
2.55.0
reviewer Tested-by on v1 1/1
#1 lore raw
Quoted 16 lines · Miguel Ojeda

Starting with Rust 1.99.0 (expected 2026-10-01), objtool may report:

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

due to calls to the noreturn symbol:

core::num::from_ascii_bytes_radix_panic

The function was renamed from from_ascii_radix_panic [1], which is already in the list.

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

Quoted 8 lines

See commit 56d680dd23c3 ("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).
Cc Josh Poimboeuf <[email protected]>
Cc Peter Zijlstra <[email protected]>
Applied
#2 lore raw
In reply to Miguel Ojeda
Quoted 16 lines · Miguel Ojeda

Starting with Rust 1.99.0 (expected 2026-10-01), objtool may report:

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

due to calls to the noreturn symbol:

core::num::from_ascii_bytes_radix_panic

The function was renamed from from_ascii_radix_panic [1], which is already in the list.

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

Quoted 8 lines

See commit 56d680dd23c3 ("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).
Cc Josh Poimboeuf <[email protected]>
Cc Peter Zijlstra <[email protected]>

Applied to rust-next -- thanks everyone!

Cheers,
Miguel