]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/ptrace: Don't use sizeof(struct pt_regs) in ptrace code
authorMichael Ellerman <mpe@ellerman.id.au>
Fri, 12 Oct 2018 13:39:31 +0000 (00:39 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 14 Oct 2018 07:04:09 +0000 (18:04 +1100)
commit203ddd26123f459e2b6c96c1a52b416b669d94ae
treeac1398c7b5925a65e4c7e5dfb566f9a412c37a59
parent63d5e2e5c2e64d01406239e2d38841e819b8becd
powerpc/ptrace: Don't use sizeof(struct pt_regs) in ptrace code

Now that we've split the user & kernel versions of pt_regs we need to
be more careful in the ptrace code.

For now we've ensured the location of the fields in both structs is
the same, so most of the ptrace code doesn't need updating.

But there are a few places where we use sizeof(pt_regs), and these
will be wrong as soon as we increase the size of the kernel structure.

So flip them all to use sizeof(user_pt_regs).

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/ptrace.c