arm64/ptrace: Preserve previous registers for short regset write
authorDave Martin <Dave.Martin@arm.com>
Wed, 18 Jan 2017 16:25:21 +0000 (16:25 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Wed, 18 Jan 2017 18:05:06 +0000 (18:05 +0000)
commit9dd73f72f218320c6c90da5f834996e7360dc227
treec2eb10e5efeb801c7ecde2d37569497bb388c347
parent9a17b876b573441bfb3387ad55d98bf7184daf9d
arm64/ptrace: Preserve previous registers for short regset write

Ensure that if userspace supplies insufficient data to
PTRACE_SETREGSET to fill all the registers, the thread's old
registers are preserved.

Cc: <stable@vger.kernel.org> # 3.19.x-
Fixes: 766a85d7bc5d ("arm64: ptrace: add NT_ARM_SYSTEM_CALL regset")
Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Acked-by: Will Deacon <Will.Deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/kernel/ptrace.c