From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796383982; b=A3jANhHtlWgalF/mVev0Q71+Qv0SZfMzn640pm48ws/Hzm6Jg0RBDHCmSm7Zxdv0uMO1 G6LTrz2OQZK0Kxmzi/3nNJtMPL+EDKER4rqrKWeoUEdT6nzaBojJr0VPr3GiQ8VN6U+1w D+z0bozc/h7QC5qarP08VlCyQjXO5qygKKA8ChTnrqA1PDFxcuBxB1rFmjEUn45TrIaYL D3OSyftPD7RzlDk3bkBXdVV72l+1kpJJg27I2pCH4A8VMpj+W6CDGYYx2tetMkH6bJj7m jfJ4I65lkMjgndwc1LOtOHxfTOgAcnTysU5/mDwI8KRfJQSipl6lL1rcnyAk25hC/dQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796383982; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=aZEpXTCP+FDLA3if63lCQNPQuBVp+eoSaiA3oFPW20M=; b=mQmOAboXADbTs44Zv5is/XAUQ24whZ1H/4IyWHmHp90vqxvTQ2Yq7Vt/YErvoVrZ4ACG gVFH94rS0iswP7DqpqlpIcBr0pyc+ldr/iA9dVT5zV1NphGEpidFAEGJJyCaPSItZ3vjK QkJOZVSD1oAa0eTLJBu/lXQ0KysWgRV4Hhc0IQoFDwFEULcPEsuJp6F1yxe9W85iAgz7X +GIyGvfyNToV3UCH6DYL+s27b8RWdwLxtxEHSXpPBrX1aP0dd/YgJQGlOD8cMPFmsM0Xw pHoxZ6WV9zyPz9PpI7Y9wlHp27HwRdhd6DJjFSq24tbwzRHfBw+IWm44B5jbcN1nNVg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=nwnppTb0; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C918B606A6A6; Fri, 4 Dec 2026 11:33:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=nwnppTb0 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9BFA31F000C2; Fri, 4 Dec 2026 11:33:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796383982; bh=aZEpXTCP+FDLA3if63lCQNPQuBVp+eoSaiA3oFPW20M=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=nwnppTb0HbolAr8yCDsY4FJ3irLuWLMy4UarbKT4Hi9bb7Wi7rz1iU1FFoGwBn7kH wrxHRgDt3/7y4oDqdARx2wwh6aRiVWS96Z6Dhco+g0kJ+BjKWOu36kl2zdSdm+ACDC 7fz1ExYeyBvRWpieqX0sz8lS/5q2L6lo61S2239s= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Josh Poimboeuf , Peter Zijlstra , Gary Guo , Miguel Ojeda Subject: [PATCH 6.12 445/555] objtool/rust: add more `noreturn` Rust functions for Rust 1.101.0 Date: Fri, 4 Dec 2026 19:08:08 +0900 Message-ID: <20261204100626.465662768@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100603.988357525@linuxfoundation.org> References: <20261204100603.988357525@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Miguel Ojeda commit 1846c049cfe325abe0be8d1ea50eda16aa02d1a8 upstream. Starting with Rust 1.101.0 (expected 2026-12-24), `objtool` may report: rust/kernel.o: warning: objtool: _R..._6kernel3pci2ioINtB7_6DeviceNtNtB9_6device5BoundE8cfg_size() falls through to next function _R..._6kernel3oppNtB5_3OPP18from_raw_opp_owned() (and others) due to calls to the `noreturn` symbol: core::panicking::unreachable_default_msg Rust now outlines the constant messages of the panicking macros [1], thus `unreachable!()` (i.e. without arguments) calls that new function instead of `core::panicking::panic`, which is already in the list. The same change introduced the equivalent `noreturn` functions for `panic!()`, `todo!()` and `unimplemented!()`, which lead to the same warning when those are used: core::panicking::panic_default_msg core::panicking::todo_default_msg core::panicking::unimplemented_default_msg Thus add the mangled ones to the list so that `objtool` knows they are actually `noreturn`. See commit 56d680dd23c3 ("objtool/rust: list `noreturn` Rust functions") for more details. Cc: stable@vger.kernel.org # 6.12.x (Rust is pinned in older LTSs) Cc: Josh Poimboeuf Cc: Peter Zijlstra Link: https://github.com/rust-lang/rust/pull/163766 [1] Reviewed-by: Gary Guo Link: https://patch.msgid.link/20261114001708.80599-1-ojeda@kernel.org Signed-off-by: Miguel Ojeda Signed-off-by: Greg Kroah-Hartman --- tools/objtool/check.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -218,9 +218,13 @@ static bool is_rust_noreturn(const struc str_ends_with(func->name, "_4core9panicking9panic_fmt") || str_ends_with(func->name, "_4core9panicking14panic_explicit") || str_ends_with(func->name, "_4core9panicking14panic_nounwind") || + str_ends_with(func->name, "_4core9panicking16todo_default_msg") || + str_ends_with(func->name, "_4core9panicking17panic_default_msg") || str_ends_with(func->name, "_4core9panicking18panic_bounds_check") || str_ends_with(func->name, "_4core9panicking18panic_nounwind_fmt") || str_ends_with(func->name, "_4core9panicking19assert_failed_inner") || + str_ends_with(func->name, "_4core9panicking23unreachable_default_msg") || + str_ends_with(func->name, "_4core9panicking25unimplemented_default_msg") || str_ends_with(func->name, "_4core9panicking30panic_null_pointer_dereference") || str_ends_with(func->name, "_4core9panicking32panic_null_reference_constructed") || str_ends_with(func->name, "_4core9panicking36panic_misaligned_pointer_dereference") ||