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.
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:
Signed-off-by: Uros Bizjak <[email protected]>
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