Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751781AbcCFSpc (ORCPT ); Sun, 6 Mar 2016 13:45:32 -0500 Received: from mail-ig0-f175.google.com ([209.85.213.175]:37395 "EHLO mail-ig0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751138AbcCFSpY (ORCPT ); Sun, 6 Mar 2016 13:45:24 -0500 MIME-Version: 1.0 In-Reply-To: <20160305165234.GY6356@twins.programming.kicks-ass.net> References: <20160301125451.02C7426D@viggo.jf.intel.com> <20160305135006.GA15928@gmail.com> <20160305165234.GY6356@twins.programming.kicks-ass.net> Date: Sun, 6 Mar 2016 10:45:23 -0800 X-Google-Sender-Auth: UxslKlNmRtVAwlw-Jm8JxFPuGpo Message-ID: Subject: Re: [tip:mm/pkeys] mm/pkeys: Fix siginfo ABI breakage caused by new u64 field From: Linus Torvalds To: Peter Zijlstra Cc: Ingo Molnar , Linux Kernel Mailing List , Thomas Gleixner , Dave Hansen , Peter Anvin , Dave Hansen , Andrew Morton , Helge Deller , Stephen Rothwell , "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: 822 Lines: 16 On Sat, Mar 5, 2016 at 8:52 AM, Peter Zijlstra wrote: > On Sat, Mar 05, 2016 at 02:50:06PM +0100, Ingo Molnar wrote: >> A more workable method would be to have a test .c file that includes all UAPI >> structures in existence and defines a variable out of every single one, and then >> generates a list of sizeof() values or so. But even that isn't perfect: a >> structure might shift some fields forward, into a pre-existing hole, without >> changing the sizeof? We'd need a list of all field offsets in all structures to be >> really sure, and that's nasty. > > pahole has such logic, right? sparse could be taught to warn about unaligned u64's, but there are still config issues and issues across other architectures, and if some case gets missed it can be really quite painful. Linus