| .. | .. |
|---|
| 84 | 84 | FPU_REG *sti_ptr = &st(stnr); |
|---|
| 85 | 85 | |
|---|
| 86 | 86 | RE_ENTRANT_CHECK_OFF; |
|---|
| 87 | | - FPU_access_ok(VERIFY_READ, s, 10); |
|---|
| 88 | | - __copy_from_user(sti_ptr, s, 10); |
|---|
| 87 | + FPU_access_ok(s, 10); |
|---|
| 88 | + FPU_copy_from_user(sti_ptr, s, 10); |
|---|
| 89 | 89 | RE_ENTRANT_CHECK_ON; |
|---|
| 90 | 90 | |
|---|
| 91 | 91 | return FPU_tagof(sti_ptr); |
|---|
| .. | .. |
|---|
| 98 | 98 | unsigned m64, l64; |
|---|
| 99 | 99 | |
|---|
| 100 | 100 | RE_ENTRANT_CHECK_OFF; |
|---|
| 101 | | - FPU_access_ok(VERIFY_READ, dfloat, 8); |
|---|
| 101 | + FPU_access_ok(dfloat, 8); |
|---|
| 102 | 102 | FPU_get_user(m64, 1 + (unsigned long __user *)dfloat); |
|---|
| 103 | 103 | FPU_get_user(l64, (unsigned long __user *)dfloat); |
|---|
| 104 | 104 | RE_ENTRANT_CHECK_ON; |
|---|
| .. | .. |
|---|
| 159 | 159 | int exp, tag, negative; |
|---|
| 160 | 160 | |
|---|
| 161 | 161 | RE_ENTRANT_CHECK_OFF; |
|---|
| 162 | | - FPU_access_ok(VERIFY_READ, single, 4); |
|---|
| 162 | + FPU_access_ok(single, 4); |
|---|
| 163 | 163 | FPU_get_user(m32, (unsigned long __user *)single); |
|---|
| 164 | 164 | RE_ENTRANT_CHECK_ON; |
|---|
| 165 | 165 | |
|---|
| .. | .. |
|---|
| 214 | 214 | FPU_REG *st0_ptr = &st(0); |
|---|
| 215 | 215 | |
|---|
| 216 | 216 | RE_ENTRANT_CHECK_OFF; |
|---|
| 217 | | - FPU_access_ok(VERIFY_READ, _s, 8); |
|---|
| 217 | + FPU_access_ok(_s, 8); |
|---|
| 218 | 218 | if (copy_from_user(&s, _s, 8)) |
|---|
| 219 | 219 | FPU_abort; |
|---|
| 220 | 220 | RE_ENTRANT_CHECK_ON; |
|---|
| .. | .. |
|---|
| 243 | 243 | int negative; |
|---|
| 244 | 244 | |
|---|
| 245 | 245 | RE_ENTRANT_CHECK_OFF; |
|---|
| 246 | | - FPU_access_ok(VERIFY_READ, _s, 4); |
|---|
| 246 | + FPU_access_ok(_s, 4); |
|---|
| 247 | 247 | FPU_get_user(s, _s); |
|---|
| 248 | 248 | RE_ENTRANT_CHECK_ON; |
|---|
| 249 | 249 | |
|---|
| .. | .. |
|---|
| 271 | 271 | int s, negative; |
|---|
| 272 | 272 | |
|---|
| 273 | 273 | RE_ENTRANT_CHECK_OFF; |
|---|
| 274 | | - FPU_access_ok(VERIFY_READ, _s, 2); |
|---|
| 274 | + FPU_access_ok(_s, 2); |
|---|
| 275 | 275 | /* Cast as short to get the sign extended. */ |
|---|
| 276 | 276 | FPU_get_user(s, _s); |
|---|
| 277 | 277 | RE_ENTRANT_CHECK_ON; |
|---|
| .. | .. |
|---|
| 304 | 304 | int sign; |
|---|
| 305 | 305 | |
|---|
| 306 | 306 | RE_ENTRANT_CHECK_OFF; |
|---|
| 307 | | - FPU_access_ok(VERIFY_READ, s, 10); |
|---|
| 307 | + FPU_access_ok(s, 10); |
|---|
| 308 | 308 | RE_ENTRANT_CHECK_ON; |
|---|
| 309 | 309 | for (pos = 8; pos >= 0; pos--) { |
|---|
| 310 | 310 | l *= 10; |
|---|
| .. | .. |
|---|
| 345 | 345 | |
|---|
| 346 | 346 | if (st0_tag != TAG_Empty) { |
|---|
| 347 | 347 | RE_ENTRANT_CHECK_OFF; |
|---|
| 348 | | - FPU_access_ok(VERIFY_WRITE, d, 10); |
|---|
| 348 | + FPU_access_ok(d, 10); |
|---|
| 349 | 349 | |
|---|
| 350 | 350 | FPU_put_user(st0_ptr->sigl, (unsigned long __user *)d); |
|---|
| 351 | 351 | FPU_put_user(st0_ptr->sigh, |
|---|
| .. | .. |
|---|
| 364 | 364 | /* The masked response */ |
|---|
| 365 | 365 | /* Put out the QNaN indefinite */ |
|---|
| 366 | 366 | RE_ENTRANT_CHECK_OFF; |
|---|
| 367 | | - FPU_access_ok(VERIFY_WRITE, d, 10); |
|---|
| 367 | + FPU_access_ok(d, 10); |
|---|
| 368 | 368 | FPU_put_user(0, (unsigned long __user *)d); |
|---|
| 369 | 369 | FPU_put_user(0xc0000000, 1 + (unsigned long __user *)d); |
|---|
| 370 | 370 | FPU_put_user(0xffff, 4 + (short __user *)d); |
|---|
| .. | .. |
|---|
| 539 | 539 | /* The masked response */ |
|---|
| 540 | 540 | /* Put out the QNaN indefinite */ |
|---|
| 541 | 541 | RE_ENTRANT_CHECK_OFF; |
|---|
| 542 | | - FPU_access_ok(VERIFY_WRITE, dfloat, 8); |
|---|
| 542 | + FPU_access_ok(dfloat, 8); |
|---|
| 543 | 543 | FPU_put_user(0, (unsigned long __user *)dfloat); |
|---|
| 544 | 544 | FPU_put_user(0xfff80000, |
|---|
| 545 | 545 | 1 + (unsigned long __user *)dfloat); |
|---|
| .. | .. |
|---|
| 552 | 552 | l[1] |= 0x80000000; |
|---|
| 553 | 553 | |
|---|
| 554 | 554 | RE_ENTRANT_CHECK_OFF; |
|---|
| 555 | | - FPU_access_ok(VERIFY_WRITE, dfloat, 8); |
|---|
| 555 | + FPU_access_ok(dfloat, 8); |
|---|
| 556 | 556 | FPU_put_user(l[0], (unsigned long __user *)dfloat); |
|---|
| 557 | 557 | FPU_put_user(l[1], 1 + (unsigned long __user *)dfloat); |
|---|
| 558 | 558 | RE_ENTRANT_CHECK_ON; |
|---|
| .. | .. |
|---|
| 724 | 724 | /* The masked response */ |
|---|
| 725 | 725 | /* Put out the QNaN indefinite */ |
|---|
| 726 | 726 | RE_ENTRANT_CHECK_OFF; |
|---|
| 727 | | - FPU_access_ok(VERIFY_WRITE, single, 4); |
|---|
| 727 | + FPU_access_ok(single, 4); |
|---|
| 728 | 728 | FPU_put_user(0xffc00000, |
|---|
| 729 | 729 | (unsigned long __user *)single); |
|---|
| 730 | 730 | RE_ENTRANT_CHECK_ON; |
|---|
| .. | .. |
|---|
| 742 | 742 | templ |= 0x80000000; |
|---|
| 743 | 743 | |
|---|
| 744 | 744 | RE_ENTRANT_CHECK_OFF; |
|---|
| 745 | | - FPU_access_ok(VERIFY_WRITE, single, 4); |
|---|
| 745 | + FPU_access_ok(single, 4); |
|---|
| 746 | 746 | FPU_put_user(templ, (unsigned long __user *)single); |
|---|
| 747 | 747 | RE_ENTRANT_CHECK_ON; |
|---|
| 748 | 748 | |
|---|
| .. | .. |
|---|
| 791 | 791 | } |
|---|
| 792 | 792 | |
|---|
| 793 | 793 | RE_ENTRANT_CHECK_OFF; |
|---|
| 794 | | - FPU_access_ok(VERIFY_WRITE, d, 8); |
|---|
| 794 | + FPU_access_ok(d, 8); |
|---|
| 795 | 795 | if (copy_to_user(d, &tll, 8)) |
|---|
| 796 | 796 | FPU_abort; |
|---|
| 797 | 797 | RE_ENTRANT_CHECK_ON; |
|---|
| .. | .. |
|---|
| 838 | 838 | } |
|---|
| 839 | 839 | |
|---|
| 840 | 840 | RE_ENTRANT_CHECK_OFF; |
|---|
| 841 | | - FPU_access_ok(VERIFY_WRITE, d, 4); |
|---|
| 841 | + FPU_access_ok(d, 4); |
|---|
| 842 | 842 | FPU_put_user(t.sigl, (unsigned long __user *)d); |
|---|
| 843 | 843 | RE_ENTRANT_CHECK_ON; |
|---|
| 844 | 844 | |
|---|
| .. | .. |
|---|
| 884 | 884 | } |
|---|
| 885 | 885 | |
|---|
| 886 | 886 | RE_ENTRANT_CHECK_OFF; |
|---|
| 887 | | - FPU_access_ok(VERIFY_WRITE, d, 2); |
|---|
| 887 | + FPU_access_ok(d, 2); |
|---|
| 888 | 888 | FPU_put_user((short)t.sigl, d); |
|---|
| 889 | 889 | RE_ENTRANT_CHECK_ON; |
|---|
| 890 | 890 | |
|---|
| .. | .. |
|---|
| 925 | 925 | if (control_word & CW_Invalid) { |
|---|
| 926 | 926 | /* Produce the QNaN "indefinite" */ |
|---|
| 927 | 927 | RE_ENTRANT_CHECK_OFF; |
|---|
| 928 | | - FPU_access_ok(VERIFY_WRITE, d, 10); |
|---|
| 928 | + FPU_access_ok(d, 10); |
|---|
| 929 | 929 | for (i = 0; i < 7; i++) |
|---|
| 930 | 930 | FPU_put_user(0, d + i); /* These bytes "undefined" */ |
|---|
| 931 | 931 | FPU_put_user(0xc0, d + 7); /* This byte "undefined" */ |
|---|
| .. | .. |
|---|
| 941 | 941 | } |
|---|
| 942 | 942 | |
|---|
| 943 | 943 | RE_ENTRANT_CHECK_OFF; |
|---|
| 944 | | - FPU_access_ok(VERIFY_WRITE, d, 10); |
|---|
| 944 | + FPU_access_ok(d, 10); |
|---|
| 945 | 945 | RE_ENTRANT_CHECK_ON; |
|---|
| 946 | 946 | for (i = 0; i < 9; i++) { |
|---|
| 947 | 947 | b = FPU_div_small(&ll, 10); |
|---|
| .. | .. |
|---|
| 1034 | 1034 | ((addr_modes.default_mode == PM16) |
|---|
| 1035 | 1035 | ^ (addr_modes.override.operand_size == OP_SIZE_PREFIX))) { |
|---|
| 1036 | 1036 | RE_ENTRANT_CHECK_OFF; |
|---|
| 1037 | | - FPU_access_ok(VERIFY_READ, s, 0x0e); |
|---|
| 1037 | + FPU_access_ok(s, 0x0e); |
|---|
| 1038 | 1038 | FPU_get_user(control_word, (unsigned short __user *)s); |
|---|
| 1039 | 1039 | FPU_get_user(partial_status, (unsigned short __user *)(s + 2)); |
|---|
| 1040 | 1040 | FPU_get_user(tag_word, (unsigned short __user *)(s + 4)); |
|---|
| .. | .. |
|---|
| 1056 | 1056 | } |
|---|
| 1057 | 1057 | } else { |
|---|
| 1058 | 1058 | RE_ENTRANT_CHECK_OFF; |
|---|
| 1059 | | - FPU_access_ok(VERIFY_READ, s, 0x1c); |
|---|
| 1059 | + FPU_access_ok(s, 0x1c); |
|---|
| 1060 | 1060 | FPU_get_user(control_word, (unsigned short __user *)s); |
|---|
| 1061 | 1061 | FPU_get_user(partial_status, (unsigned short __user *)(s + 4)); |
|---|
| 1062 | 1062 | FPU_get_user(tag_word, (unsigned short __user *)(s + 8)); |
|---|
| .. | .. |
|---|
| 1125 | 1125 | |
|---|
| 1126 | 1126 | /* Copy all registers in stack order. */ |
|---|
| 1127 | 1127 | RE_ENTRANT_CHECK_OFF; |
|---|
| 1128 | | - FPU_access_ok(VERIFY_READ, s, 80); |
|---|
| 1129 | | - __copy_from_user(register_base + offset, s, other); |
|---|
| 1128 | + FPU_access_ok(s, 80); |
|---|
| 1129 | + FPU_copy_from_user(register_base + offset, s, other); |
|---|
| 1130 | 1130 | if (offset) |
|---|
| 1131 | | - __copy_from_user(register_base, s + other, offset); |
|---|
| 1131 | + FPU_copy_from_user(register_base, s + other, offset); |
|---|
| 1132 | 1132 | RE_ENTRANT_CHECK_ON; |
|---|
| 1133 | 1133 | |
|---|
| 1134 | 1134 | for (i = 0; i < 8; i++) { |
|---|
| .. | .. |
|---|
| 1146 | 1146 | ((addr_modes.default_mode == PM16) |
|---|
| 1147 | 1147 | ^ (addr_modes.override.operand_size == OP_SIZE_PREFIX))) { |
|---|
| 1148 | 1148 | RE_ENTRANT_CHECK_OFF; |
|---|
| 1149 | | - FPU_access_ok(VERIFY_WRITE, d, 14); |
|---|
| 1149 | + FPU_access_ok(d, 14); |
|---|
| 1150 | 1150 | #ifdef PECULIAR_486 |
|---|
| 1151 | 1151 | FPU_put_user(control_word & ~0xe080, (unsigned long __user *)d); |
|---|
| 1152 | 1152 | #else |
|---|
| .. | .. |
|---|
| 1174 | 1174 | d += 0x0e; |
|---|
| 1175 | 1175 | } else { |
|---|
| 1176 | 1176 | RE_ENTRANT_CHECK_OFF; |
|---|
| 1177 | | - FPU_access_ok(VERIFY_WRITE, d, 7 * 4); |
|---|
| 1177 | + FPU_access_ok(d, 7 * 4); |
|---|
| 1178 | 1178 | #ifdef PECULIAR_486 |
|---|
| 1179 | 1179 | control_word &= ~0xe080; |
|---|
| 1180 | 1180 | /* An 80486 sets nearly all of the reserved bits to 1. */ |
|---|
| .. | .. |
|---|
| 1204 | 1204 | d = fstenv(addr_modes, data_address); |
|---|
| 1205 | 1205 | |
|---|
| 1206 | 1206 | RE_ENTRANT_CHECK_OFF; |
|---|
| 1207 | | - FPU_access_ok(VERIFY_WRITE, d, 80); |
|---|
| 1207 | + FPU_access_ok(d, 80); |
|---|
| 1208 | 1208 | |
|---|
| 1209 | 1209 | /* Copy all registers in stack order. */ |
|---|
| 1210 | 1210 | if (__copy_to_user(d, register_base + offset, other)) |
|---|