From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964921AbcALOkh (ORCPT ); Tue, 12 Jan 2016 09:40:37 -0500 Received: from mail.skyhub.de ([78.46.96.112]:42647 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933271AbcALOkg (ORCPT ); Tue, 12 Jan 2016 09:40:36 -0500 Date: Tue, 12 Jan 2016 15:40:22 +0100 From: Borislav Petkov To: Josh Poimboeuf Cc: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, linux-kernel@vger.kernel.org, live-patching@vger.kernel.org, Michal Marek , Peter Zijlstra , Andy Lutomirski , Linus Torvalds , Andi Kleen , Pedro Alves , Namhyung Kim , Bernd Petrovitsch , Chris J Arges , Andrew Morton , Jiri Slaby , Arnaldo Carvalho de Melo Subject: Re: [PATCH v15 21/25] x86/asm: Create stack frames in rwsem functions Message-ID: <20160112144022.GC30558@pd.tnic> References: <721641cb556b9b88aa559ec8f7de2d3e9e8c2e6d.1450442274.git.jpoimboe@redhat.com> <20160112124158.GB22699@pd.tnic> <20160112143648.GA310@treble.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20160112143648.GA310@treble.redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 12, 2016 at 08:36:48AM -0600, Josh Poimboeuf wrote: > Ingo made a similar suggestion a while back: > > https://lkml.kernel.org/r/20150717194307.GA26757@gmail.com > > But the frame stuff can't be folded into ENTRY/ENDPROC because we don't > need to create a stack frame for *all* functions, but rather only for > non-leaf functions. > > So then we considered something like: > > FUNCTION_ENTRY(func) > FUNCTION_RETURN(func) > > for non-leaf functions, and: > > LEAF_FUNCTION_ENTRY(func) > LEAF_FUNCTION_RETURN(func) > > for leaf functions. > > But that was too inflexible for the case where a function ends with a > jump instead of a return. Aah, there it is, thanks! It actually does ring a bell. Ok. I'm guessing the expectation is that we're not going to sprinkle those excessively but use them only in asm code. Which should be relatively seldom, especially since we're moving more and more stuff to C. Thanks. -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply.