All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] parisc: select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY
@ 2021-02-24 20:59 Sami Tolvanen
  2021-02-24 21:02 ` Kees Cook
  0 siblings, 1 reply; 5+ messages in thread
From: Sami Tolvanen @ 2021-02-24 20:59 UTC (permalink / raw)
  To: James E.J. Bottomley, Helge Deller, Guenter Roeck
  Cc: Steven Rostedt (VMware),
	Kees Cook, linux-parisc, linux-kernel, Sami Tolvanen

parisc uses -fpatchable-function-entry with dynamic ftrace, which means we
don't need recordmcount. Select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY
to tell that to the build system.

Reported-by: Guenter Roeck <linux@roeck-us.net>
Fixes: 3b15cdc15956 ("tracing: move function tracer options to Kconfig")
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
---
 arch/parisc/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
index ecef9aff9d72..9ee806f68123 100644
--- a/arch/parisc/Kconfig
+++ b/arch/parisc/Kconfig
@@ -60,6 +60,7 @@ config PARISC
 	select HAVE_KPROBES
 	select HAVE_KRETPROBES
 	select HAVE_DYNAMIC_FTRACE if $(cc-option,-fpatchable-function-entry=1,1)
+	select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY if HAVE_DYNAMIC_FTRACE
 	select HAVE_FTRACE_MCOUNT_RECORD if HAVE_DYNAMIC_FTRACE
 	select HAVE_KPROBES_ON_FTRACE
 	select HAVE_DYNAMIC_FTRACE_WITH_REGS

base-commit: 719bbd4a509f403f537adcaefd8ce17532be2e84
-- 
2.30.0.617.g56c4b15f3c-goog


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] parisc: select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY
  2021-02-24 20:59 [PATCH] parisc: select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY Sami Tolvanen
@ 2021-02-24 21:02 ` Kees Cook
  2021-02-24 22:46   ` Guenter Roeck
  0 siblings, 1 reply; 5+ messages in thread
From: Kees Cook @ 2021-02-24 21:02 UTC (permalink / raw)
  To: Sami Tolvanen
  Cc: James E.J. Bottomley, Helge Deller, Guenter Roeck,
	Steven Rostedt (VMware),
	linux-parisc, linux-kernel

On Wed, Feb 24, 2021 at 12:59:38PM -0800, Sami Tolvanen wrote:
> parisc uses -fpatchable-function-entry with dynamic ftrace, which means we
> don't need recordmcount. Select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY
> to tell that to the build system.
> 
> Reported-by: Guenter Roeck <linux@roeck-us.net>
> Fixes: 3b15cdc15956 ("tracing: move function tracer options to Kconfig")
> Signed-off-by: Sami Tolvanen <samitolvanen@google.com>

I've got parisc building now, and can confirm:

Tested-by: Kees Cook <keescook@chromium.org>

Guenter, does this fix it for you too?

-Kees

> ---
>  arch/parisc/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
> index ecef9aff9d72..9ee806f68123 100644
> --- a/arch/parisc/Kconfig
> +++ b/arch/parisc/Kconfig
> @@ -60,6 +60,7 @@ config PARISC
>  	select HAVE_KPROBES
>  	select HAVE_KRETPROBES
>  	select HAVE_DYNAMIC_FTRACE if $(cc-option,-fpatchable-function-entry=1,1)
> +	select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY if HAVE_DYNAMIC_FTRACE
>  	select HAVE_FTRACE_MCOUNT_RECORD if HAVE_DYNAMIC_FTRACE
>  	select HAVE_KPROBES_ON_FTRACE
>  	select HAVE_DYNAMIC_FTRACE_WITH_REGS
> 
> base-commit: 719bbd4a509f403f537adcaefd8ce17532be2e84
> -- 
> 2.30.0.617.g56c4b15f3c-goog
> 

-- 
Kees Cook

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] parisc: select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY
  2021-02-24 21:02 ` Kees Cook
@ 2021-02-24 22:46   ` Guenter Roeck
  2021-02-24 22:53     ` Sami Tolvanen
  2021-02-24 22:54     ` Kees Cook
  0 siblings, 2 replies; 5+ messages in thread
From: Guenter Roeck @ 2021-02-24 22:46 UTC (permalink / raw)
  To: Kees Cook
  Cc: Sami Tolvanen, James E.J. Bottomley, Helge Deller,
	Steven Rostedt (VMware),
	linux-parisc, linux-kernel

On Wed, Feb 24, 2021 at 01:02:27PM -0800, Kees Cook wrote:
> On Wed, Feb 24, 2021 at 12:59:38PM -0800, Sami Tolvanen wrote:
> > parisc uses -fpatchable-function-entry with dynamic ftrace, which means we
> > don't need recordmcount. Select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY
> > to tell that to the build system.
> > 
> > Reported-by: Guenter Roeck <linux@roeck-us.net>
> > Fixes: 3b15cdc15956 ("tracing: move function tracer options to Kconfig")
> > Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
> 
> I've got parisc building now, and can confirm:
> 
> Tested-by: Kees Cook <keescook@chromium.org>
> 
> Guenter, does this fix it for you too?
> 

I get this:

WARNING: unmet direct dependencies detected for FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY
  Depends on [n]: TRACING_SUPPORT [=y] && FTRACE [=y] && FTRACE_MCOUNT_RECORD [=n]
  Selected by [y]:
  - PARISC [=y] && HAVE_DYNAMIC_FTRACE [=y]

when trying to build parisc:defconfig.

I think it should be

	select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY if DYNAMIC_FTRACE

(no HAVE_)

Guenter

> -Kees
> 
> > ---
> >  arch/parisc/Kconfig | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
> > index ecef9aff9d72..9ee806f68123 100644
> > --- a/arch/parisc/Kconfig
> > +++ b/arch/parisc/Kconfig
> > @@ -60,6 +60,7 @@ config PARISC
> >  	select HAVE_KPROBES
> >  	select HAVE_KRETPROBES
> >  	select HAVE_DYNAMIC_FTRACE if $(cc-option,-fpatchable-function-entry=1,1)
> > +	select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY if HAVE_DYNAMIC_FTRACE
> >  	select HAVE_FTRACE_MCOUNT_RECORD if HAVE_DYNAMIC_FTRACE
> >  	select HAVE_KPROBES_ON_FTRACE
> >  	select HAVE_DYNAMIC_FTRACE_WITH_REGS
> > 
> > base-commit: 719bbd4a509f403f537adcaefd8ce17532be2e84
> > -- 
> > 2.30.0.617.g56c4b15f3c-goog
> > 
> 
> -- 
> Kees Cook

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] parisc: select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY
  2021-02-24 22:46   ` Guenter Roeck
@ 2021-02-24 22:53     ` Sami Tolvanen
  2021-02-24 22:54     ` Kees Cook
  1 sibling, 0 replies; 5+ messages in thread
From: Sami Tolvanen @ 2021-02-24 22:53 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Kees Cook, James E.J. Bottomley, Helge Deller,
	Steven Rostedt (VMware),
	linux-parisc, LKML

On Wed, Feb 24, 2021 at 2:46 PM Guenter Roeck <linux@roeck-us.net> wrote:
>
> On Wed, Feb 24, 2021 at 01:02:27PM -0800, Kees Cook wrote:
> > On Wed, Feb 24, 2021 at 12:59:38PM -0800, Sami Tolvanen wrote:
> > > parisc uses -fpatchable-function-entry with dynamic ftrace, which means we
> > > don't need recordmcount. Select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY
> > > to tell that to the build system.
> > >
> > > Reported-by: Guenter Roeck <linux@roeck-us.net>
> > > Fixes: 3b15cdc15956 ("tracing: move function tracer options to Kconfig")
> > > Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
> >
> > I've got parisc building now, and can confirm:
> >
> > Tested-by: Kees Cook <keescook@chromium.org>
> >
> > Guenter, does this fix it for you too?
> >
>
> I get this:
>
> WARNING: unmet direct dependencies detected for FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY
>   Depends on [n]: TRACING_SUPPORT [=y] && FTRACE [=y] && FTRACE_MCOUNT_RECORD [=n]
>   Selected by [y]:
>   - PARISC [=y] && HAVE_DYNAMIC_FTRACE [=y]
>
> when trying to build parisc:defconfig.
>
> I think it should be
>
>         select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY if DYNAMIC_FTRACE
>
> (no HAVE_)

Ah, it depends on FTRACE_MCOUNT_RECORD. Thanks for testing. I'll send v2.

Sami

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] parisc: select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY
  2021-02-24 22:46   ` Guenter Roeck
  2021-02-24 22:53     ` Sami Tolvanen
@ 2021-02-24 22:54     ` Kees Cook
  1 sibling, 0 replies; 5+ messages in thread
From: Kees Cook @ 2021-02-24 22:54 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Sami Tolvanen, James E.J. Bottomley, Helge Deller,
	Steven Rostedt (VMware),
	linux-parisc, linux-kernel

On Wed, Feb 24, 2021 at 02:46:34PM -0800, Guenter Roeck wrote:
> On Wed, Feb 24, 2021 at 01:02:27PM -0800, Kees Cook wrote:
> > On Wed, Feb 24, 2021 at 12:59:38PM -0800, Sami Tolvanen wrote:
> > > parisc uses -fpatchable-function-entry with dynamic ftrace, which means we
> > > don't need recordmcount. Select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY
> > > to tell that to the build system.
> > > 
> > > Reported-by: Guenter Roeck <linux@roeck-us.net>
> > > Fixes: 3b15cdc15956 ("tracing: move function tracer options to Kconfig")
> > > Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
> > 
> > I've got parisc building now, and can confirm:
> > 
> > Tested-by: Kees Cook <keescook@chromium.org>
> > 
> > Guenter, does this fix it for you too?
> > 
> 
> I get this:
> 
> WARNING: unmet direct dependencies detected for FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY
>   Depends on [n]: TRACING_SUPPORT [=y] && FTRACE [=y] && FTRACE_MCOUNT_RECORD [=n]
>   Selected by [y]:
>   - PARISC [=y] && HAVE_DYNAMIC_FTRACE [=y]
> 
> when trying to build parisc:defconfig.
> 
> I think it should be
> 
> 	select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY if DYNAMIC_FTRACE
> 
> (no HAVE_)

Yeah, that works for me with both defconfig and allmodconfig. (And that
more closely matches what's done for arm64.)

-Kees

> 
> Guenter
> 
> > -Kees
> > 
> > > ---
> > >  arch/parisc/Kconfig | 1 +
> > >  1 file changed, 1 insertion(+)
> > > 
> > > diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
> > > index ecef9aff9d72..9ee806f68123 100644
> > > --- a/arch/parisc/Kconfig
> > > +++ b/arch/parisc/Kconfig
> > > @@ -60,6 +60,7 @@ config PARISC
> > >  	select HAVE_KPROBES
> > >  	select HAVE_KRETPROBES
> > >  	select HAVE_DYNAMIC_FTRACE if $(cc-option,-fpatchable-function-entry=1,1)
> > > +	select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY if HAVE_DYNAMIC_FTRACE
> > >  	select HAVE_FTRACE_MCOUNT_RECORD if HAVE_DYNAMIC_FTRACE
> > >  	select HAVE_KPROBES_ON_FTRACE
> > >  	select HAVE_DYNAMIC_FTRACE_WITH_REGS
> > > 
> > > base-commit: 719bbd4a509f403f537adcaefd8ce17532be2e84
> > > -- 
> > > 2.30.0.617.g56c4b15f3c-goog
> > > 
> > 
> > -- 
> > Kees Cook

-- 
Kees Cook

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-02-24 22:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-24 20:59 [PATCH] parisc: select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY Sami Tolvanen
2021-02-24 21:02 ` Kees Cook
2021-02-24 22:46   ` Guenter Roeck
2021-02-24 22:53     ` Sami Tolvanen
2021-02-24 22:54     ` Kees Cook

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.