[PATCH v3 2/6] x86/uaccess: Avoid barrier_nospec() in 64-bit __get_user()

Linus Torvalds torvalds at linux-foundation.org
Sat Nov 23 05:16:58 AEDT 2024


On Fri, 22 Nov 2024 at 01:20, Christophe Leroy
<christophe.leroy at csgroup.eu> wrote:
>
> On powerpc for this kind of stuff I have been using do { } while (0);
> with a break; in the middle, see for instance __put_user() or
> __get_user_size_allowed() in arch/powerpc/include/asm/uaccess.h

Oh, that's indeed a nicer syntax. I'll try to keep that in mind for
next time I come up with disgusting macros (although as mentioned, in
this case I think we're better off not playing that particular game at
all).

                Linus


More information about the Linuxppc-dev mailing list