powerpc/ptrace: Use copy_{from, to}_user() rather than open-coding

Michael Ellerman patch-notifications at ellerman.id.au
Tue Jun 5 00:11:15 AEST 2018


On Tue, 2018-05-29 at 12:57:38 UTC, Michael Ellerman wrote:
> From: Al Viro <viro at ZenIV.linux.org.uk>
> 
> 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 at zeniv.linux.org.uk>
> Signed-off-by: Michael Ellerman <mpe at ellerman.id.au>
> Reviewed-by: Samuel Mendoza-Jonas <sam at mendozajonas.com>

Applied to powerpc next.

https://git.kernel.org/powerpc/c/6bcdd2972b9f6ebda9ae5c7075e2d5

cheers


More information about the Linuxppc-dev mailing list