[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5652406b-1764-ee02-d76f-c2c7ab66d213@intel.com>
Date: Mon, 8 May 2023 17:51:41 -0700
From: Dave Hansen <dave.hansen@...el.com>
To: "Chang S. Bae" <chang.seok.bae@...el.com>,
Eric Biggers <ebiggers@...nel.org>
Cc: linux-kernel@...r.kernel.org, linux-crypto@...r.kernel.org,
dm-devel@...hat.com, gmazyland@...il.com, luto@...nel.org,
dave.hansen@...ux.intel.com, tglx@...utronix.de, mingo@...nel.org,
x86@...nel.org, herbert@...dor.apana.org.au, ardb@...nel.org,
dan.j.williams@...el.com, bernie.keany@...el.com,
charishma1.gairuboyina@...el.com,
lalithambika.krishnakumar@...el.com,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
"H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH v6 07/12] x86/cpu/keylocker: Load an internal wrapping key
at boot-time
On 5/8/23 17:31, Chang S. Bae wrote:
>> With the macro, they'll get no type warning. The inline actually makes
>> it easier to find bugs because folks will get _some_ type checking no
>> matter how they compile the code.
>
> Ah, when the prototype with one or more arguments, 'static inline'
> allows the check. Then it is not an 'either-way' thing.
>
> Looking at the x86 code, there are some seemingly related:
>
> $ git grep "do { } while (0)" arch/x86 | grep -v "()"
...
Right. It's not a hard and fast rule. We certainly take code either
way and there can be real reasons to do it one way versus the other.
Powered by blists - more mailing lists