Commit 8a86176c authored by Mike Frysinger's avatar Mike Frysinger Committed by Bryan Wu
Browse files

Blackfin arch: overlay thread.usp over PT_USP



overlay thread.usp over PT_USP when getting the whole regfile to
match PT_USP behavior

Signed-off-by: default avatarMike Frysinger <vapier.adi@gmail.com>
Signed-off-by: default avatarBryan Wu <cooloney@kernel.org>
parent 3c1fbd51
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -82,8 +82,10 @@ static inline struct pt_regs *get_user_regs(struct task_struct *task)
 */
static inline int ptrace_getregs(struct task_struct *tsk, void __user *uregs)
{
	struct pt_regs *regs = get_user_regs(tsk);
	return copy_to_user(uregs, regs, sizeof(struct pt_regs)) ? -EFAULT : 0;
	struct pt_regs regs;
	memcpy(&regs, get_user_regs(tsk), sizeof(regs));
	regs.usp = tsk->thread.usp;
	return copy_to_user(uregs, &regs, sizeof(struct pt_regs)) ? -EFAULT : 0;
}

/* Mapping from PT_xxx to the stack offset at which the register is