X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fi386%2Fmath-emu%2Ffpu_system.h;h=a3ae28c49dddad063de9c177f7d0f13480df3da5;hb=97bf2856c6014879bd04983a3e9dfcdac1e7fe85;hp=2ddfe120b2885bb4405fede5030beb9370ec0a61;hpb=9bf4aaab3e101692164d49b7ca357651eb691cb6;p=linux-2.6.git diff --git a/arch/i386/math-emu/fpu_system.h b/arch/i386/math-emu/fpu_system.h index 2ddfe120b..a3ae28c49 100644 --- a/arch/i386/math-emu/fpu_system.h +++ b/arch/i386/math-emu/fpu_system.h @@ -66,21 +66,22 @@ #define instruction_address (*(struct address *)&I387.soft.fip) #define operand_address (*(struct address *)&I387.soft.foo) -#define FPU_verify_area(x,y,z) if ( verify_area(x,y,z) ) \ +#define FPU_access_ok(x,y,z) if ( !access_ok(x,y,z) ) \ math_abort(FPU_info,SIGSEGV) +#define FPU_abort math_abort(FPU_info, SIGSEGV) #undef FPU_IGNORE_CODE_SEGV #ifdef FPU_IGNORE_CODE_SEGV -/* verify_area() is very expensive, and causes the emulator to run +/* access_ok() is very expensive, and causes the emulator to run about 20% slower if applied to the code. Anyway, errors due to bad code addresses should be much rarer than errors due to bad data addresses. */ -#define FPU_code_verify_area(z) +#define FPU_code_access_ok(z) #else -/* A simpler test than verify_area() can probably be done for - FPU_code_verify_area() because the only possible error is to step +/* A simpler test than access_ok() can probably be done for + FPU_code_access_ok() because the only possible error is to step past the upper boundary of a legal code area. */ -#define FPU_code_verify_area(z) FPU_verify_area(VERIFY_READ,(void __user *)FPU_EIP,z) +#define FPU_code_access_ok(z) FPU_access_ok(VERIFY_READ,(void __user *)FPU_EIP,z) #endif #define FPU_get_user(x,y) get_user((x),(y))