ret = -EIO;
if (copied != sizeof(tmp))
break;
- ret = put_user(tmp, (u32*)data);
+ ret = put_user(tmp, (u32 __user *)data);
break;
}
case PPC_PTRACE_PEEKDATA_3264: {
u32 tmp;
int copied;
- u32* addrOthers;
+ u32 __user * addrOthers;
ret = -EIO;
/* Get the addr in the other process that we want to read */
- if (get_user(addrOthers, (u32**)addr) != 0)
+ if (get_user(addrOthers, (u32 __user * __user *)addr) != 0)
break;
copied = access_process_vm(child, (u64)addrOthers, &tmp,
sizeof(tmp), 0);
if (copied != sizeof(tmp))
break;
- ret = put_user(tmp, (u32*)data);
+ ret = put_user(tmp, (u32 __user *)data);
break;
}
if (index < PT_FPR0) {
tmp = get_reg(child, index);
} else {
- if (child->thread.regs->msr & MSR_FP)
- giveup_fpu(child);
+ flush_fp_to_thread(child);
/*
* the user space code considers the floating point
* to be an array of unsigned int (32 bits) - the
*/
tmp = ((unsigned int *)child->thread.fpr)[index - PT_FPR0];
}
- ret = put_user((unsigned int)tmp, (u32*)data);
+ ret = put_user((unsigned int)tmp, (u32 __user *)data);
break;
}
break;
if (numReg >= PT_FPR0) {
- if (child->thread.regs->msr & MSR_FP)
- giveup_fpu(child);
+ flush_fp_to_thread(child);
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];
- ret = put_user(reg32bits, (u32*)data);
+ ret = put_user(reg32bits, (u32 __user *)data);
break;
}
case PPC_PTRACE_POKETEXT_3264:
case PPC_PTRACE_POKEDATA_3264: {
u32 tmp = data;
- u32* addrOthers;
+ u32 __user * addrOthers;
/* Get the addr in the other process that we want to write into */
ret = -EIO;
- if (get_user(addrOthers, (u32**)addr) != 0)
+ if (get_user(addrOthers, (u32 __user * __user *)addr) != 0)
break;
ret = 0;
if (access_process_vm(child, (u64)addrOthers, &tmp,
if (index < PT_FPR0) {
ret = put_reg(child, index, data);
} else {
- if (child->thread.regs->msr & MSR_FP)
- giveup_fpu(child);
+ flush_fp_to_thread(child);
/*
* the user space code considers the floating point
* to be an array of unsigned int (32 bits) - the
|| ((numReg > PT_CCR) && (numReg < PT_FPR0)))
break;
if (numReg >= PT_FPR0) {
- if (child->thread.regs->msr & MSR_FP)
- giveup_fpu(child);
+ flush_fp_to_thread(child);
}
if (numReg == PT_MSR)
data = (data & MSR_DEBUGCHANGE)
case PPC_PTRACE_GETREGS: { /* Get GPRs 0 - 31. */
int i;
unsigned long *reg = &((unsigned long *)child->thread.regs)[0];
- unsigned int *tmp = (unsigned int *)addr;
+ unsigned int __user *tmp = (unsigned int __user *)addr;
for (i = 0; i < 32; i++) {
ret = put_user(*reg, tmp);
case PPC_PTRACE_SETREGS: { /* Set GPRs 0 - 31. */
int i;
unsigned long *reg = &((unsigned long *)child->thread.regs)[0];
- unsigned int *tmp = (unsigned int *)addr;
+ unsigned int __user *tmp = (unsigned int __user *)addr;
for (i = 0; i < 32; i++) {
ret = get_user(*reg, tmp);
case PPC_PTRACE_GETFPREGS: { /* Get FPRs 0 - 31. */
int i;
unsigned long *reg = &((unsigned long *)child->thread.fpr)[0];
- unsigned int *tmp = (unsigned int *)addr;
+ unsigned int __user *tmp = (unsigned int __user *)addr;
- if (child->thread.regs->msr & MSR_FP)
- giveup_fpu(child);
+ flush_fp_to_thread(child);
for (i = 0; i < 32; i++) {
ret = put_user(*reg, tmp);
case PPC_PTRACE_SETFPREGS: { /* Get FPRs 0 - 31. */
int i;
unsigned long *reg = &((unsigned long *)child->thread.fpr)[0];
- unsigned int *tmp = (unsigned int *)addr;
+ unsigned int __user *tmp = (unsigned int __user *)addr;
- if (child->thread.regs->msr & MSR_FP)
- giveup_fpu(child);
+ flush_fp_to_thread(child);
for (i = 0; i < 32; i++) {
ret = get_user(*reg, tmp);