[PATCH v3 10/13] tracing/probes: Allow symstr type for function entry arguments in return probes

From: Masami Hiramatsu (Google)

Date: Fri Nov 13 2026 - 04:28:06 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 9c789ca316b7..65dc5c19deae 100644
--- a/kernel/trace/trace_probe.c
+++ b/kernel/trace/trace_probe.c
@@ -1962,7 +1962,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;