From: Shuah Khan <skhan@linuxfoundation.org>
To: "Masami Hiramatsu (Google)" <mhiramat@kernel.org>,
Eva Kurchatova <eva.kurchatova@virtuozzo.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Shuah Khan <shuah@kernel.org>,
linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org,
Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH] selftests/ftrace: skip gcov symbols when picking a function to probe
Date: Sat, 26 Sep 2026 13:36:39 -0600 [thread overview]
Message-ID: <c6427104-c510-41d0-8144-174c002d1dc9@linuxfoundation.org> (raw)
In-Reply-To: <20260926213112.9f92e7958c2d12c946799a0f@kernel.org>
On 9/26/26 06:31, Masami Hiramatsu (Google) wrote:
> On Fri, 25 Sep 2026 16:35:41 +0300
> Eva Kurchatova <eva.kurchatova@virtuozzo.com> wrote:
>
>> kprobe_eventname.tc takes the last kallsyms entry whose name ends in
>> vfs_read and puts a probe on it. On a kernel built with
>> CONFIG_GCOV_PROFILE_ALL=y the counter symbol gcc emits for the function
>> sorts after it:
>>
>> ffffffff819bd1e0 T vfs_read
>> ffffffff845013e0 t __gcov_.vfs_read
>>
>> so the test picks __gcov_.vfs_read, which is not a function entry, and
>> the write fails:
>>
>> kprobe_eventname.tc: line 10: echo: write error: Invalid argument
>>
>> Leave those symbols out of the choice. The test then picks vfs_read and
>> passes; without a coverage build nothing changes, as no such symbol
>> exists there.
>>
>> This is the same class of problem as commit 23a4b108accc
>> ("tracing/selftests: Fix kprobe event name test for .isra. functions"),
>> where a compiler-generated symbol was picked instead of a real function.
>>
>
> Oops, good catch! This looks good to me.
>
> Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
>
> Shuah, can you pick this fix via your selftest tree? I think this is a
> kind of selftest fix/improvement.
>
> Thanks,
>
>> Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
Applied to linux-kselftest next branch for the next merge window.
thanks,
-- Shuah
prev parent reply other threads:[~2026-09-26 19:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-25 13:35 Eva Kurchatova
2026-09-26 12:31 ` Masami Hiramatsu
2026-09-26 19:36 ` Shuah Khan [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=c6427104-c510-41d0-8144-174c002d1dc9@linuxfoundation.org \
--to=skhan@linuxfoundation.org \
--cc=eva.kurchatova@virtuozzo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=rostedt@goodmis.org \
--cc=shuah@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®