projects/linux·commit 5ad0d383

[PATCH] x86_64: fix put_user for 64-bit constant

5ad0d383 · Roland McGrath <[email protected]> · 2007-01-25 17:19:51 -08:00

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 <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
5ad0d383ddbf0d2fce43b8aac267a6c299fd2dff
Parents
99abfeaf

Changes

1 files changed · +1 −1

FileStatusAddDelContent
include/asm-x86_64/uaccess.hmodified+1−1View file

include/asm-x86_64/uaccess.h

View file
diff --git a/include/asm-x86_64/uaccess.h b/include/asm-x86_64/uaccess.h
index d5dbc87..c0eac51 100644
--- a/include/asm-x86_64/uaccess.h
+++ b/include/asm-x86_64/uaccess.h
@@ -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)