From mboxrd@z Thu Jan 1 00:00:00 1970 From: Josh Poimboeuf Subject: Re: [PATCH 26/33] x86/kvm: Add stack frame dependency to test_cc() inline asm Date: Fri, 22 Jan 2016 10:02:45 -0600 Message-ID: <20160122160245.GD20502@treble.redhat.com> References: <56A1FED2.50700@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 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 , Borislav Petkov , Linus Torvalds , Andi Kleen , Pedro Alves , Namhyung Kim , Bernd Petrovitsch , Chris J Arges , Andrew Morton , Jiri Slaby , Arnaldo Carvalho de Melo , Gleb Natapov , kvm@vger.kernel.org To: Paolo Bonzini Return-path: Content-Disposition: inline In-Reply-To: <56A1FED2.50700@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Fri, Jan 22, 2016 at 11:05:06AM +0100, Paolo Bonzini wrote: > > > On 21/01/2016 23:49, Josh Poimboeuf wrote: > > With some configs, gcc doesn't inline test_cc(). When that happens, it > > doesn't create a stack frame before inserting the call instruction. > > This breaks frame pointer convention if CONFIG_FRAME_POINTER is enabled > > and can result in a bad stack trace. > > > > Force a stack frame to be created if CONFIG_FRAME_POINTER is enabled by > > listing the stack pointer as an output operand for the inline asm > > statement. > > If an __always_inline allocation works, that would be better. Yeah, that seems to work. I'll update the patch. -- Josh