Re: [kvm-unit-tests PATCH v2 0/4] Better backtraces for leaf functions

Mathias Krause
2025-11-14T15:58:45Z

+Sean

Sean, while you're currently in KUT maintainer mode, can you please take
a look at this? The ARM bits have already been ack'ed by Andrew and
Paolo, apparently, has little time for KUT as well. But as you currently
seem to be looking through the pending KUT patches, maybe this one can
get some attention as well?

Thanks,
Mathias

On 15.09.25 23:54, Mathias Krause wrote:
> This is v2 of [1], trying to enhance backtraces involving leaf
> functions.
>
> This version fixes backtraces on ARM and ARM64 as well, as ARM currently
> fails hard for leaf functions lacking a proper stack frame setup, making
> it dereference invalid pointers. ARM64 just skips frames, much like x86
> does.
>
> v2 fixes this by introducing the concept of "late CFLAGS" that get
> evaluated in the top-level Makefile once all other optional flags have
> been added to $(CFLAGS), which is needed for x86's version at least.
>
> Please apply!
>
> Thanks,
> Mathias
>
> [1] https://lore.kernel.org/kvm/20250724181759.1974692-1-minipli@grsecurity.net/
>
> Mathias Krause (4):
> Makefile: Provide a concept of late CFLAGS
> x86: Better backtraces for leaf functions
> arm64: Better backtraces for leaf functions
> arm: Fix backtraces involving leaf functions
>
> Makefile | 4 ++++
> arm/Makefile.arm | 8 ++++++++
> arm/Makefile.arm64 | 6 ++++++
> x86/Makefile.common | 11 +++++++++++
> lib/arm/stack.c | 18 ++++++++++++++++--
> 5 files changed, 45 insertions(+), 2 deletions(-)
>