]> rtime.felk.cvut.cz Git - linux-imx.git/commitdiff
x86: Fix movq immediate operand constraints in uaccess.h
authorH. Peter Anvin <hpa@zytor.com>
Tue, 21 Jul 2009 06:27:39 +0000 (23:27 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Tue, 21 Jul 2009 06:27:39 +0000 (23:27 -0700)
The movq instruction, generated by __put_user_asm() when used for
64-bit data, takes a sign-extended immediate ("e") not a zero-extended
immediate ("Z").

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Uros Bizjak <ubizjak@gmail.com>
Cc: stable@kernel.org
arch/x86/include/asm/uaccess.h

index 20e6a795e16006500dc151b8a98315b94b32fa71..d2c6c930b491916843e76d2c6838e53b5890301b 100644 (file)
@@ -212,9 +212,9 @@ extern int __get_user_bad(void);
                     : "A" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx")
 #else
 #define __put_user_asm_u64(x, ptr, retval, errret) \
-       __put_user_asm(x, ptr, retval, "q", "", "Zr", errret)
+       __put_user_asm(x, ptr, retval, "q", "", "er", errret)
 #define __put_user_asm_ex_u64(x, addr) \
-       __put_user_asm_ex(x, addr, "q", "", "Zr")
+       __put_user_asm_ex(x, addr, "q", "", "er")
 #define __put_user_x8(x, ptr, __ret_pu) __put_user_x(8, x, ptr, __ret_pu)
 #endif