[PATCH 09/12] tracing/probes: Allow symstr type for function entry arguments in return probes

From: Masami Hiramatsu (Google)

Date: Sun Nov 08 2026 - 19:30:44 EST


From: Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>

Function entry arguments accessed in return probes ($argN or BTF entry
arguments) are fetched from the entry data buffer via FETCH_OP_EDATA,
which was omitted from the allowed operations for the "symstr" type and
rejected with BAD_SYMSTRING.

Allow FETCH_OP_EDATA to be formatted as "symstr".

Signed-off-by: Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>
---
kernel/trace/trace_probe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/trace/trace_probe.c b/kernel/trace/trace_probe.c
index 0f544d415153..67453d0121c9 100644
--- a/kernel/trace/trace_probe.c
+++ b/kernel/trace/trace_probe.c
@@ -1958,7 +1958,8 @@ static int finalize_fetch_insn(struct fetch_insn *code,
if (!strcmp(parg->type->name, "symstr")) {
if (code->op != FETCH_OP_REG && code->op != FETCH_OP_STACK &&
code->op != FETCH_OP_RETVAL && code->op != FETCH_OP_ARG &&
- code->op != FETCH_OP_DEREF && code->op != FETCH_OP_TP_ARG) {
+ code->op != FETCH_OP_DEREF && code->op != FETCH_OP_TP_ARG &&
+ code->op != FETCH_OP_EDATA) {
trace_probe_log_err(ctx->offset + type_offset,
BAD_SYMSTRING);
return -EINVAL;