[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250716152201.58f9402c011e18f8b0c904ac@kernel.org>
Date: Wed, 16 Jul 2025 15:22:01 +0900
From: Masami Hiramatsu (Google) <mhiramat@...nel.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Nathan Chancellor <nathan@...nel.org>, Steven Rostedt
<rostedt@...dmis.org>, Masami Hiramatsu <mhiramat@...nel.org>,
linux-kernel@...r.kernel.org
Subject: [GIT PULL] probes: fixes for v6.16
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@...nel.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@...r.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@...nel.org>
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@...nel.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@...nel.org>
Powered by blists - more mailing lists