extern unsigned int mxcsr_feature_mask;
extern void mxcsr_feature_mask_init(void);
extern void init_fpu(struct task_struct *child);
-extern int save_i387(struct _fpstate *buf);
+extern int save_i387(struct _fpstate __user *buf);
static inline int need_signal_i387(struct task_struct *me)
{
#define clear_fpu(tsk) do { \
if ((tsk)->thread_info->status & TS_USEDFPU) { \
- asm volatile("fwait"); \
+ asm volatile("fnclex ; fwait"); \
(tsk)->thread_info->status &= ~TS_USEDFPU; \
stts(); \
} \
/*
* ptrace request handers...
*/
-extern int get_fpregs(struct user_i387_struct *buf,
+extern int get_fpregs(struct user_i387_struct __user *buf,
struct task_struct *tsk);
extern int set_fpregs(struct task_struct *tsk,
- struct user_i387_struct *buf);
+ struct user_i387_struct __user *buf);
/*
* i387 state interaction
return err;
}
-static inline int save_i387_checking(struct i387_fxsave_struct *fx)
+static inline int save_i387_checking(struct i387_fxsave_struct __user *fx)
{
int err;
asm volatile("1: rex64 ; fxsave (%[fx])\n\t"
/*
* This restores directly out of user space. Exceptions are handled.
*/
-static inline int restore_i387(struct _fpstate *buf)
+static inline int restore_i387(struct _fpstate __user *buf)
{
return restore_fpu_checking((struct i387_fxsave_struct *)buf);
}