Re: Concerns about SFrame viability for userspace stack walking
From: Andi Kleen
Date: Thu Oct 30 2025 - 13:53:14 EST
Peter Zijlstra <peterz@xxxxxxxxxxxxx> writes:
>
> So the SFrame unwinder is fairly simple code, but what does an .eh_frame
> unwinder look like? Having read most of the links in your email, there
> seem to be references to DWARF byte code interpreters and stuff like
> that.
Here's Jan Beulich's Linux implementation. The x86 version was
removed, but it lives on for ARC:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arc/kernel/unwind.c
SH also has another one from Matt Flemming:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/sh/kernel/dwarf.c
IMNSHO the whole sframe effort is misguided because all the major ISAs do have
shadow stack hardware support now which is generally a better option.
It would be better to invest effort in deploying that widely.
-Andi