[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <ef208db15cab7a1234bb6fe601236eff9b2a317c.1488791430.git.jslaby@suse.cz>
Date: Mon, 6 Mar 2017 10:10:29 +0100
From: Jiri Slaby <jslaby@...e.cz>
To: stable@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, Dave Martin <Dave.Martin@....com>,
Chris Metcalf <cmetcalf@...lanox.com>,
Jiri Slaby <jslaby@...e.cz>
Subject: [PATCH 3.12 005/113] tile/ptrace: Preserve previous registers for short regset write
From: Dave Martin <Dave.Martin@....com>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit fd7c99142d77dc4a851879a66715abf12a3193fb upstream.
Ensure that if userspace supplies insufficient data to
PTRACE_SETREGSET to fill all the registers, the thread's old
registers are preserved.
Signed-off-by: Dave Martin <Dave.Martin@....com>
Signed-off-by: Chris Metcalf <cmetcalf@...lanox.com>
Signed-off-by: Jiri Slaby <jslaby@...e.cz>
---
arch/tile/kernel/ptrace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/tile/kernel/ptrace.c b/arch/tile/kernel/ptrace.c
index de98c6ddf136..2343126c4ad2 100644
--- a/arch/tile/kernel/ptrace.c
+++ b/arch/tile/kernel/ptrace.c
@@ -110,7 +110,7 @@ static int tile_gpr_set(struct task_struct *target,
const void *kbuf, const void __user *ubuf)
{
int ret;
- struct pt_regs regs;
+ struct pt_regs regs = *task_pt_regs(target);
ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, ®s, 0,
sizeof(regs));
--
2.12.0
Powered by blists - more mailing lists