powerpc/ptrace: Use copy_{from, to}_user() rather than open-coding
authorAl Viro <viro@zeniv.linux.org.uk>
Tue, 29 May 2018 12:57:38 +0000 (22:57 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 3 Jun 2018 10:43:41 +0000 (20:43 +1000)
commit6bcdd2972b9f6ebda9ae5c7075e2d59770dbbf12
treea47f47381f5dbc5375f0584a132ae57b5fa947d1
parent20b344971433da7bcd19265e5dc00a4d0df5e77e
powerpc/ptrace: Use copy_{from, to}_user() rather than open-coding

In PPC_PTRACE_GETHWDBGINFO and PPC_PTRACE_SETHWDEBUG we do an
access_ok() check and then __copy_{from,to}_user().

Instead we should just use copy_{from,to}_user() which does all that
for us and is less error prone.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/ptrace.c