Re: [PATCH, x86]: Fix movq immediate operand constraints in uaccess_64.h

From: H. Peter Anvin
Date: Tue Jul 21 2009 - 00:01:09 EST


Uros Bizjak wrote:
> On 07/19/2009 06:06 PM, Uros Bizjak wrote:
>> Hello!
>>
>> arch/x86/include/asm/uaccess_64.h uses wrong asm operand constraint
>> ("ir") for movq insn. Since movq sign-extends its immediate operand,
>> "er" constraint should be used instead.
>>
>> Attached patch changes all uses of __put_user_asm in uaccess_64.h to
>> use "er" when "q" insn suffix is involved.
>>
>> Patch was compile tested on x86_64 with defconfig.
>>
>> Uros.
>
> Uh, missed signed-off line and Cc, so:
>

Good catch. This seems to also apply to the "Zr" constraints in
asm/uaccess.h.

-hpa
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/