aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/uaccess_32.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-x86/uaccess_32.h')
-rw-r--r--include/asm-x86/uaccess_32.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/asm-x86/uaccess_32.h b/include/asm-x86/uaccess_32.h
index f8abc12a77c2..8d3f02d3562c 100644
--- a/include/asm-x86/uaccess_32.h
+++ b/include/asm-x86/uaccess_32.h
@@ -56,11 +56,11 @@ extern struct movsl_mask {
56 * 56 *
57 * This needs 33-bit arithmetic. We have a carry... 57 * This needs 33-bit arithmetic. We have a carry...
58 */ 58 */
59#define __range_ok(addr, size) \ 59#define __range_not_ok(addr, size) \
60({ \ 60({ \
61 unsigned long flag, roksum; \ 61 unsigned long flag, roksum; \
62 __chk_user_ptr(addr); \ 62 __chk_user_ptr(addr); \
63 asm("addl %3,%1 ; sbbl %0,%0; cmpl %1,%4; sbbl $0,%0" \ 63 asm("add %3,%1 ; sbb %0,%0; cmp %1,%4; sbb $0,%0" \
64 :"=&r" (flag), "=r" (roksum) \ 64 :"=&r" (flag), "=r" (roksum) \
65 :"1" (addr), "g" ((int)(size)), \ 65 :"1" (addr), "g" ((int)(size)), \
66 "rm" (current_thread_info()->addr_limit.seg)); \ 66 "rm" (current_thread_info()->addr_limit.seg)); \
@@ -86,7 +86,7 @@ extern struct movsl_mask {
86 * checks that the pointer is in the user space range - after calling 86 * checks that the pointer is in the user space range - after calling
87 * this function, memory access functions may still return -EFAULT. 87 * this function, memory access functions may still return -EFAULT.
88 */ 88 */
89#define access_ok(type, addr, size) (likely(__range_ok(addr, size) == 0)) 89#define access_ok(type, addr, size) (likely(__range_not_ok(addr, size) == 0))
90 90
91/* 91/*
92 * The exception table consists of pairs of addresses: the first is the 92 * The exception table consists of pairs of addresses: the first is the