[PATCH] tracing: define needed config DYNAMIC_FTRACE_WITH_ARGS

Subsystems: the rest, tracing

STALE1889d

4 messages, 3 authors, 2021-08-17 · open the first message on its own page

[PATCH] tracing: define needed config DYNAMIC_FTRACE_WITH_ARGS

From: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Date: 2021-08-06 19:50:46

Commit 2860cd8a2353 ("livepatch: Use the default ftrace_ops instead of
REGS when ARGS is available") intends to enable config LIVEPATCH when
ftrace with ARGS is available. However, the chain of configs to enable
LIVEPATCH is incomplete, as HAVE_DYNAMIC_FTRACE_WITH_ARGS is available,
but the definition of DYNAMIC_FTRACE_WITH_ARGS, combining DYNAMIC_FTRACE
and HAVE_DYNAMIC_FTRACE_WITH_ARGS, needed to enable LIVEPATCH, is missing
in the commit.

Fortunately, ./scripts/checkkconfigsymbols.py detects this and warns:

DYNAMIC_FTRACE_WITH_ARGS
Referencing files: kernel/livepatch/Kconfig

So, define the config DYNAMIC_FTRACE_WITH_ARGS analogously to the already
existing similar configs, DYNAMIC_FTRACE_WITH_REGS and
DYNAMIC_FTRACE_WITH_DIRECT_CALLS, in ./kernel/trace/Kconfig to connect the
chain of configs.

Fixes: 2860cd8a2353 ("livepatch: Use the default ftrace_ops instead of REGS when ARGS is available")
Cc: <redacted> # 5.10.x
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
---

Steven, thanks for the quick response; please pick this quick config fix.

 kernel/trace/Kconfig | 5 +++++
 1 file changed, 5 insertions(+)
diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
index d567b1717c4c..3ee23f4d437f 100644
--- a/kernel/trace/Kconfig
+++ b/kernel/trace/Kconfig
@@ -219,6 +219,11 @@ config DYNAMIC_FTRACE_WITH_DIRECT_CALLS
 	depends on DYNAMIC_FTRACE_WITH_REGS
 	depends on HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS
 
+config DYNAMIC_FTRACE_WITH_ARGS
+	def_bool y
+	depends on DYNAMIC_FTRACE
+	depends on HAVE_DYNAMIC_FTRACE_WITH_ARGS
+
 config FUNCTION_PROFILER
 	bool "Kernel function profiler"
 	depends on FUNCTION_TRACER
-- 
2.17.1

Re: [PATCH] tracing: define needed config DYNAMIC_FTRACE_WITH_ARGS

From: Steven Rostedt <rostedt@goodmis.org>
Date: 2021-08-07 01:18:18

On Fri,  6 Aug 2021 21:50:27 +0200
Lukas Bulwahn [off-list ref] wrote:
Commit 2860cd8a2353 ("livepatch: Use the default ftrace_ops instead of
REGS when ARGS is available") intends to enable config LIVEPATCH when
ftrace with ARGS is available. However, the chain of configs to enable
LIVEPATCH is incomplete, as HAVE_DYNAMIC_FTRACE_WITH_ARGS is available,
but the definition of DYNAMIC_FTRACE_WITH_ARGS, combining DYNAMIC_FTRACE
and HAVE_DYNAMIC_FTRACE_WITH_ARGS, needed to enable LIVEPATCH, is missing
in the commit.

Fortunately, ./scripts/checkkconfigsymbols.py detects this and warns:

DYNAMIC_FTRACE_WITH_ARGS
Referencing files: kernel/livepatch/Kconfig

So, define the config DYNAMIC_FTRACE_WITH_ARGS analogously to the already
existing similar configs, DYNAMIC_FTRACE_WITH_REGS and
DYNAMIC_FTRACE_WITH_DIRECT_CALLS, in ./kernel/trace/Kconfig to connect the
chain of configs.

Fixes: 2860cd8a2353 ("livepatch: Use the default ftrace_ops instead of REGS when ARGS is available")
Cc: <redacted> # 5.10.x
FYI, we don't add # 5.10.x anymore. The Fixes tag above is what
determines where it gets backported to.
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
---

Steven, thanks for the quick response; please pick this quick config fix.
I placed it in my queue to go into the 5.14-rc cycle.

Since this affects live kernel patching, can I get a Tested-by from one
of the live kernel patching  folks?

Thanks!

-- Steve

Re: [PATCH] tracing: define needed config DYNAMIC_FTRACE_WITH_ARGS

From: Miroslav Benes <mbenes@suse.cz>
Date: 2021-08-17 09:28:29

I placed it in my queue to go into the 5.14-rc cycle.

Since this affects live kernel patching, can I get a Tested-by from one
of the live kernel patching  folks?
I see it got merged, but anyway it looks good to me. Thanks for fixing it.

Miroslav

Re: [PATCH] tracing: define needed config DYNAMIC_FTRACE_WITH_ARGS

From: Steven Rostedt <rostedt@goodmis.org>
Date: 2021-08-17 13:41:46

On Tue, 17 Aug 2021 11:28:25 +0200 (CEST)
Miroslav Benes [off-list ref] wrote:
quoted
I placed it in my queue to go into the 5.14-rc cycle.

Since this affects live kernel patching, can I get a Tested-by from one
of the live kernel patching  folks?  
I see it got merged, but anyway it looks good to me. Thanks for fixing it.
Ah, I was going to wait for an ack, but it slipped into my push (I was
going to take it out, but forgot to).

Anyway, thanks for looking at it.

-- Steve
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help