[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABeNrKVfCHww2k_W-0s4GQE=2bA+wjje=FEH=gL8FhNbFB1tOw@mail.gmail.com>
Date: Thu, 15 May 2025 14:12:48 -0700
From: Kane York <kanepyork@...il.com>
To: ttabi@...dia.com
Cc: a.hindborg@...nel.org, acourbot@...dia.com, alex.gaynor@...il.com,
aliceryhl@...gle.com, apopple@...dia.com, benno.lossin@...ton.me,
bjorn3_gh@...tonmail.com, boqun.feng@...il.com, dakr@...nel.org,
gary@...yguo.net, jhubbard@...dia.com, joelagnelf@...dia.com,
jpoimboe@...nel.org, linux-kernel@...r.kernel.org, ojeda@...nel.org,
patches@...ts.linux.dev, peterz@...radead.org, rust-for-linux@...r.kernel.org,
stable@...r.kernel.org, tmgross@...ch.edu
Subject: Re: [PATCH 1/5] objtool/rust: add one more `noreturn` Rust function
for Rust 1.87.0
On Thu, 15 May 2025 19:06:10 +0000, Timur Tabi <ttabi@...dia.com> wrote:
> On Thu, 2025-05-15 at 09:18 -0700, Josh Poimboeuf wrote:
> > > Since I build with LLVM=1, I'm assuming the answer is 18.1.3
> >
> > I'm not able to recreate, can you run with OBJTOOL_VERBOSE=1 and paste
> > the output?
>
> You probably can't repro because it includes code that hasn't been merged upstream yet. Try this:
>
> https://github.com/ttabi/linux/commits/alex
>
> CHK kernel/kheaders_data.tar.xz
> drivers/gpu/nova-core/nova_core.o: warning: objtool:
> _RNvXsa_NtCs8S3917Wilyo_9nova_core5vbiosNtB5_14PciAtBiosImageINtNtCsgK88DPai1lC_4core7convert7TryFro
> mNtB5_13BiosImageBaseE8try_from() falls through to next function
...
> 011b 634b: e8 00 00 00 00 call 6350 <.Ltmp38> 634c:
> R_X86_64_PLT32
> _RNvNtNtCsgK88DPai1lC_4core5slice5index26slice_start_index_len_fail-0x4
Yup, that's an unrecognized noreturn function.
src/core/slice/index.rs:
> #[cfg_attr(not(feature = "panic_immediate_abort"), inline(never), cold)]
> #[cfg_attr(feature = "panic_immediate_abort", inline)]
> #[track_caller]
> #[rustc_const_unstable(feature = "const_slice_index", issue = "none")]
> const fn slice_start_index_len_fail(index: usize, len: usize) -> ! {
> // SAFETY: we are just panicking here
> unsafe {
> const_eval_select(
> (index, len),
> slice_start_index_len_fail_ct,
> slice_start_index_len_fail_rt,
> )
> }
> }
>
> // FIXME const-hack
> #[inline]
> #[track_caller]
> fn slice_start_index_len_fail_rt(index: usize, len: usize) -> ! {
> panic!("range start index {index} out of range for slice of length {len}");
> }
The return is at offset 0093 (x62c3) with a jump to __x86_return_thunk.
Powered by blists - more mailing lists