From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751293AbdAMIhY (ORCPT ); Fri, 13 Jan 2017 03:37:24 -0500 Received: from helcar.hengli.com.au ([209.40.204.226]:43427 "EHLO helcar.apana.org.au" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751146AbdAMIhX (ORCPT ); Fri, 13 Jan 2017 03:37:23 -0500 Date: Fri, 13 Jan 2017 16:36:48 +0800 From: Herbert Xu To: Andy Lutomirski Cc: Linus Torvalds , Josh Poimboeuf , Linux Kernel Mailing List , Linux Crypto Mailing List , Ingo Molnar , Thomas Gleixner , Andy Lutomirski , Ard Biesheuvel Subject: Re: x86-64: Maintain 16-byte stack alignment Message-ID: <20170113083648.GA22022@gondor.apana.org.au> References: <20170111031124.GA4515@gondor.apana.org.au> <20170111043541.GA4944@gondor.apana.org.au> <20170112140215.rh247gwk55fjzmg7@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 12, 2017 at 12:08:07PM -0800, Andy Lutomirski wrote: > > I think we have some inline functions that do asm volatile ("call > ..."), and I don't see any credible way of forcing alignment short of > generating an entirely new stack frame and aligning that. Ick. This A straight asm call from C should always work because gcc keeps the stack aligned in the prologue. The only problem with inline assembly is when you start pushing things onto the stack directly. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt