Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100063
b: refs/heads/master
c: 53938a6
h: refs/heads/master
i:
  100061: a974d00
  100059: 8898b03
  100055: f41fb6a
  100047: b35bc7a
  100031: 256a2f1
v: v3
  • Loading branch information
Glauber Costa authored and Ingo Molnar committed Jul 9, 2008
1 parent 31d4276 commit 0101503
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5cbbc3b1eb37bdc72eefd2de03b39f5e784400c2
refs/heads/master: 53938a68a2f971058bc53aaa8c70f9f24f684cdc
6 changes: 3 additions & 3 deletions trunk/include/asm-x86/uaccess_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ extern struct movsl_mask {
*
* This needs 33-bit arithmetic. We have a carry...
*/
#define __range_ok(addr, size) \
#define __range_not_ok(addr, size) \
({ \
unsigned long flag, roksum; \
__chk_user_ptr(addr); \
asm("addl %3,%1 ; sbbl %0,%0; cmpl %1,%4; sbbl $0,%0" \
asm("add %3,%1 ; sbb %0,%0; cmp %1,%4; sbb $0,%0" \
:"=&r" (flag), "=r" (roksum) \
:"1" (addr), "g" ((int)(size)), \
"rm" (current_thread_info()->addr_limit.seg)); \
Expand All @@ -86,7 +86,7 @@ extern struct movsl_mask {
* checks that the pointer is in the user space range - after calling
* this function, memory access functions may still return -EFAULT.
*/
#define access_ok(type, addr, size) (likely(__range_ok(addr, size) == 0))
#define access_ok(type, addr, size) (likely(__range_not_ok(addr, size) == 0))

/*
* The exception table consists of pairs of addresses: the first is the
Expand Down
3 changes: 1 addition & 2 deletions trunk/include/asm-x86/uaccess_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@
({ \
unsigned long flag, roksum; \
__chk_user_ptr(addr); \
asm("# range_ok\n\r" \
"addq %3,%1 ; sbbq %0,%0 ; cmpq %1,%4 ; sbbq $0,%0" \
asm("add %3,%1 ; sbb %0,%0 ; cmp %1,%4 ; sbb $0,%0" \
: "=&r" (flag), "=r" (roksum) \
: "1" (addr), "g" ((long)(size)), \
"g" (current_thread_info()->addr_limit.seg)); \
Expand Down

0 comments on commit 0101503

Please sign in to comment.