Commit 682e7bf9 authored by Anton Blanchard's avatar Anton Blanchard

ppc64: ptrace32 fix when tracing 64bit tasks from Will Schmidt

parent 2df556fd
...@@ -177,8 +177,13 @@ int sys32_ptrace(long request, long pid, unsigned long addr, unsigned long data) ...@@ -177,8 +177,13 @@ int sys32_ptrace(long request, long pid, unsigned long addr, unsigned long data)
if (numReg >= PT_FPR0) { if (numReg >= PT_FPR0) {
if (child->thread.regs->msr & MSR_FP) if (child->thread.regs->msr & MSR_FP)
giveup_fpu(child); giveup_fpu(child);
} if (numReg == PT_FPSCR)
tmp = get_reg(child, numReg); tmp = ((unsigned int *)child->thread.fpscr);
else
tmp = ((unsigned long int *)child->thread.fpr)[numReg - PT_FPR0];
} else { /* register within PT_REGS struct */
tmp = get_reg(child, numReg);
}
reg32bits = ((u32*)&tmp)[part]; reg32bits = ((u32*)&tmp)[part];
ret = put_user(reg32bits, (u32*)data); ret = put_user(reg32bits, (u32*)data);
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment