Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932673AbcCCR2t (ORCPT ); Thu, 3 Mar 2016 12:28:49 -0500 Received: from mail-io0-f170.google.com ([209.85.223.170]:35741 "EHLO mail-io0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932194AbcCCR2r (ORCPT ); Thu, 3 Mar 2016 12:28:47 -0500 MIME-Version: 1.0 In-Reply-To: References: <20160301125451.02C7426D@viggo.jf.intel.com> Date: Thu, 3 Mar 2016 09:28:46 -0800 X-Google-Sender-Auth: ksNkGHhZNjpzcYXqFea4eIgj7iU Message-ID: Subject: Re: [tip:mm/pkeys] mm/pkeys: Fix siginfo ABI breakage caused by new u64 field From: Linus Torvalds To: Linux Kernel Mailing List , Thomas Gleixner , Dave Hansen , Peter Anvin , Ingo Molnar , Dave Hansen , Linus Torvalds , Andrew Morton , Peter Zijlstra , Helge Deller , Stephen Rothwell Cc: "linux-tip-commits@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 914 Lines: 27 On Thu, Mar 3, 2016 at 8:53 AM, tip-bot for Dave Hansen 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