[kvm-unit-tests PATCH v8 09/35] powerpc: Fix stack backtrace termination
Thomas Huth
thuth at redhat.com
Tue Apr 16 17:14:00 AEST 2024
On 05/04/2024 10.35, Nicholas Piggin wrote:
> The backtrace handler terminates when it sees a NULL caller address,
> but the powerpc stack setup does not keep such a NULL caller frame
> at the start of the stack.
>
> This happens to work on pseries because the memory at 0 is mapped and
> it contains 0 at the location of the return address pointer if it
> were a stack frame. But this is fragile, and does not work with powernv
> where address 0 contains firmware instructions.
>
> Use the existing dummy frame on stack as the NULL caller, and create a
> new frame on stack for the entry code.
>
> Signed-off-by: Nicholas Piggin <npiggin at gmail.com>
> ---
> powerpc/cstart64.S | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
Reviewed-by: Thomas Huth <thuth at redhat.com>
More information about the Linuxppc-dev
mailing list