probes: Fixes for v6.16
Masami Hiramatsu (Google)
maintainerHi Linus,
Probes fixes for v6.16:
- Fix a potential infinite recursion in fprobe by using preempt_*_notrace().
Please pull the latest probes-fixes-v6.16 tree, which can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git
probes-fixes-v6.16
Tag SHA1: 1d7c77d4dfae320b756b5d0bcd04ecce5a38fbeb Head SHA1: a3e892ab0fc287389176eabdcd74234508f6e52d
Masami Hiramatsu (Google) (1):
tracing: fprobe: Fix infinite recursion using preempt_*_notrace()
----
kernel/trace/fprobe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --------------------------- commit a3e892ab0fc287389176eabdcd74234508f6e52d Author: Masami Hiramatsu (Google) <[email protected]> Date: Tue Jul 29 08:47:03 2025 +0900
tracing: fprobe: Fix infinite recursion using preempt_*_notrace()
Since preempt_count_add/del() are tracable functions, it is not allowed to use preempt_disable/enable() in ftrace handlers. Without this fix, probing on preempt_count_add%return will cause an infinite recursion of fprobes.
To fix this problem, use preempt_disable/enable_notrace() in fprobe_return().
kernel/trace/fprobe.c +2 -2
@@ -352,7 +352,7 @@ static void fprobe_return(struct ftrace_graph_ret *trace, size_words =SIZE_IN_LONG (size); ret_ip =ftrace_regs_get_instruction_pointer (fregs); -preempt_disable (); +preempt_disable_notrace (); curr =0 ;while (size_words > curr) {
@@ -368,7 +368,7 @@ static void fprobe_return(struct ftrace_graph_ret *trace, } curr += size; } -preempt_enable (); +preempt_enable_notrace (); }NOKPROBE_SYMBOL (fprobe_return);
Signature · 1 line
Masami Hiramatsu (Google) <[email protected]>
The pull request you sent on Tue, 29 Jul 2025 19:30:05 +0900:
The pull request you sent on Tue, 29 Jul 2025 19:30:05 +0900:
Quoted 1 line
git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.gitprobes-fixes-v6.16
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/a03eec74201251635dede6eb2c3f79c350863d7f
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/prtracker.html