Re: [PATCH] x86/uaccess: fix code generation in put_user()

From: Linus Torvalds
Date: Fri Oct 23 2020 - 16:55:43 EST


Thanks, applied.

On Fri, Oct 23, 2020 at 1:32 PM Rasmus Villemoes
<linux@xxxxxxxxxxxxxxxxxx> wrote:
>
> I'm wondering if one would also need to make __ptr_pu and __ret_pu
> explicitly "%"_ASM_CX".

No, the "c"/"0" thing is much better, and makes it properly atomic wrt
the actual asm.

As mentioned to Andy, the "register asm()" thing is not uncommon and
often useful, but when you can specify the register directly in asm,
that's certainly simpler and more straightforward and preferred.

Linus