commit
99dfe80a2a246c600440a815741fd2e74a8b4977 upstream.
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")
Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
[bwh: Backported to 3.2:
- fpscr and fpr are direct members of struct thread_struct
- Use memcpy() for fpscr, like the reverse copy below, to avoid type error
- Adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>