Re: [PATCH v2 2/4] x86/split_lock: Align x86_capability to unsigned long to avoid split locked access

From: Fenghua Yu
Date: Mon Jul 02 2018 - 10:12:20 EST


On Mon, Jul 02, 2018 at 02:18:59PM +0200, Peter Zijlstra wrote:
> On Fri, Jun 29, 2018 at 01:38:44PM -0700, Fenghua Yu wrote:
> > include/linux/efi.h because set_bit() sets bits in efi.flags:
> > - unsigned long flags;
> > + unsigned long flags __aligned(unsigned long);
> > } efi;
>
> Help me out here; how is the above change not a complete no-op?

You are right. Thomas pointed out 'flags' is already naturally aligned to
unsigned long because its type is unsigned long. So the __aligned()
is no-op.

Thanks.

-Fenghua