I noticed that the size of pt_regs was already saved in the size table. So an easy fix would be: #define USER_EFRAME_OFFSET (SIZE(pt_regs) + 16) Jan ________________________________________ Från: crash-utility-bounces@xxxxxxxxxx <crash-utility-bounces@xxxxxxxxxx> för Reinoud Koornstra <reinoudkoornstra@xxxxxxxxx> Skickat: den 21 september 2017 22:46 Till: Discussion list for crash utility usage, maintenance and development Ämne: Re: Problem in bt for ARM64 On Thu, Sep 21, 2017 at 12:33 PM, Dave Anderson <anderson@xxxxxxxxxx> wrote: > > > ----- 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]; > }; > What am I missing here? Why not use the sizeof(u64) which is in some cases 8? #define USER_EFRAME_OFFSET (STRUCT_SIZE("pt_regs") + sizeof(u64)) Would not give 16 bytes, but 8. Thanks, Reinoud. > > Thanks, > Dave > > > -- > Crash-utility mailing list > Crash-utility@xxxxxxxxxx > https://www.redhat.com/mailman/listinfo/crash-utility -- Crash-utility mailing list Crash-utility@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/crash-utility -- Crash-utility mailing list Crash-utility@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/crash-utility