|
@@ -297,7 +297,7 @@ int ptrace_get_reg(struct task_struct *task, int regno, unsigned long *data)
|
|
}
|
|
}
|
|
#endif
|
|
#endif
|
|
|
|
|
|
- if (regno < (sizeof(struct pt_regs) / sizeof(unsigned long))) {
|
|
|
|
|
|
+ if (regno < (sizeof(struct user_pt_regs) / sizeof(unsigned long))) {
|
|
*data = ((unsigned long *)task->thread.regs)[regno];
|
|
*data = ((unsigned long *)task->thread.regs)[regno];
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
@@ -360,10 +360,10 @@ static int gpr_get(struct task_struct *target, const struct user_regset *regset,
|
|
ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf,
|
|
ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf,
|
|
&target->thread.regs->orig_gpr3,
|
|
&target->thread.regs->orig_gpr3,
|
|
offsetof(struct pt_regs, orig_gpr3),
|
|
offsetof(struct pt_regs, orig_gpr3),
|
|
- sizeof(struct pt_regs));
|
|
|
|
|
|
+ sizeof(struct user_pt_regs));
|
|
if (!ret)
|
|
if (!ret)
|
|
ret = user_regset_copyout_zero(&pos, &count, &kbuf, &ubuf,
|
|
ret = user_regset_copyout_zero(&pos, &count, &kbuf, &ubuf,
|
|
- sizeof(struct pt_regs), -1);
|
|
|
|
|
|
+ sizeof(struct user_pt_regs), -1);
|
|
|
|
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|
|
@@ -853,10 +853,10 @@ static int tm_cgpr_get(struct task_struct *target,
|
|
ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf,
|
|
ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf,
|
|
&target->thread.ckpt_regs.orig_gpr3,
|
|
&target->thread.ckpt_regs.orig_gpr3,
|
|
offsetof(struct pt_regs, orig_gpr3),
|
|
offsetof(struct pt_regs, orig_gpr3),
|
|
- sizeof(struct pt_regs));
|
|
|
|
|
|
+ sizeof(struct user_pt_regs));
|
|
if (!ret)
|
|
if (!ret)
|
|
ret = user_regset_copyout_zero(&pos, &count, &kbuf, &ubuf,
|
|
ret = user_regset_copyout_zero(&pos, &count, &kbuf, &ubuf,
|
|
- sizeof(struct pt_regs), -1);
|
|
|
|
|
|
+ sizeof(struct user_pt_regs), -1);
|
|
|
|
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|
|
@@ -3131,7 +3131,7 @@ long arch_ptrace(struct task_struct *child, long request,
|
|
case PTRACE_GETREGS: /* Get all pt_regs from the child. */
|
|
case PTRACE_GETREGS: /* Get all pt_regs from the child. */
|
|
return copy_regset_to_user(child, &user_ppc_native_view,
|
|
return copy_regset_to_user(child, &user_ppc_native_view,
|
|
REGSET_GPR,
|
|
REGSET_GPR,
|
|
- 0, sizeof(struct pt_regs),
|
|
|
|
|
|
+ 0, sizeof(struct user_pt_regs),
|
|
datavp);
|
|
datavp);
|
|
|
|
|
|
#ifdef CONFIG_PPC64
|
|
#ifdef CONFIG_PPC64
|
|
@@ -3140,7 +3140,7 @@ long arch_ptrace(struct task_struct *child, long request,
|
|
case PTRACE_SETREGS: /* Set all gp regs in the child. */
|
|
case PTRACE_SETREGS: /* Set all gp regs in the child. */
|
|
return copy_regset_from_user(child, &user_ppc_native_view,
|
|
return copy_regset_from_user(child, &user_ppc_native_view,
|
|
REGSET_GPR,
|
|
REGSET_GPR,
|
|
- 0, sizeof(struct pt_regs),
|
|
|
|
|
|
+ 0, sizeof(struct user_pt_regs),
|
|
datavp);
|
|
datavp);
|
|
|
|
|
|
case PTRACE_GETFPREGS: /* Get the child FPU state (FPR0...31 + FPSCR) */
|
|
case PTRACE_GETFPREGS: /* Get the child FPU state (FPR0...31 + FPSCR) */
|