On 4/6/2026 8:49 PM, Dylan Hatch wrote:
> Build with -Wa,--gsframe-3 flags to generate a .sframe section. This
> will be used for in-kernel reliable stacktrace in cases where the frame
> pointer alone is insufficient.
> 
> Currently, the sframe format only supports arm64, x86_64 and s390x
> architectures.
> 
> Signed-off-by: Weinan Liu <[email protected]>
> Signed-off-by: Dylan Hatch <[email protected]>
> Reviewed-by: Prasanna Kumar T S M <[email protected]>

> diff --git a/arch/arm64/include/asm/unwind_sframe.h 
> b/arch/arm64/include/asm/unwind_sframe.h

> @@ -0,0 +1,12 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +#ifndef _ASM_ARM64_UNWIND_SFRAME_H
> +#define _ASM_ARM64_UNWIND_SFRAME_H
> +
> +#ifdef CONFIG_ARM64

Nit: If I am not mistaken above guard for CONFIG_ARM64 is superfluous,
as this resides in arch/arm64/ anyway.

x86 needs to guard with CONFIG_X86_64, as only x86 64-bit supports
SFrame (and not x86 32-bit nor x86 X32).

> +
> +#define SFRAME_REG_SP        31
> +#define SFRAME_REG_FP        29
> +
> +#endif
> +
> +#endif /* _ASM_ARM64_UNWIND_SFRAME_H */
Regards,
Jens
-- 
Jens Remus
Linux on Z Development (D3303)
[email protected] / [email protected]

IBM Deutschland Research & Development GmbH; Vorsitzender des Aufsichtsrats: 
Wolfgang Wendt; Geschäftsführung: David Faller; Sitz der Gesellschaft: 
Ehningen; Registergericht: Amtsgericht Stuttgart, HRB 243294
IBM Data Privacy Statement: https://www.ibm.com/privacy/


Reply via email to