lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
[an error occurred while processing this directive]
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221011203332.zzmv6awd5eiydxgw@treble>
Date:   Tue, 11 Oct 2022 13:33:32 -0700
From:   Josh Poimboeuf <jpoimboe@...nel.org>
To:     "Naveen N. Rao" <naveen.n.rao@...ux.vnet.ibm.com>
Cc:     linuxppc-dev@...ts.ozlabs.org,
        Sathvika Vasireddy <sv@...ux.ibm.com>, aik@...abs.ru,
        chenzhongjin@...wei.com, christophe.leroy@...roup.eu,
        jpoimboe@...hat.com, linux-kernel@...r.kernel.org, mbenes@...e.cz,
        mingo@...hat.com, mpe@...erman.id.au, npiggin@...il.com,
        peterz@...radead.org, rostedt@...dmis.org
Subject: Re: [PATCH v4 11/16] objtool: Add --mnop as an option to --mcount

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ