[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1665582234.mk6z7nug7r.naveen@linux.ibm.com>
Date: Wed, 12 Oct 2022 19:17:29 +0530
From: "Naveen N. Rao" <naveen.n.rao@...ux.vnet.ibm.com>
To: Josh Poimboeuf <jpoimboe@...nel.org>
Cc: aik@...abs.ru, chenzhongjin@...wei.com,
christophe.leroy@...roup.eu, jpoimboe@...hat.com,
linux-kernel@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
mbenes@...e.cz, mingo@...hat.com, mpe@...erman.id.au,
npiggin@...il.com, peterz@...radead.org, rostedt@...dmis.org,
Sathvika Vasireddy <sv@...ux.ibm.com>
Subject: Re: [PATCH v4 11/16] objtool: Add --mnop as an option to --mcount
Josh Poimboeuf wrote:
> 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
Thanks. That's definitely simpler.
I haven't checked if there are any other conflicts with
tip/objtool/core though. Not sure how to proceed here.
- Naveen
Powered by blists - more mailing lists