Skip to contentSkip to conversation

probes: Fixes for v6.9-rc1

GIT PULL Merged Masami Hiramatsu (Google) 2 participants 2 messages Mar 27, 2024 Tracing

lore
Share & tools
lore

Masami Hiramatsu (Google)

author maintainer
#0 lore raw

Hi Linus,

Probes fixes for v6.9-rc1:

- tracing/probes: initialize a 'val' local variable with zero. This variable is read by FETCH_OP_ST_EDATA in a loop, and is expected to be initialized by FETCH_OP_ARG in the same loop. Since this expectation is not obvious, thus smatch warns it. Initializing 'val' with zero fixes this warning.

Please pull the latest probes-fixes-v6.9-rc1 tree, which can be found at:

git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git
probes-fixes-v6.9-rc1

Tag SHA1: f7e169092950bdda7a36a77325e3490700668a66 Head SHA1: 0add699ad068d26e5b1da9ff28b15461fc4005df

Masami Hiramatsu (Google) (1):
tracing: probes: Fix to zero initialize a local variable

----

 kernel/trace/trace_probe.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---------------------------
commit 0add699ad068d26e5b1da9ff28b15461fc4005df
Author: Masami Hiramatsu (Google) <[email protected]>
Date:   Wed Mar 20 17:10:38 2024 +0900

tracing: probes: Fix to zero initialize a local variable

Fix to initialize 'val' local variable with zero.
Dan reported that Smatch static code checker reports an error that a local 'val' variable needs to be initialized. Actually, the 'val' is expected to be initialized by FETCH_OP_ARG in the same loop, but it is not obvious. So initialize it with zero.

Fixes 25f00e40ce79 ("tracing/probes: Support $argN in return probe (kprobe and fprobe)")
kernel/trace/trace_probe.c +1 -1
index 217169de0920..dfe3ee6035ec 100644
@@ -839,7 +839,7 @@ int traceprobe_get_entry_data_size(struct trace_probe *tp)
 void store_trace_entry_data(void *edata, struct trace_probe *tp, struct pt_regs *regs)
 {
 	struct probe_entry_arg *earg = tp->entry_arg;
-	unsigned long val;
+	unsigned long val = 0;
 	int i;
 
 	if (!earg)
Signature · 1 line
Masami Hiramatsu (Google) <[email protected]>
merge bot Merged
#1 lore raw
The pull request you sent on Wed, 27 Mar 2024 23:23:35 +0900:

The pull request you sent on Wed, 27 Mar 2024 23:23:35 +0900:

Quoted 1 line

git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git probes-fixes-v6.9-rc1

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/962490525cffee6270422206c9d5bdb12d472c2b

Thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html