ARM: rust: Generate unwind tables for Rust code with ARM_UNWIND
Subsystems (2)
PATCH 1/1 ARM: rust: Generate unwind tables for Rust code with ARM_UNWIND
From: FUJITA Tomonori <[email protected]>
When CONFIG_ARM_UNWIND=y, C code is built with -funwind-tables, but Rust code is built with -Cforce-unwind-tables=n. As a result, the unwinder stops at the first Rust frame.
Pass -Cforce-unwind-tables=y to rustc in that case, as arm64 does.
--- arch/arm/Makefile | 1 + 1 file changed, 1 insertion(+)
arch/arm/Makefile +1 -0
@@ -117,6 +117,7 @@ endif ifeq ($(CONFIG_ARM_UNWIND),y) CFLAGS_ABI +=-funwind-tables +KBUILD_RUSTFLAGS += -Cforce-unwind-tables=y endif ifeq ($(CONFIG_CC_IS_CLANG),y)
base-commit: a90ee4305c4a5df72c11b31dacfdc76e00fcf78a
Signature · 1 line
2.43.0
Hi Russell, Miguel,
Quoted 28 lines · On Fri, 9 Oct 2026 21:41:24 +0900 FUJITA Tomonori <[email protected]> wrote:
From: FUJITA Tomonori <[email protected]>
When
CONFIG_ARM_UNWIND=y, C code is built with -funwind-tables, but Rust code is built with -Cforce-unwind-tables=n. As a result, the unwinder stops at the first Rust frame.Pass -Cforce-unwind-tables=y to rustc in that case, as arm64 does.
Fixes ccb8ce526807 ("ARM: 9441/1: rust: Enable Rust support for ARMv7")Assisted-by LLMSigned-off-by FUJITA Tomonori <[email protected]>--- arch/arm/Makefile | 1 + 1 file changed, 1 insertion(+)arch/arm/Makefile +1
-0@@ -117,6 +117,7 @@ endif ifeq ($(CONFIG_ARM_UNWIND),y) CFLAGS_ABI +=-funwind-tables +KBUILD_RUSTFLAGS += -Cforce-unwind-tables=y endif ifeq ($(CONFIG_CC_IS_CLANG),y)
Quoted 1 line
base-commit:
a90ee4305c4a5df72c11b31dacfdc76e00fcf78a
Gentle ping. The patch still applies cleanly on top of v7.4-rc1.
Which tree should this go through?
Quoted 4 lines · FUJITA Tomonori
Gentle ping. The patch still applies cleanly on top of v7.4-rc1.
Which tree should this go through?
I guess arm's ideally, but I am happy to take it with their OK (do you want this Cc: stable@?)
A review/test by Christian would be nice. Rudraksha may want to test too (Cc'd).
Thanks!
Cheers,
Miguel
Quoted 8 lines · On Tue, 3 Nov 2026 10:34:59 +0100 Miguel Ojeda…
Quoted 4 lines · FUJITA Tomonori
Gentle ping. The patch still applies cleanly on top of v7.4-rc1.
Which tree should this go through?
I guess arm's ideally, but I am happy to take it with their OK (do you want this Cc: stable@?)
I don't think it needs Cc: stable. It only affects the backtrace in an Oops or a WARNING, not how the kernel runs.
Quoted 3 lines · FUJITA Tomonori
I don't think it needs Cc: stable. It only affects the backtrace in an Oops or a WARNING, not how the kernel runs.
Thanks Tomo -- I was mainly asking arm, since I didn't want to pick the wrong choice for them if I were to apply it.
i.e. I agree it it doesn't fix a bug in that sense, and it is safer to not backport it. Having said that, it could help downstream kernels, i.e. it fixes something unexpected in the backtraces, so it could be a candidate (the stable team picks sometimes things that are even less of an effect). And thus my question for arm.
Cheers,
Miguel