[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <lsq.1489146383.351018946@decadent.org.uk>
Date: Fri, 10 Mar 2017 11:46:23 +0000
From: Ben Hutchings <ben@...adent.org.uk>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
CC: akpm@...ux-foundation.org, "Dave Martin" <Dave.Martin@....com>,
"Chris Metcalf" <cmetcalf@...lanox.com>
Subject: [PATCH 3.16 189/370] tile/ptrace: Preserve previous registers for
short regset write
3.16.42-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Dave Martin <Dave.Martin@....com>
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: Ben Hutchings <ben@...adent.org.uk>
---
arch/tile/kernel/ptrace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/tile/kernel/ptrace.c
+++ b/arch/tile/kernel/ptrace.c
@@ -110,7 +110,7 @@ static int tile_gpr_set(struct task_stru
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));
Powered by blists - more mailing lists