From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 229BAC433F5 for ; Tue, 11 Oct 2022 20:34:37 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4Mn6vv1rPrz3dqv for ; Wed, 12 Oct 2022 07:34:35 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=HTRD6zMn; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=2604:1380:4641:c500::1; helo=dfw.source.kernel.org; envelope-from=jpoimboe@kernel.org; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=HTRD6zMn; dkim-atps=neutral Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4Mn6tr2BYxz306m for ; Wed, 12 Oct 2022 07:33:40 +1100 (AEDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4BC8861168; Tue, 11 Oct 2022 20:33:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2E8D3C433C1; Tue, 11 Oct 2022 20:33:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1665520414; bh=u/ngx5nkN4Heguu0mTv5ntQdOfvx9DRizvMHIBMZFBM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HTRD6zMn+QYXURS0Xv4rcmQ9+ca9gGY/ivP4U4j+PLGelg2oB6pXpRpdASuFUUs1N IEdCoKkJyNNKldLLfiV8wN2XZTJLm7QlBASADnaibAtfNPOU1SNDa7+tEQiWTNwWMB ejLR375TzQlXuvEAE0W+SbQ3kZU4hmXGoiMbiYqHNIWTlT1IkQ939fZp8gIubhMJJr lwalcI/94AJXKlgH+e1vCau578ipHzFF1oblY1uZga+Pz6/Q9s+Brm5+30Rwrbgdd2 nrRwTH45iigXeo6U/+uRQQN1H9lNxvM5gPg+SqV9ZXWyZTwdcBAATBRZz+yi18r71m C/yl6zIK44Ycg== Date: Tue, 11 Oct 2022 13:33:32 -0700 From: Josh Poimboeuf To: "Naveen N. Rao" Subject: Re: [PATCH v4 11/16] objtool: Add --mnop as an option to --mcount Message-ID: <20221011203332.zzmv6awd5eiydxgw@treble> References: <20221002104240.1316480-1-sv@linux.ibm.com> <20221002104240.1316480-12-sv@linux.ibm.com> <1665401725.d3dolquorh.naveen@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1665401725.d3dolquorh.naveen@linux.ibm.com> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: aik@ozlabs.ru, linuxppc-dev@lists.ozlabs.org, npiggin@gmail.com, linux-kernel@vger.kernel.org, peterz@infradead.org, mingo@redhat.com, Sathvika Vasireddy , jpoimboe@redhat.com, rostedt@goodmis.org, mbenes@suse.cz, chenzhongjin@huawei.com Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Mon, Oct 10, 2022 at 05:07:46PM +0530, Naveen N. Rao wrote: > > +++ b/scripts/Makefile.lib > > @@ -234,6 +234,7 @@ objtool_args = \ > > $(if $(CONFIG_HAVE_NOINSTR_HACK), --hacks=noinstr) \ > > $(if $(CONFIG_X86_KERNEL_IBT), --ibt) \ > > $(if $(CONFIG_FTRACE_MCOUNT_USE_OBJTOOL), --mcount) \ > > + $(if $(CONFIG_HAVE_OBJTOOL_NOP_MCOUNT), --mnop) \ > > This still won't help: for instance, if CONFIG_FTRACE itself is disabled. I > think we should make this depend on CONFIG_FTRACE_MCOUNT_USE_OBJTOOL. The > below change works for me: > > diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib > index 54d2d6451bdacc..fd3f55a1fdb7bb 100644 > --- a/scripts/Makefile.lib > +++ b/scripts/Makefile.lib > @@ -245,8 +245,8 @@ objtool_args = \ > $(if $(CONFIG_HAVE_JUMP_LABEL_HACK), --hacks=jump_label) \ > $(if $(CONFIG_HAVE_NOINSTR_HACK), --hacks=noinstr) \ > $(if $(CONFIG_X86_KERNEL_IBT), --ibt) \ > - $(if $(CONFIG_FTRACE_MCOUNT_USE_OBJTOOL), --mcount) \ > - $(if $(CONFIG_HAVE_OBJTOOL_NOP_MCOUNT), --mnop) \ > + $(if $(CONFIG_FTRACE_MCOUNT_USE_OBJTOOL), \ > + $(if $(CONFIG_HAVE_OBJTOOL_NOP_MCOUNT), --mcount --mnop, --mcount)) \ > $(if $(CONFIG_UNWINDER_ORC), --orc) \ > $(if $(CONFIG_RETPOLINE), --retpoline) \ > $(if $(CONFIG_RETHUNK), --rethunk) \ This has a new conflict, may need something like: --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -256,6 +256,9 @@ objtool-args-$(CONFIG_HAVE_JUMP_LABEL_HACK) += --hacks=jump_label objtool-args-$(CONFIG_HAVE_NOINSTR_HACK) += --hacks=noinstr objtool-args-$(CONFIG_X86_KERNEL_IBT) += --ibt objtool-args-$(CONFIG_FTRACE_MCOUNT_USE_OBJTOOL) += --mcount +ifdef CONFIG_FTRACE_MCOUNT_USE_OBJTOOL +objtool-args-$(CONFIG_HAVE_OBJTOOL_NOP_MCOUNT) += --mnop +endif objtool-args-$(CONFIG_UNWINDER_ORC) += --orc objtool-args-$(CONFIG_RETPOLINE) += --retpoline objtool-args-$(CONFIG_RETHUNK) += --rethunk