[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <grdfkevm4nnovdefhn7thydixjtdt2w2aybuvnrtot2jolyte3@pmvcv3vbmmll>
Date: Wed, 14 May 2025 12:14:27 -0700
From: Josh Poimboeuf <jpoimboe@...nel.org>
To: Joel Fernandes <joelagnelf@...dia.com>
Cc: Timur Tabi <ttabi@...dia.com>, "ojeda@...nel.org" <ojeda@...nel.org>,
John Hubbard <jhubbard@...dia.com>, "dakr@...nel.org" <dakr@...nel.org>,
"a.hindborg@...nel.org" <a.hindborg@...nel.org>, "boqun.feng@...il.com" <boqun.feng@...il.com>,
"patches@...ts.linux.dev" <patches@...ts.linux.dev>, "tmgross@...ch.edu" <tmgross@...ch.edu>,
"stable@...r.kernel.org" <stable@...r.kernel.org>, "alex.gaynor@...il.com" <alex.gaynor@...il.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, "benno.lossin@...ton.me" <benno.lossin@...ton.me>,
"rust-for-linux@...r.kernel.org" <rust-for-linux@...r.kernel.org>, "bjorn3_gh@...tonmail.com" <bjorn3_gh@...tonmail.com>,
"peterz@...radead.org" <peterz@...radead.org>, "aliceryhl@...gle.com" <aliceryhl@...gle.com>,
Alexandre Courbot <acourbot@...dia.com>, "gary@...yguo.net" <gary@...yguo.net>,
Alistair Popple <apopple@...dia.com>
Subject: Re: [PATCH 1/5] objtool/rust: add one more `noreturn` Rust function
for Rust 1.87.0
On Wed, May 14, 2025 at 10:52:17AM -0400, Joel Fernandes wrote:
> On 5/13/2025 8:43 PM, Timur Tabi wrote:
> > On Tue, 2025-05-13 at 17:22 -0700, John Hubbard wrote:
> >> On 5/13/25 2:58 PM, Joel Fernandes wrote:
> >>> On Tue, May 13, 2025 at 02:07:57PM -0400, Joel Fernandes wrote:
> >>>> On Fri, May 02, 2025 at 04:02:33PM +0200, Miguel Ojeda wrote:
> >>>>> Starting with Rust 1.87.0 (expected 2025-05-15), `objtool` may report:
> >> ...
> >>> Btw, Danilo mentioned to me the latest Rust compiler (1.86?) does not give
> >>> this warning for that patch.
> >>
> >> I'm sorry to burst this happy bubble, but I just upgraded to rustc 1.86 and did
> >> a clean build, and I *am* setting these warnings:
> >
> > I see these warnings with .c code also:
> >
> > CHK kernel/kheaders_data.tar.xz
> > drivers/media/pci/solo6x10/solo6x10-tw28.o: error: objtool: tw28_set_ctrl_val() falls through to
> > next function tw28_get_ctrl_val()
> > make[9]: *** [scripts/Makefile.build:203: drivers/media/pci/solo6x10/solo6x10-tw28.o] Error 1
> >
> > I think it's an objtool bug and not a rustc bug.
>
> Thanks John and Timur.
> And sigh, fwiw I pulled the latest rust nightly build and I see the warning as well:
>
> rustc --version
> rustc 1.89.0-nightly (414482f6a 2025-05-13)
>
> I am leaning more towards Timur's opinion that this is more than likely an
> objtool issue.
The above warning is in completely different code from the Rust one, so
they're likely unrelated.
The fallthrough warnings are typically caused by either Clang undefined
behavior (usually potential divide by zero or negative shift), or a call
to an unannotated noreturn function.
Timur, can you share your .config and compiler version?
--
Josh
Powered by blists - more mailing lists