[1/3] powerpc: Split user/kernel definitions of struct pt_regs

Michael Ellerman patch-notifications at ellerman.id.au
Mon Oct 15 15:01:13 AEDT 2018


On Sat, 2018-10-13 at 10:56:44 UTC, Michael Ellerman wrote:
> We use a shared definition for struct pt_regs in uapi/asm/ptrace.h.
> That means the layout of the structure is ABI, ie. we can't change it.
> 
> That would be fine if it was only used to describe the user-visible
> register state of a process, but it's also the struct we use in the
> kernel to describe the registers saved in an interrupt frame.
> 
> We'd like more flexibility in the content (and possibly layout) of the
> kernel version of the struct, but currently that's not possible.
> 
> So split the definition into a user-visible definition which remains
> unchanged, and a kernel internal one.
> 
> At the moment they're still identical, and we check that at build
> time. That's because we have code (in ptrace etc.) that assumes that
> they are the same. We will fix that code in future patches, and then
> we can break the strict symmetry between the two structs.
> 
> Signed-off-by: Michael Ellerman <mpe at ellerman.id.au>
> Reviewed-by: Nicholas Piggin <npiggin at gmail.com>

Series applied to powerpc next.

https://git.kernel.org/powerpc/c/002af9391bfbe84f8e491bb10bd9c6

cheers


More information about the Linuxppc-dev mailing list