]> git.baikalelectronics.ru Git - kernel.git/commit
s390/ptrace: Preserve previous registers for short regset write
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 24 Jan 2017 07:05:52 +0000 (08:05 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 24 Jan 2017 07:33:40 +0000 (08:33 +0100)
commit48a8b23c3a486c567e2121d6ef53ce198d3d6880
treedfc3c82b1c6ddec3df7c0ebfcef53928d2ed2f4c
parent8488b0c703ffe7c40ca25bebfd489abf231aee7f
s390/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.

convert_vx_to_fp() is adapted to handle only a specified number of
registers rather than unconditionally handling all of them: other
callers of this function are adapted appropriately.

Based on an initial patch by Dave Martin.

Cc: stable@vger.kernel.org
Reported-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/kernel/ptrace.c