Skip to content

Commit

Permalink
[PATCH] x86_64: fix put_user for 64-bit constant
Browse files Browse the repository at this point in the history
On x86-64, a put_user call using a 64-bit pointer and a constant value that
is > 0xffffffff will produce code that doesn't assemble.  This patch fixes
the asm construct to use the Z constraint for 32-bit constants.

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Roland McGrath authored and Linus Torvalds committed Jan 26, 2007
1 parent 99abfea commit 5ad0d38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/asm-x86_64/uaccess.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ do { \
case 1: __put_user_asm(x,ptr,retval,"b","b","iq",-EFAULT); break;\
case 2: __put_user_asm(x,ptr,retval,"w","w","ir",-EFAULT); break;\
case 4: __put_user_asm(x,ptr,retval,"l","k","ir",-EFAULT); break;\
case 8: __put_user_asm(x,ptr,retval,"q","","ir",-EFAULT); break;\
case 8: __put_user_asm(x,ptr,retval,"q","","Zr",-EFAULT); break;\
default: __put_user_bad(); \
} \
} while (0)
Expand Down

0 comments on commit 5ad0d38

Please sign in to comment.