[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 3 Mar 2016 09:28:46 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Peter Anvin <hpa@...or.com>, Ingo Molnar <mingo@...nel.org>,
Dave Hansen <dave@...1.net>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Peter Zijlstra <peterz@...radead.org>,
Helge Deller <deller@....de>,
Stephen Rothwell <sfr@...b.auug.org.au>
Cc: "linux-tip-commits@...r.kernel.org"
<linux-tip-commits@...r.kernel.org>
Subject: Re: [tip:mm/pkeys] mm/pkeys: Fix siginfo ABI breakage caused by new
u64 field
On Thu, Mar 3, 2016 at 8:53 AM, tip-bot for Dave Hansen
<tipbot@...or.com> wrote:
>
> If u64 has a natural alignment of 8 bytes (this is rare, most 32-bit
> platforms align it to 4 bytes), then the leadup to the _sifields union
> matters:
Side note: I'm not sure that "this is rare" comment is necessarily correct.
I think natural alignment is pretty common, even for 32-bit targets.
x86-32 is I think the exception rather than the rule.
There is some real odd case iirc - embedded m68k, which has some
ridiculous alignment rules. I think it only ever aligns to 16-bit
boundaries.
I do keep coming back to the fact that we should *probably* just do
something like
typedef unsigned long long __attribute__((aligned(8))) __u64;
and then introduce a separate "u64_unaligned" type for all the legacy
cases that depended on 32-bit alignment.
It's horrendously nasty to test, though.
Linus
Powered by blists - more mailing lists