From: Linus Torvalds Subject: Re: x86-64: Maintain 16-byte stack alignment Date: Thu, 12 Jan 2017 13:40:54 -0800 Message-ID: References: <20170111031124.GA4515@gondor.apana.org.au> <20170111043541.GA4944@gondor.apana.org.au> <20170112140215.rh247gwk55fjzmg7@treble> <20170112201511.yj5ekqmj76r2yv6t@treble> <20170112205504.gb6z2w52mektyc73@treble> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: Andy Lutomirski , Herbert Xu , Linux Kernel Mailing List , Linux Crypto Mailing List , Ingo Molnar , Thomas Gleixner , Andy Lutomirski , Ard Biesheuvel To: Josh Poimboeuf Return-path: Received: from mail-oi0-f65.google.com ([209.85.218.65]:33106 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751111AbdALVk4 (ORCPT ); Thu, 12 Jan 2017 16:40:56 -0500 In-Reply-To: <20170112205504.gb6z2w52mektyc73@treble> Sender: linux-crypto-owner@vger.kernel.org List-ID: On Thu, Jan 12, 2017 at 12:55 PM, Josh Poimboeuf wrote: > > - Who's going to run sparse all the time to catch unauthorized users of > __aligned__(16)? Well, considering that we apparently only have a small handful of existing users without anybody having ever run any tool at all, I don't think this is necessarily a huge problem. One of the build servers could easily add the "make C=2" case to a build test, and just grep the error reports for the 'excessive alignment' string. The zero-day build bot already does much fancier things. So I don't think it would necessarily be all that hard to get a clean build, and just say "if you need aligned stack space, you have to do it yourself by hand". That saId, if we now always enable frame pointers on x86 (and it has gotten more and more difficult to avoid it), then the 16-byte alignment would fairly natural. The 8-byte alignment mainly makes sense when the basic call sequence just adds 8 bytes, and you have functions without frames (that still call other functions). Linus