From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965673AbdIYTDY (ORCPT ); Mon, 25 Sep 2017 15:03:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43664 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965659AbdIYTDX (ORCPT ); Mon, 25 Sep 2017 15:03:23 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 2234AC0587EF Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=jpoimboe@redhat.com Date: Mon, 25 Sep 2017 14:03:21 -0500 From: Josh Poimboeuf To: Miguel Bernal Marin Cc: Peter Zijlstra , Ingo Molnar , Thomas Gleixner , "H . Peter Anvin" , linux-kernel@vger.kernel.org, x86@kernel.org Subject: Re: [PATCH v3 0/6] locking/rwsem/x86: Add stack frame dependency for some inline asm Message-ID: <20170925190321.xr2akcksnwmww363@treble> References: <20170906052613.30058-1-miguel.bernal.marin@linux.intel.com> <20170919233745.15343-1-miguel.bernal.marin@linux.intel.com> <20170920212418.lgjlm3h7gmxbrbz4@treble> <20170925173419.GC27769@miguelinux-clr.zpn.intel.com> <20170925190043.ub75ermaomaxyr32@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20170925190043.ub75ermaomaxyr32@treble> User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Mon, 25 Sep 2017 19:03:23 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 25, 2017 at 02:00:43PM -0500, Josh Poimboeuf wrote: > On Mon, Sep 25, 2017 at 12:34:19PM -0500, Miguel Bernal Marin wrote: > > On Wed, Sep 20, 2017 at 04:24:18PM -0500, Josh Poimboeuf wrote: > > > On Tue, Sep 19, 2017 at 06:37:39PM -0500, Miguel Bernal Marin wrote: > > > > Some warning were showed by objtool using gcc 7.2.0 > > > > > > > > kernel/locking/rwsem.o: warning: objtool: up_read()+0x11: call without frame pointer save/setup > > > > kernel/locking/rwsem.o: warning: objtool: up_write()+0x17: call without frame pointer save/setup > > > > kernel/locking/rwsem.o: warning: objtool: downgrade_write()+0x22: call without frame pointer save/setup > > > > > > > > which means gcc placed an inline asm function and its call instruction before > > > > the frame pointer setup. > > > > > > > > This series forces a stack frame to be created before the call instruction > > > > by listing the stack pointer as an output operand in the inline asm statement. > > > > > > > > Also to be easy to maintain and understand the operands from the extended > > > > assembler instructions were converted to named operands. > > > > > > I've got a patch going around which will change the way we do this, so > > > you'll probably need to do a v3 after my patch gets merged. I'll add > > > you to cc for the next revision. > > > > > > > With your new patches (at v4.14.-rc2) the warning is not seen any more, > > so I will send only the named operand patches (in separate thread), as > > this fix is not more needed. > > Any chance you tested with GCC 7? With GCC 6 and older you might still > see the warnings. Sorry, reading again it looks like your warnings only started showing up in GCC 7.2.0? If so, then it does make sense that your fix isn't needed any more, because my patch fixed this issue for *all* inline asm for GCC 7+. -- Josh