Re: [PATCH] rust: Kbuild: set frame-pointer llvm module flag for CONFIG_FRAME_POINTER
From: Miguel Ojeda
Date: Fri Jun 19 2026 - 04:04:48 EST
On Tue, Jun 16, 2026 at 2:30 PM Alice Ryhl <aliceryhl@xxxxxxxxxx> 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: stable@xxxxxxxxxx
> Fixes: 2f7ab1267dc9 ("Kbuild: add Rust support")
> Link: https://github.com/rust-lang/rust/pull/156980
> Signed-off-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>
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: stable@xxxxxxxxxx`` 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