* [GIT PULL] probes: fixes for v6.16
@ 2025-07-16 6:22 Masami Hiramatsu
2025-07-17 0:12 ` pr-tracker-bot
0 siblings, 1 reply; 4+ messages in thread
From: Masami Hiramatsu @ 2025-07-16 6:22 UTC (permalink / raw)
To: Linus Torvalds
Cc: Nathan Chancellor, Steven Rostedt, Masami Hiramatsu, linux-kernel
Hi Linus,
Probes fixes for v6.16-rc6:
- fprobe-event: The @params variable was being used in an error path
without being initialized. The fix to return an error code.
Please pull the latest probes-fixes-v6.16-rc6 tree, which can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git
probes-fixes-v6.16-rc6
Tag SHA1: ce8ff29973d1200622606428e017c32f36535d8a
Head SHA1: 1ed171a3afe81531b3ace96bd151a372dda3ee25
Nathan Chancellor (1):
tracing/probes: Avoid using params uninitialized in parse_btf_arg()
----
kernel/trace/trace_probe.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---------------------------
commit 1ed171a3afe81531b3ace96bd151a372dda3ee25
Author: Nathan Chancellor <nathan@kernel.org>
Date: Tue Jul 15 20:19:44 2025 -0700
tracing/probes: Avoid using params uninitialized in parse_btf_arg()
After a recent change in clang to strengthen uninitialized warnings [1],
it points out that in one of the error paths in parse_btf_arg(), params
is used uninitialized:
kernel/trace/trace_probe.c:660:19: warning: variable 'params' is uninitialized when used here [-Wuninitialized]
660 | return PTR_ERR(params);
| ^~~~~~
Match many other NO_BTF_ENTRY error cases and return -ENOENT, clearing
up the warning.
Link: https://lore.kernel.org/all/20250715-trace_probe-fix-const-uninit-warning-v1-1-98960f91dd04@kernel.org/
Cc: stable@vger.kernel.org
Closes: https://github.com/ClangBuiltLinux/linux/issues/2110
Fixes: d157d7694460 ("tracing/probes: Support BTF field access from $retval")
Link: https://github.com/llvm/llvm-project/commit/2464313eef01c5b1edf0eccf57a32cdee01472c7 [1]
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
diff --git a/kernel/trace/trace_probe.c b/kernel/trace/trace_probe.c
index 424751cdf31f..40830a3ecd96 100644
--- a/kernel/trace/trace_probe.c
+++ b/kernel/trace/trace_probe.c
@@ -657,7 +657,7 @@ static int parse_btf_arg(char *varname,
ret = query_btf_context(ctx);
if (ret < 0 || ctx->nr_params == 0) {
trace_probe_log_err(ctx->offset, NO_BTF_ENTRY);
- return PTR_ERR(params);
+ return -ENOENT;
}
}
params = ctx->params;
--
Masami Hiramatsu (Google) <mhiramat@kernel.org>
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [GIT PULL] probes: fixes for v6.16
2025-07-16 6:22 [GIT PULL] probes: fixes " Masami Hiramatsu
@ 2025-07-17 0:12 ` pr-tracker-bot
0 siblings, 0 replies; 4+ messages in thread
From: pr-tracker-bot @ 2025-07-17 0:12 UTC (permalink / raw)
To: Masami Hiramatsu (Google)
Cc: Linus Torvalds, Nathan Chancellor, Steven Rostedt,
Masami Hiramatsu, linux-kernel
The pull request you sent on Wed, 16 Jul 2025 15:22:01 +0900:
> git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git probes-fixes-v6.16-rc6
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/e2291551827fe5d2d3758c435c191d32b6d1350e
Thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* [GIT PULL] probes: Fixes for v6.16
@ 2025-07-29 10:30 Masami Hiramatsu
2025-07-31 0:35 ` pr-tracker-bot
0 siblings, 1 reply; 4+ messages in thread
From: Masami Hiramatsu @ 2025-07-29 10:30 UTC (permalink / raw)
To: Linus Torvalds
Cc: Masami Hiramatsu, Steven Rostedt, Masami Hiramatsu, linux-kernel
Hi 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) <mhiramat@kernel.org>
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().
Link: https://lore.kernel.org/all/175374642359.1471729.1054175011228386560.stgit@mhiramat.tok.corp.google.com/
Fixes: 4346ba160409 ("fprobe: Rewrite fprobe on function-graph tracer")
Cc: stable@vger.kernel.org
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
diff --git a/kernel/trace/fprobe.c b/kernel/trace/fprobe.c
index ba7ff14f5339..f9b3aa9afb17 100644
--- a/kernel/trace/fprobe.c
+++ b/kernel/trace/fprobe.c
@@ -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);
--
Masami Hiramatsu (Google) <mhiramat@kernel.org>
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [GIT PULL] probes: Fixes for v6.16
2025-07-29 10:30 [GIT PULL] probes: Fixes for v6.16 Masami Hiramatsu
@ 2025-07-31 0:35 ` pr-tracker-bot
0 siblings, 0 replies; 4+ messages in thread
From: pr-tracker-bot @ 2025-07-31 0:35 UTC (permalink / raw)
To: Masami Hiramatsu (Google)
Cc: Linus Torvalds, Masami Hiramatsu (Google), Steven Rostedt,
Masami Hiramatsu, linux-kernel
The pull request you sent on Tue, 29 Jul 2025 19:30:05 +0900:
> git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git probes-fixes-v6.16
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/a03eec74201251635dede6eb2c3f79c350863d7f
Thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-07-31 0:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-29 10:30 [GIT PULL] probes: Fixes for v6.16 Masami Hiramatsu
2025-07-31 0:35 ` pr-tracker-bot
-- strict thread matches above, loose matches on Subject: below --
2025-07-16 6:22 [GIT PULL] probes: fixes " Masami Hiramatsu
2025-07-17 0:12 ` pr-tracker-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).