Thread (3 messages) 3 messages, 3 authors, 6d ago

Re: [PATCH] selftests/ftrace: skip gcov symbols when picking a function to probe

From: Shuah Khan <skhan@linuxfoundation.org>
Date: 2026-09-26 19:36:44
Also in: linux-kselftest, lkml

On 9/26/26 06:31, Masami Hiramatsu (Google) wrote:
On Fri, 25 Sep 2026 16:35:41 +0300
Eva Kurchatova [off-list ref] wrote:
quoted
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,
quoted
Signed-off-by: Eva Kurchatova <redacted>
Applied to linux-kselftest next branch for the next merge window.

thanks,
-- Shuah
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help