Re: [PATCH] rust: Kbuild: set frame-pointer llvm module flag for CONFIG_FRAME_POINTER
Miguel Ojeda <[email protected]>
| Newsgroups | org.kernel.vger.linux-kbuild,dev.linux.lists.llvm,org.kernel.vger.linux-kernel,org.kernel.vger.rust-for-linux |
|---|---|
| Message-ID | <CANiq72kbbhHA8d2wtNbaPR5Xx2kC25_D1r-EEeZWn7ojo=M7iQ@mail.gmail.com> |
On Tue, Jun 16, 2026 at 2:30 PM Alice Ryhl <[email protected]> wrote: > > Due to a rustc bug, the -Cforce-frame-pointers=y flag only emits the > frame-pointer annotation for functions, but not for the module. This > means that functions generated by the LLVM backend such as > 'asan.module_ctor' do not receive the frame-pointer annotation. > > This is likely to lead to broken backtraces and may also cause issues > with ftrace if these features are used with functions generated by the > LLVM backend. > > Thus, use -Zllvm_module_flag to work around this rustc bug if using a > rustc without the fix. > > Cc: [email protected] > Fixes: 2f7ab1267dc9 ("Kbuild: add Rust support") > Link: https://github.com/rust-lang/rust/pull/156980 > Signed-off-by: Alice Ryhl <[email protected]> Applied to `rust-fixes` -- thanks everyone! [ The fix [1] has landed for Rust 1.98.0 (expected release on 2026-08-20). - Miguel ] [ - Adjusted Cc: stable@ as discussed. - Added comment with link to the PR, similar to what we did in commit ac35b5580ace ("rust: arm64: set uwtable llvm module flag for CONFIG_UNWIND_TABLES"). - Miguel ] By the way, as far as I understand, the `vger.` version of the Cc: stable@ address is the one that should be used normally: Use ``Cc: [email protected]`` instead when fixing unpublished vulnerabilities: it reduces the chance of accidentally exposing the fix to the public by way of 'git send-email', as mails sent to that address are not delivered anywhere. Cheers, Miguel