.. | .. |
---|
104 | 104 | #define instruction_address (*(struct address *)&I387->soft.fip) |
---|
105 | 105 | #define operand_address (*(struct address *)&I387->soft.foo) |
---|
106 | 106 | |
---|
107 | | -#define FPU_access_ok(x,y,z) if ( !access_ok(x,y,z) ) \ |
---|
| 107 | +#define FPU_access_ok(y,z) if ( !access_ok(y,z) ) \ |
---|
108 | 108 | math_abort(FPU_info,SIGSEGV) |
---|
109 | 109 | #define FPU_abort math_abort(FPU_info, SIGSEGV) |
---|
| 110 | +#define FPU_copy_from_user(to, from, n) \ |
---|
| 111 | + do { if (copy_from_user(to, from, n)) FPU_abort; } while (0) |
---|
110 | 112 | |
---|
111 | 113 | #undef FPU_IGNORE_CODE_SEGV |
---|
112 | 114 | #ifdef FPU_IGNORE_CODE_SEGV |
---|
.. | .. |
---|
119 | 121 | /* A simpler test than access_ok() can probably be done for |
---|
120 | 122 | FPU_code_access_ok() because the only possible error is to step |
---|
121 | 123 | past the upper boundary of a legal code area. */ |
---|
122 | | -#define FPU_code_access_ok(z) FPU_access_ok(VERIFY_READ,(void __user *)FPU_EIP,z) |
---|
| 124 | +#define FPU_code_access_ok(z) FPU_access_ok((void __user *)FPU_EIP,z) |
---|
123 | 125 | #endif |
---|
124 | 126 | |
---|
125 | | -#define FPU_get_user(x,y) get_user((x),(y)) |
---|
126 | | -#define FPU_put_user(x,y) put_user((x),(y)) |
---|
| 127 | +#define FPU_get_user(x,y) do { if (get_user((x),(y))) FPU_abort; } while (0) |
---|
| 128 | +#define FPU_put_user(x,y) do { if (put_user((x),(y))) FPU_abort; } while (0) |
---|
127 | 129 | |
---|
128 | 130 | #endif |
---|