Re: [PATCH v3 2/6] x86/uaccess: Avoid barrier_nospec() in 64-bit __get_user()
From: Christophe Leroy
Date: Fri Nov 22 2024 - 04:21:50 EST
Le 22/11/2024 à 04:57, Linus Torvalds a écrit :
I'm not loving the "if (0)" with the labels inside of it. But it's the
only way I can see to make a statement expression like this work,
since you can't have a "return" inside of it.
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
Christophe