[Crash-utility] Problem in bt for ARM64

Dave Anderson anderson at redhat.com
Thu Sep 21 19:33:48 UTC 2017


----- Original Message -----
> Ok. I have seen this change in the pt_regs struct before but did not connect
> it to this problem. I see these new field in pt_regs in earlier kernel
> versions than 4.7, but it is probably backports. It really does not matter
> for the solution of the problem. The following change works for me:
> Change:
> #define USER_EFRAME_OFFSET (304)
> to:
> #define USER_EFRAME_OFFSET (STRUCT_SIZE("pt_regs") + 16)
> 
> Then you might want to avoid the recalculation of the struct size. I think
> your patch does the same thing.

Yeah, but doing it your way makes better sense.  In fact, I see that there's 
another commit coming down the pike in 4.14-rc1 that changes the size yet again:

diff --git a/arch/arm64/include/asm/ptrace.h b/arch/arm64/include/asm/ptrace.h
index 11403fd..ee72aa9 100644
--- a/arch/arm64/include/asm/ptrace.h
+++ b/arch/arm64/include/asm/ptrace.h
@@ -119,6 +119,7 @@ struct pt_regs {
        u64 syscallno;
        u64 orig_addr_limit;
        u64 unused;     // maintain 16 byte alignment
+       u64 stackframe[2];
 };

Thanks,
  Dave





More information about the Crash-utility mailing list