case offsetof(struct user32, u_debugreg[7]):
val &= ~DR_CONTROL_RESERVED;
- /* You are not expected to understand this ... I don't neither. */
+ /* See arch/i386/kernel/ptrace.c for an explanation of
+ * this awkward check.*/
for(i=0; i<4; i++)
if ((0x5454 >> ((val >> (16 + 4*i)) & 0xf)) & 1)
return -EIO;
break;
/* no checking to be bug-to-bug compatible with i386 */
__copy_from_user(&child->thread.i387.fxsave, u, sizeof(*u));
- child->used_math = 1;
+ set_stopped_child_used_math(child);
child->thread.i387.fxsave.mxcsr &= mxcsr_feature_mask;
ret = 0;
break;
}
case PTRACE_GETEVENTMSG:
- ret = put_user(child->ptrace_message,(unsigned int __user *)(u64)data);
+ ret = put_user(child->ptrace_message,(unsigned int __user *)compat_ptr(data));
break;
default: