lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ab5cdb9b-227b-473b-ae39-6b4969506a5e@csgroup.eu>
Date: Fri, 22 Nov 2024 10:06:26 +0100
From: Christophe Leroy <christophe.leroy@...roup.eu>
To: Linus Torvalds <torvalds@...ux-foundation.org>,
 Josh Poimboeuf <jpoimboe@...nel.org>
Cc: David Laight <David.Laight@...lab.com>, "x86@...nel.org"
 <x86@...nel.org>, "linux-kernel@...r.kernel.org"
 <linux-kernel@...r.kernel.org>, Thomas Gleixner <tglx@...utronix.de>,
 Borislav Petkov <bp@...en8.de>, Peter Zijlstra <peterz@...radead.org>,
 Pawan Gupta <pawan.kumar.gupta@...ux.intel.com>,
 Waiman Long <longman@...hat.com>, Dave Hansen <dave.hansen@...ux.intel.com>,
 Ingo Molnar <mingo@...hat.com>, Michael Ellerman <mpe@...erman.id.au>,
 "linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
 Andrew Cooper <andrew.cooper3@...rix.com>,
 Mark Rutland <mark.rutland@....com>,
 "Kirill A . Shutemov" <kirill@...temov.name>
Subject: Re: [PATCH v3 2/6] x86/uaccess: Avoid barrier_nospec() in 64-bit
 __get_user()



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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ