mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: Nikolay Kuratov <kniv@yandex-team.ru>
Cc: stable@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-trace-kernel@vger.kernel.org,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Francis Laniel <flaniel@linux.microsoft.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Subject: Re: [PATCH v3] tracing/kprobes: Skip symbol counting logic for module symbols in create_local_trace_kprobe()
Date: Thu, 19 Dec 2024 10:17:37 +0900	[thread overview]
Message-ID: <20241219101737.83e3be23bd85c1f9810194c0@kernel.org> (raw)
In-Reply-To: <20241216161145.2584246-1-kniv@yandex-team.ru>

On Mon, 16 Dec 2024 19:11:45 +0300
Nikolay Kuratov <kniv@yandex-team.ru> wrote:

> commit b022f0c7e404 ("tracing/kprobes: Return EADDRNOTAVAIL when func matches several symbols")
> avoids checking number_of_same_symbols() for module symbol in
> __trace_kprobe_create(), but create_local_trace_kprobe() should avoid this
> check too. Doing this check leads to ENOENT for module_name:symbol_name
> constructions passed over perf_event_open.
> 
> No bug in mainline and 6.12 as those contain more general fix
> commit 9d8616034f16 ("tracing/kprobes: Add symbol counting check when module loads")

Thanks! It seems Greg already queued v2 for stable kernels, and
it seems no theoletical change in this version.

Thank you,

> 
> Link: https://lore.kernel.org/linux-trace-kernel/20240705161030.b3ddb33a8167013b9b1da202@kernel.org
> Fixes: b022f0c7e404 ("tracing/kprobes: Return EADDRNOTAVAIL when func matches several symbols")
> Signed-off-by: Nikolay Kuratov <kniv@yandex-team.ru>
> ---
> v1 -> v2:
>  * Reword commit title and message
>  * Send for stable instead of mainline
> v2 -> v3:
>  * Specify first good LTS version in commit message
>  * Remove explicit versions from the subject since 6.1 and 5.10 need fix too
> 
>  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 12d997bb3e78..94cb09d44115 100644
> --- a/kernel/trace/trace_kprobe.c
> +++ b/kernel/trace/trace_kprobe.c
> @@ -1814,7 +1814,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>

      reply	other threads:[~2024-12-19  1:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-16 16:11 Nikolay Kuratov
2024-12-19  1:17 ` 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=20241219101737.83e3be23bd85c1f9810194c0@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 \
    --cc=stable@vger.kernel.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

all inboxes | Powered by JetHome®