On Thu, 23 Jan 2025, Ivan Kokshaysky wrote:
> > Indeed, SP_OFF in entry.S is the main suspect at the moment.
>
> In fact, it's the odd number of longs (29) in struct pt_regs that makes
> the stack misaligned by 8 bytes. The patch below works for me - no more
> oopses in rcu-torture test.
>
> Unless I'm missing something, this change shouldn't have any ill effects.
Umm, this is a part of UAPI, and the change in alignment changes the ABI
(think padding where `struct pt_regs' has been embedded into another
structure), so AFAICT it is a no-no.
But the only place I could quickly find this should matter for is this:
/* ... and find our stack ... */
lda $30,0x4000 - SIZEOF_PT_REGS($8)
which should be straightforward to fix:
lda $30,0x4000 - ((SIZEOF_PT_REGS + 15) & ~15)($8)
or suchlike. Have I missed anything?
Maciej