Commit 1581e330 authored by Linus Torvalds's avatar Linus Torvalds

ppc64: add more user annotations to ptrace.c

parent 3cbd4e38
...@@ -101,7 +101,7 @@ int sys_ptrace(long request, long pid, long addr, long data) ...@@ -101,7 +101,7 @@ int sys_ptrace(long request, long pid, long addr, long data)
ret = -EIO; ret = -EIO;
if (copied != sizeof(tmp)) if (copied != sizeof(tmp))
break; break;
ret = put_user(tmp,(unsigned long *) data); ret = put_user(tmp,(unsigned long __user *) data);
break; break;
} }
...@@ -123,7 +123,7 @@ int sys_ptrace(long request, long pid, long addr, long data) ...@@ -123,7 +123,7 @@ int sys_ptrace(long request, long pid, long addr, long data)
giveup_fpu(child); giveup_fpu(child);
tmp = ((unsigned long *)child->thread.fpr)[index - PT_FPR0]; tmp = ((unsigned long *)child->thread.fpr)[index - PT_FPR0];
} }
ret = put_user(tmp,(unsigned long *) data); ret = put_user(tmp,(unsigned long __user *) data);
break; break;
} }
...@@ -213,7 +213,7 @@ int sys_ptrace(long request, long pid, long addr, long data) ...@@ -213,7 +213,7 @@ int sys_ptrace(long request, long pid, long addr, long data)
case PPC_PTRACE_GETREGS: { /* Get GPRs 0 - 31. */ case PPC_PTRACE_GETREGS: { /* Get GPRs 0 - 31. */
int i; int i;
unsigned long *reg = &((unsigned long *)child->thread.regs)[0]; unsigned long *reg = &((unsigned long *)child->thread.regs)[0];
unsigned long *tmp = (unsigned long *)addr; unsigned long __user *tmp = (unsigned long __user *)addr;
for (i = 0; i < 32; i++) { for (i = 0; i < 32; i++) {
ret = put_user(*reg, tmp); ret = put_user(*reg, tmp);
...@@ -228,7 +228,7 @@ int sys_ptrace(long request, long pid, long addr, long data) ...@@ -228,7 +228,7 @@ int sys_ptrace(long request, long pid, long addr, long data)
case PPC_PTRACE_SETREGS: { /* Set GPRs 0 - 31. */ case PPC_PTRACE_SETREGS: { /* Set GPRs 0 - 31. */
int i; int i;
unsigned long *reg = &((unsigned long *)child->thread.regs)[0]; unsigned long *reg = &((unsigned long *)child->thread.regs)[0];
unsigned long *tmp = (unsigned long *)addr; unsigned long __user *tmp = (unsigned long __user *)addr;
for (i = 0; i < 32; i++) { for (i = 0; i < 32; i++) {
ret = get_user(*reg, tmp); ret = get_user(*reg, tmp);
...@@ -243,7 +243,7 @@ int sys_ptrace(long request, long pid, long addr, long data) ...@@ -243,7 +243,7 @@ int sys_ptrace(long request, long pid, long addr, long data)
case PPC_PTRACE_GETFPREGS: { /* Get FPRs 0 - 31. */ case PPC_PTRACE_GETFPREGS: { /* Get FPRs 0 - 31. */
int i; int i;
unsigned long *reg = &((unsigned long *)child->thread.fpr)[0]; unsigned long *reg = &((unsigned long *)child->thread.fpr)[0];
unsigned long *tmp = (unsigned long *)addr; unsigned long __user *tmp = (unsigned long __user *)addr;
if (child->thread.regs->msr & MSR_FP) if (child->thread.regs->msr & MSR_FP)
giveup_fpu(child); giveup_fpu(child);
...@@ -261,7 +261,7 @@ int sys_ptrace(long request, long pid, long addr, long data) ...@@ -261,7 +261,7 @@ int sys_ptrace(long request, long pid, long addr, long data)
case PPC_PTRACE_SETFPREGS: { /* Get FPRs 0 - 31. */ case PPC_PTRACE_SETFPREGS: { /* Get FPRs 0 - 31. */
int i; int i;
unsigned long *reg = &((unsigned long *)child->thread.fpr)[0]; unsigned long *reg = &((unsigned long *)child->thread.fpr)[0];
unsigned long *tmp = (unsigned long *)addr; unsigned long __user *tmp = (unsigned long __user *)addr;
if (child->thread.regs->msr & MSR_FP) if (child->thread.regs->msr & MSR_FP)
giveup_fpu(child); giveup_fpu(child);
......
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