Re: [tip:mm/pkeys] mm/pkeys: Fix siginfo ABI breakage caused by new u64 field

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 3, 2016 at 8:53 AM, tip-bot for Dave Hansen
<tipbot@xxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux