ARM: 8643/3: arm/ptrace: Preserve previous registers for short regset write
commitbd7d069c7635da0276ce0f25155514b117b0b1eb
authorDave Martin <Dave.Martin@arm.com>
Wed, 18 Jan 2017 16:11:56 +0000 (18 17:11 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Feb 2017 23:25:35 +0000 (14 15:25 -0800)
treea242087e1f5f621c724456eca054a9490c5d5a9f
parent14cdf0f590447c4f7c5e1567ce73c81b2d9fe80b
ARM: 8643/3: arm/ptrace: Preserve previous registers for short regset write

commit 228dbbfb5d77f8e047b2a1d78da14b7158433027 upstream.

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

Fixes: 5be6f62b0059 ("ARM: 6883/1: ptrace: Migrate to regsets framework")
Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Acked-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm/kernel/ptrace.c