lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <176113973927.2601451.11243642514167472736.tip-bot2@tip-bot2>
Date: Wed, 22 Oct 2025 13:28:59 -0000
From: "tip-bot2 for Miguel Ojeda" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Miguel Ojeda <ojeda@...nel.org>,
	"Peter Zijlstra (Intel)" <peterz@...radead.org>,
	Alice Ryhl <aliceryhl@...gle.com>, stable@...r.kernel.org,
	#@...-bot2.tec.linutronix.de, Needed@...-bot2.tec.linutronix.de,
	in@...-bot2.tec.linutronix.de, 6.12.y@...-bot2.tec.linutronix.de,
	and@...-bot2.tec.linutronix.de, "later."@tip-bot2.tec.linutronix.de,
	x86@...nel.org, linux-kernel@...r.kernel.org
Subject:
 [tip: objtool/urgent] objtool/rust: add one more `noreturn` Rust function

The following commit has been merged into the objtool/urgent branch of tip:

Commit-ID:     dbdf2a7feb422f9bacfd12774e624cf26f503eb0
Gitweb:        https://git.kernel.org/tip/dbdf2a7feb422f9bacfd12774e624cf26f503eb0
Author:        Miguel Ojeda <ojeda@...nel.org>
AuthorDate:    Mon, 20 Oct 2025 04:07:14 +02:00
Committer:     Peter Zijlstra <peterz@...radead.org>
CommitterDate: Wed, 22 Oct 2025 15:21:54 +02:00

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

Between Rust 1.79 and 1.86, under `CONFIG_RUST_KERNEL_DOCTESTS=y`,
`objtool` may report:

    rust/doctests_kernel_generated.o: warning: objtool:
    rust_doctest_kernel_alloc_kbox_rs_13() falls through to next
    function rust_doctest_kernel_alloc_kvec_rs_0()

(as well as in rust_doctest_kernel_alloc_kvec_rs_0) due to calls to the
`noreturn` symbol:

    core::option::expect_failed

from code added in commits 779db37373a3 ("rust: alloc: kvec: implement
AsPageIter for VVec") and 671618432f46 ("rust: alloc: kbox: implement
AsPageIter for VBox").

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

This can be reproduced as well in other versions by tweaking the code,
such as the latest stable Rust (1.90.0).

Stable does not have code that triggers this, but it could have it in
the future. Downstream forks could too. Thus tag it for backport.

See commit 56d680dd23c3 ("objtool/rust: list `noreturn` Rust functions")
for more details.

Signed-off-by: Miguel Ojeda <ojeda@...nel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Reviewed-by: Alice Ryhl <aliceryhl@...gle.com>
Cc: stable@...r.kernel.org # Needed in 6.12.y and later.
Link: https://patch.msgid.link/20251020020714.2511718-1-ojeda@kernel.org
---
 tools/objtool/check.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index a577057..3c7ab91 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -217,6 +217,7 @@ static bool is_rust_noreturn(const struct symbol *func)
 	 * these come from the Rust standard library).
 	 */
 	return str_ends_with(func->name, "_4core5sliceSp15copy_from_slice17len_mismatch_fail")		||
+	       str_ends_with(func->name, "_4core6option13expect_failed")				||
 	       str_ends_with(func->name, "_4core6option13unwrap_failed")				||
 	       str_ends_with(func->name, "_4core6result13unwrap_failed")				||
 	       str_ends_with(func->name, "_4core9panicking5panic")					||

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ