From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f73.google.com (mail-wm1-f73.google.com [209.85.128.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5F9562D6E77 for ; Mon, 20 Oct 2025 08:17:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760948239; cv=none; b=Bd/5j4iEFddVnz+aUkjNfeOldhP9+ib6++enZdWnGCvQ7Cdf9IBy1QREhoMl2SnrMVvUfLR3S8Lf1zMOi/sS3FCc5xmFzrlQ+I444Aqk8AkfX1yXOuhyJZYnst/bU1rmdOc5s59YNXCLxpG0p0FH36vVZpnGClH9it0/1oN4tDo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760948239; c=relaxed/simple; bh=H0tga9DZv6zHPlXhb6ysF3xK2cSNnzfEhWaT6A6Prn0=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=BDqd16QCX1JTZFwicuzan52zP27xkbUQxxgRRPhUNsKct0RK75+KsS1k8aCPJZqoLLJR4gTsS6yuDtuxU+rBDgNLZ4+ORGZgEuSyinGy2xoDvs3qI2im4L+8APGLPWNVC1RpeqR78Tx4m+dF9rhNdvXyOBfuPlKrBxF/vacQNUk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=jc/IrtFT; arc=none smtp.client-ip=209.85.128.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="jc/IrtFT" Received: by mail-wm1-f73.google.com with SMTP id 5b1f17b1804b1-46fa88b5760so14052155e9.3 for ; Mon, 20 Oct 2025 01:17:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1760948236; x=1761553036; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=LjMEk6mNBH8WSN8eHPXPJ3fCRbx/T8IK9tLp1EWYzkM=; b=jc/IrtFT9Ir9m6PYewmOL9GHlnHv9NaKjZGCw3ewMSVMJesMC3tGNxBA65wzsDHCiw 8cwdmtGgdgZtKf7FiWxab+lEuZpIAc4pHFCbBTlUjcOsrAZCQ9gDoFQNCYlW34pqFo9i n7yE34OavRLQMAljgQqS1n/6ssRoVjBOk4UI0vg8prlMnzsmCHYjxCtv96q27MvKv0RA lyTbj931DMHJB8BOCdkVb6UNQu/ofdubclUNM/beah41hdhVDHEYhPgHbgTir6RsAVUT rEZ9BghEtbfj1mVD7I1ybLjqn49qxIXysd5rDf4Y3I1FjlJT/3NmUPZLkvE8exMF/fQL 4thQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760948236; x=1761553036; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=LjMEk6mNBH8WSN8eHPXPJ3fCRbx/T8IK9tLp1EWYzkM=; b=LWar1X6Sypd0VZS4wci2OhTpvj25WL6c8Ra4UHGa+fGffg5DJ1QoqI16TBlHL0MONS xQvYOM7xw2aixvhNxI/DcX3kiQCSk29NauuOPDnL7A6YRpSBWjXTgWY6ggcezuDC32B6 Zm91QD8CL5/t6hLwykh2yQj7QvoTYRpw+pev/QiPLkZVJPnT34UkraftvHHZ49e3xCqh +2HAjrxBtpxb8efnGJIqY9uzia5ttC+WV+AZMB8Qu4S+DXvk6Im7pSXAoeablg2jHWVT upPnoaK2+bhkRKjv1I4oqXK/Xw5f/nZMKvMjrySy7yaBaWVq4Xr/8kQzFrg9Nc+t07x2 OnwA== X-Forwarded-Encrypted: i=1; AJvYcCUOzUd8dqSgKYRREqLHjuqDO2zMUKvctLiDjE1hsyId8ct2wyc5j/dsEPTNvd1oYKn8G7uJenZhlV/tQXY=@vger.kernel.org X-Gm-Message-State: AOJu0YwX2R47FlFkGwI2uPUaO3g/kYe38mbaHjSOp39JSsZ1ISq5bIkD AsAnWQ3V9Rq6lPV5cFssw1TL+EOtKOLmZG4rDj3zkerXn3aEZ8bpD7Iu+588QtGQ35DOW7x4zDI +JFwKZ4j3EtRp+hWaeQ== X-Google-Smtp-Source: AGHT+IFFA8Am2fnybv9rvlh//I4Iw/BUP5vE4Qrvs/2x2IMy3Yp6BBWo4VkpWJV7hHHYkfYEkHZgL37ArvDw8k0= X-Received: from wmbdr13.prod.google.com ([2002:a05:600c:608d:b0:46f:aa50:d6ff]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:548a:b0:471:ff3:7514 with SMTP id 5b1f17b1804b1-47117877736mr89174955e9.12.1760948235873; Mon, 20 Oct 2025 01:17:15 -0700 (PDT) Date: Mon, 20 Oct 2025 08:17:15 +0000 In-Reply-To: <20251020020714.2511718-1-ojeda@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251020020714.2511718-1-ojeda@kernel.org> Message-ID: Subject: Re: [PATCH] objtool/rust: add one more `noreturn` Rust function From: Alice Ryhl To: Miguel Ojeda Cc: Josh Poimboeuf , Peter Zijlstra , Alex Gaynor , Boqun Feng , Gary Guo , "=?utf-8?B?QmrDtnJu?= Roy Baron" , Benno Lossin , Andreas Hindborg , Trevor Gross , Danilo Krummrich , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, patches@lists.linux.dev, stable@vger.kernel.org Content-Type: text/plain; charset="utf-8" On Mon, Oct 20, 2025 at 04:07:14AM +0200, Miguel Ojeda wrote: > 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. > > Cc: stable@vger.kernel.org # Needed in 6.12.y and later. > Cc: Josh Poimboeuf > Cc: Peter Zijlstra > Signed-off-by: Miguel Ojeda Reviewed-by: Alice Ryhl