diff options
| author | Song Liu <song@kernel.org> | 2025-10-27 10:50:23 -0700 |
|---|---|---|
| committer | Alexei Starovoitov <ast@kernel.org> | 2025-11-03 17:22:06 -0800 |
| commit | 62d2d0a33839c28173909616db2ef16e1a4a5071 (patch) | |
| tree | 45bc559e4b5204726ef54faa9596d91edc025b7c /scripts/livepatch/init.c | |
| parent | 3e9a18e1c3e931abecf501cbb23d28d69f85bb56 (diff) | |
selftests/bpf: Add tests for livepatch + bpf trampoline
Both livepatch and BPF trampoline use ftrace. Special attention is needed
when livepatch and fexit program touch the same function at the same
time, because livepatch updates a kernel function and the BPF trampoline
need to call into the right version of the kernel function.
Use samples/livepatch/livepatch-sample.ko for the test.
The test covers two cases:
1) When a fentry program is loaded first. This exercises the
modify_ftrace_direct code path.
2) When a fentry program is loaded first. This exercises the
register_ftrace_direct code path.
Signed-off-by: Song Liu <song@kernel.org>
Reviewed-by: Jiri Olsa <jolsa@kernel.org>
Link: https://lore.kernel.org/r/20251027175023.1521602-4-song@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Diffstat (limited to 'scripts/livepatch/init.c')
0 files changed, 0 insertions, 0 deletions
