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=1796382595; b=DNUlnTP9inTWR3JjCXxzOvM2FM8dLc2uS+fQgvueRO4KUW3qa7vspR/hqtvralaacxzo gX2JJLeJecUqps3YUqKUSweOU8pkGfIPRDANoBq7ITcHwd353JnHPBjfsYa4PDnPHH44P orGYIuURggqE9ERE+Jy6xw5aydiJIkCdgD19nPLgWqRGJDEwQeLNyaRYB1cjJXdEKALXn bpofnofnS92TaB+Rhv5+u7bWEB6kVzakch4LfkWbD5neR0PlACs67qGoUSJseZ6lFM3d8 oH4fTWtGM2D1hZPhHJDzY5Rb9phDugwU+IiNjh20gG2PWmetyXQTBb2Ow9JGMQuHyUQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796382595; 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=n6LzB0poDL6Mi4DqguXtH0hYjEjquLfR9p8VVPzWd6k=; b=Y+6ozHGpolgftHiXJSqIlSen8QU/WnQXLSiw61jDMLbACEBd3O/Fr2IW/n8QRBmGYYox ZA/9QqgH8RDWR3YvPEo1wJOVXIVTxPYuHkWo4viRkgeYdgS9ntIPpHYBsz3TwkhL+5257 GZuFywJqzOc9OCWOgl3p8Szc83tiA4dsyQ+LdvzmXzRhY9b0lS5D/H08BEwJBmJbxN2uM cvX9OIl3IQ0zRxb3oQ4MKoDbSQhg9+VztWQYizZsKiKNufho+tOcCQcU5frKFeflPWlj6 f58pjjrN1oRHNfqwztk+yZoAVY92c34qq2wuN/LZZuCVf4TBIr0UP1Ptr1Loo0w1fjA== 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=1cNRmCHk; 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 2C772606A32F; Fri, 4 Dec 2026 11:09:55 +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=1cNRmCHk Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9B3261F000CE; Fri, 4 Dec 2026 11:09:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796382595; bh=n6LzB0poDL6Mi4DqguXtH0hYjEjquLfR9p8VVPzWd6k=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=1cNRmCHkFZfE9Q9mUSFqSAmebiODUoNDfkWvhZUEpfBMIOi8478osbDNFe2REazrP MKHIt6NR/PT/KDb8yBdstEujjdIt7rZeYAYDMeqU67ymOc0tGB3DBhElTPJuXwbW/k XwYcC1HSkh/yU/qj+y2e29nM/eI11XzG/V7u0ITM= 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.18 521/703] objtool/rust: add more `noreturn` Rust functions for Rust 1.101.0 Date: Fri, 4 Dec 2026 19:07:00 +0900 Message-ID: <20261204100641.652444983@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100627.522266145@linuxfoundation.org> References: <20261204100627.522266145@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.18-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 @@ -226,9 +226,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") ||