kernel_samsung_a53x/tools/testing/selftests/ftrace/test.d
Steven Rostedt (Google) eb9f6bbe3b tracing/selftests: Fix kprobe event name test for .isra. functions
commit 23a4b108accc29a6125ed14de4a044689ffeda78 upstream.

The kprobe_eventname.tc test checks if a function with .isra. can have a
kprobe attached to it. It loops through the kallsyms file for all the
functions that have the .isra. name, and checks if it exists in the
available_filter_functions file, and if it does, it uses it to attach a
kprobe to it.

The issue is that kprobes can not attach to functions that are listed more
than once in available_filter_functions. With the latest kernel, the
function that is found is: rapl_event_update.isra.0

  # grep rapl_event_update.isra.0 /sys/kernel/tracing/available_filter_functions
  rapl_event_update.isra.0
  rapl_event_update.isra.0

It is listed twice. This causes the attached kprobe to it to fail which in
turn fails the test. Instead of just picking the function function that is
found in available_filter_functions, pick the first one that is listed
only once in available_filter_functions.

Cc: stable@vger.kernel.org
Fixes: 604e3548236d ("selftests/ftrace: Select an existing function in kprobe_eventname test")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-19 14:19:00 +01:00
..
00basic Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
direct Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dynevent Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
event selftests/ftrace: Limit length in subsystem-enable tests 2024-11-19 11:32:21 +01:00
ftrace Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
instances Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kprobe tracing/selftests: Fix kprobe event name test for .isra. functions 2024-11-19 14:19:00 +01:00
preemptirq Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
selftest Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tracer Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trigger Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
functions Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
template Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00