From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: Yudistira Putra <pyudistira519@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tracing/probes: make file offset error message probe-agnostic
Date: Tue, 23 Jun 2026 19:53:00 +0900 [thread overview]
Message-ID: <20260623195300.01c0a52b4c649afbed594d5e@kernel.org> (raw)
In-Reply-To: <20260622160032.99834-1-pyudistira519@gmail.com>
On Mon, 22 Jun 2026 12:00:32 -0400
Yudistira Putra <pyudistira519@gmail.com> wrote:
> The shared probe argument parser rejects file offsets for kernel probes.
> This path is used outside the kprobe event parser too, but the diagnostic
> currently says "with kprobe" even when emitted from another probe path.
>
> Make the diagnostic probe-agnostic.
>
Looks good to me. Let me pick it.
Thanks!
> Signed-off-by: Yudistira Putra <pyudistira519@gmail.com>
> ---
> kernel/trace/trace_probe.c | 2 +-
> kernel/trace/trace_probe.h | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/trace/trace_probe.c b/kernel/trace/trace_probe.c
> index fd1caa1f9723..fec0ad51cf61 100644
> --- a/kernel/trace/trace_probe.c
> +++ b/kernel/trace/trace_probe.c
> @@ -1228,7 +1228,7 @@ parse_probe_arg(char *arg, const struct fetch_type *type,
> code->op = FETCH_OP_IMM;
> code->immediate = param;
> } else if (arg[1] == '+') {
> - /* kprobes don't support file offsets */
> + /* Kernel probes do not support file offsets */
> if (ctx->flags & TPARG_FL_KERNEL) {
> trace_probe_log_err(ctx->offset, FILE_ON_KPROBE);
> return -EINVAL;
> diff --git a/kernel/trace/trace_probe.h b/kernel/trace/trace_probe.h
> index 15758cc11fc6..6162f066c2b8 100644
> --- a/kernel/trace/trace_probe.h
> +++ b/kernel/trace/trace_probe.h
> @@ -516,7 +516,7 @@ extern int traceprobe_define_arg_fields(struct trace_event_call *event_call,
> C(BAD_MEM_ADDR, "Invalid memory address"), \
> C(BAD_IMM, "Invalid immediate value"), \
> C(IMMSTR_NO_CLOSE, "String is not closed with '\"'"), \
> - C(FILE_ON_KPROBE, "File offset is not available with kprobe"), \
> + C(FILE_ON_KPROBE, "File offset is not available for kernel probes"), \
> C(BAD_FILE_OFFS, "Invalid file offset value"), \
> C(SYM_ON_UPROBE, "Symbol is not available with uprobe"), \
> C(TOO_MANY_OPS, "Dereference is too much nested"), \
> --
> 2.43.0
>
--
Masami Hiramatsu (Google) <mhiramat@kernel.org>
prev parent reply other threads:[~2026-06-23 10:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-22 16:00 [PATCH] tracing/probes: make file offset error message probe-agnostic Yudistira Putra
2026-06-23 10:53 ` Masami Hiramatsu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260623195300.01c0a52b4c649afbed594d5e@kernel.org \
--to=mhiramat@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=pyudistira519@gmail.com \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox