powerpc/ptrace: Preserve previous fprs/vsrs on short regset write
authorDave Martin <Dave.Martin@arm.com>
Thu, 5 Jan 2017 16:50:57 +0000 (16:50 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 20 Jan 2017 03:54:43 +0000 (14:54 +1100)
commit99dfe80a2a246c600440a815741fd2e74a8b4977
treed63db8f9b737a2a2cac0e70a030dbfb5cc3fc007
parent27593d72c4ad451ed13af35354b941bcd0abcec6
powerpc/ptrace: Preserve previous fprs/vsrs on 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.

Fixes: c6e6771b87d4 ("powerpc: Introduce VSX thread_struct and CONFIG_VSX")
Cc: stable@vger.kernel.org # v2.6.27+
Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/ptrace.c