tracing: s390: Fix fprobes on s390
Masami Hiramatsu (Google)
maintainercover tracing: s390: Fix fprobes on s390
Hi,
Here are fprobe and kprobe-multi fix patches for s390 which maybe broken when we introduced fprobes on fgraph series.
Thank you,
---
Masami Hiramatsu (Google) (2):
s390: fgraph: Fix to remove ftrace_test_recursion_trylock()
s390: tracing: Define ftrace_get_symaddr() for s390
arch/s390/include/asm/ftrace.h | 1 + arch/s390/kernel/ftrace.c | 5 ----- 2 files changed, 1 insertion(+), 5 deletions(-)
--
Masami Hiramatsu (Google) <[email protected]>
Masami Hiramatsu (Google)
maintainerPATCH 1/2 s390: fgraph: Fix to remove ftrace_test_recursion_trylock()
From: Masami Hiramatsu (Google) <[email protected]>
Fix to remove ftrace_test_recursion_trylock() from ftrace_graph_func() because commit d576aec24df9 ("fgraph: Get ftrace recursion lock in function_graph_enter") has been moved it to function_graph_enter_regs() already.
--- arch/s390/kernel/ftrace.c | 5 ----- 1 file changed, 5 deletions(-)
arch/s390/kernel/ftrace.c +0 -5
@@ -266,18 +266,13 @@ void ftrace_graph_func(unsigned long ip, unsigned long parent_ip, struct ftrace_ops *op, struct ftrace_regs *fregs) { unsigned long *parent = &arch_ftrace_regs(fregs)->regs.gprs[14]; -int bit;if (unlikely (ftrace_graph_is_dead ()))return ;if (unlikely (atomic_read (¤t->tracing_graph_pause)))return ; - bit =ftrace_test_recursion_trylock (ip, *parent); -if (bit <0 ) -return ;if (!function_graph_enter_regs (*parent, ip,0 , parent, fregs)) *parent = (unsigned long )&return_to_handler; -ftrace_test_recursion_unlock (bit); }#endif /* CONFIG_FUNCTION_GRAPH_TRACER */
Masami Hiramatsu (Google)
maintainerPATCH 2/2 s390: tracing: Define ftrace_get_symaddr() for s390
In reply to Masami Hiramatsu (Google)From: Masami Hiramatsu (Google) <[email protected]>
Add ftrace_get_symaddr() for s390, which returns the symbol address from ftrace's 'ip' parameter.
--- arch/s390/include/asm/ftrace.h | 1 + 1 file changed, 1 insertion(+)
arch/s390/include/asm/ftrace.h +1 -0
@@ -51,6 +51,7 @@ static inline unsigned long ftrace_call_adjust(unsigned long addr) {return addr; } +#define ftrace_get_symaddr (fentry_ip) ((unsigned long)(fentry_ip))#include <linux/ftrace_regs.h>
Re: [PATCH 1/2] s390: fgraph: Fix to remove ftrace_test_recursion_trylock()
In reply to Masami Hiramatsu (Google)Quoted 15 lines · Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) <[email protected]>
Fix to remove
ftrace_test_recursion_trylock()fromftrace_graph_func()because commit
d576aec24df9("fgraph: Get ftrace recursion lock in
function_graph_enter") has been moved it tofunction_graph_enter_regs()already.
Reported-by Jiri Olsa <[email protected]>
Quoted 7 lines
Fixes d576aec24df9 ("fgraph: Get ftrace recursion lock in function_graph_enter")Signed-off-by Masami Hiramatsu (Google) <[email protected]>Tested-by Jiri Olsa <[email protected]>[...]
Hi Masami,
Can confirm this patch fixes missed/kprobe_recursion BPF selftests on s390x:
https://github.com/kernel-patches/vmtest/actions/runs/13021621468/job/36324248903
Thanks!
Quoted 9 lines · Masami Hiramatsu (Google)
Hi,
Here are fprobe and kprobe-multi fix patches for s390 which maybe broken when we introduced fprobes on fgraph series.
Thank you,
---
Quoted 8 lines
Masami Hiramatsu (Google) (2):
s390: fgraph: Fix to removeftrace_test_recursion_trylock()
s390: tracing: Defineftrace_get_symaddr()for s390arch/s390/include/asm/ftrace.h | 1 + arch/s390/kernel/ftrace.c | 5 ----- 2 files changed, 1 insertion(+), 5 deletions(-)
For both patches: