From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: Nikolay Kuratov <kniv@yandex-team.ru>
Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
Steven Rostedt <rostedt@goodmis.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Francis Laniel <flaniel@linux.microsoft.com>
Subject: Re: [PATCH] tracing/kprobes: Add missing check for skipping symbol counting logic
Date: Fri, 5 Jul 2024 16:10:30 +0900 [thread overview]
Message-ID: <20240705161030.b3ddb33a8167013b9b1da202@kernel.org> (raw)
In-Reply-To: <20240704164336.1176281-1-kniv@yandex-team.ru>
Hi Nikolay,
Thanks for the patch! But this remind me that I forgot to send a patch
which can solve this issue more generically.
https://lore.kernel.org/all/171338679446.616570.14456856697191949345.stgit@devnote2/
Why I did not send it...? Anyway let me send the update.
Thank you,
On Thu, 4 Jul 2024 19:43:36 +0300
Nikolay Kuratov <kniv@yandex-team.ru> wrote:
> In commit b022f0c7e404
> ("tracing/kprobes: Return EADDRNOTAVAIL when func matches several symbols")
> it was already done for symbol in __trace_kprobe_create(), but func in
> create_local_trace_kprobe() is also valid usage.
> Not doing so leads to ENOENT for module_name:symbol_name
> constructions passed over perf_event_open().
>
> Fixes: b022f0c7e404 ("tracing/kprobes: Return EADDRNOTAVAIL when func matches several symbols")
> Signed-off-by: Nikolay Kuratov <kniv@yandex-team.ru>
> ---
> kernel/trace/trace_kprobe.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
> index 16383247bdbf..3f4c9195dc0d 100644
> --- a/kernel/trace/trace_kprobe.c
> +++ b/kernel/trace/trace_kprobe.c
> @@ -1834,7 +1834,7 @@ create_local_trace_kprobe(char *func, void *addr, unsigned long offs,
> int ret;
> char *event;
>
> - if (func) {
> + if (func && !strchr(func, ':')) {
> unsigned int count;
>
> count = number_of_same_symbols(func);
> --
> 2.34.1
>
--
Masami Hiramatsu (Google) <mhiramat@kernel.org>
prev parent reply other threads:[~2024-07-05 7:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-04 16:43 [PATCH] tracing/kprobes: Add missing check for skipping symbol counting logic Nikolay Kuratov
2024-07-05 7:10 ` 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=20240705161030.b3ddb33a8167013b9b1da202@kernel.org \
--to=mhiramat@kernel.org \
--cc=flaniel@linux.microsoft.com \
--cc=kniv@yandex-team.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.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;
as well as URLs for NNTP newsgroup(s).