UPSTREAM: arm64: ptrace: fix compat reg getter/setter return values

(cherry picked from commit 85487edd252fa04718dcd735bc0f41213bbb9546)

copy_{to,from}_user return the number of bytes remaining on failure, not
an error code.

This patch returns -EFAULT when the copy operation didn't complete,
rather than expose the number of bytes not copied directly to userspace.

Change-Id: I471aa5e44acc788efb8210943e56219557f1b2ae
Signed-off-by: Will Deacon <>
1 file changed