提交 228dbbfb 编写于 作者: D Dave Martin 提交者: Russell King

ARM: 8643/3: arm/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.0.x-
Fixes: 5be6f62b ("ARM: 6883/1: ptrace: Migrate to regsets framework")
Signed-off-by: NDave Martin <Dave.Martin@arm.com>
Acked-by: NRussell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 97a98ae5
......@@ -600,7 +600,7 @@ static int gpr_set(struct task_struct *target,
const void *kbuf, const void __user *ubuf)
{
int ret;
struct pt_regs newregs;
struct pt_regs newregs = *task_pt_regs(target);
ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf,
&newregs,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册