mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-01-13 04:41:17 +00:00
tile/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 Signed-off-by: Dave Martin <Dave.Martin@arm.com> Signed-off-by: Chris Metcalf <cmetcalf@mellanox.com>
This commit is contained in:
parent
0c744ea4f7
commit
fd7c99142d
@ -111,7 +111,7 @@ static int tile_gpr_set(struct task_struct *target,
|
|||||||
const void *kbuf, const void __user *ubuf)
|
const void *kbuf, const void __user *ubuf)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
struct pt_regs regs;
|
struct pt_regs regs = *task_pt_regs(target);
|
||||||
|
|
||||||
ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, ®s, 0,
|
ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, ®s, 0,
|
||||||
sizeof(regs));
|
sizeof(regs));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user