Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752392AbbGQTnQ (ORCPT ); Fri, 17 Jul 2015 15:43:16 -0400 Received: from mail-wg0-f52.google.com ([74.125.82.52]:36035 "EHLO mail-wg0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751205AbbGQTnO (ORCPT ); Fri, 17 Jul 2015 15:43:14 -0400 Date: Fri, 17 Jul 2015 21:43:07 +0200 From: Ingo Molnar To: Josh Poimboeuf Cc: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Michal Marek , Peter Zijlstra , Andy Lutomirski , Borislav Petkov , Linus Torvalds , Andi Kleen , Pedro Alves , x86@kernel.org, live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 13/21] x86/asm/crypto: Fix frame pointer usage in aesni-intel_asm.S Message-ID: <20150717194307.GA26757@gmail.com> References: <2ea0f0602978178eafd012e52b8bdb83cfb159d5.1437150175.git.jpoimboe@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2ea0f0602978178eafd012e52b8bdb83cfb159d5.1437150175.git.jpoimboe@redhat.com> 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 Content-Length: 1165 Lines: 51 * Josh Poimboeuf wrote: > ENTRY(aesni_set_key) > + FRAME > #ifndef __x86_64__ > pushl KEYP > movl 8(%esp), KEYP # ctx > @@ -1905,6 +1907,7 @@ ENTRY(aesni_set_key) > #ifndef __x86_64__ > popl KEYP > #endif > + ENDFRAME > ret > ENDPROC(aesni_set_key) So cannot we make this a bit more compact and less fragile? Instead of: ENTRY(aesni_set_key) FRAME ... ENDFRAME ret ENDPROC(aesni_set_key) How about writing this as: FUNCTION_ENTRY(aesni_set_key) ... FUNCTION_RETURN(aesni_set_key) which does the same thing in a short, symmetric construct? One potential problem with this approach would be that what 'looks' like an entry declaration, but it will now generate real code. OTOH if people find this intuitive enough then it's a lot harder to mess it up, and I think 'RETURN' makes it clear enough that there's a real instruction generated there. Thanks, Ingo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/