+---------------------------------------------------------------------------*/
#include <linux/signal.h>
-#include <linux/ptrace.h>
#include <asm/uaccess.h>
#include <asm/desc.h>
if ( code_limit < code_base ) code_limit = 0xffffffff;
}
- FPU_lookahead = 1;
- if (current->ptrace & PT_PTRACED)
- FPU_lookahead = 0;
+ /* Don't run ahead if single-stepping. */
+ FPU_lookahead = (FPU_EFLAGS & X86_EFLAGS_TF) == 0;
if ( !valid_prefix(&byte1, (u_char __user **)&FPU_EIP,
&addr_modes.override) )
S387->fcs &= ~0xf8000000;
S387->fos |= 0xffff0000;
#endif /* PECULIAR_486 */
- __copy_to_user(d, &S387->cwd, 7*4);
+ if (__copy_to_user(d, &S387->cwd, 7*4))
+ return -1;
RE_ENTRANT_CHECK_ON;
d += 7*4;