mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00

Adding kprobe.session probe to bpf_kfunc_common_test that misses bpf program execution due to recursion check and making sure it increases the program missed count properly. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Link: https://lore.kernel.org/r/20250106175048.1443905-2-jolsa@kernel.org Signed-off-by: Alexei Starovoitov <ast@kernel.org>
54 lines
906 B
C
54 lines
906 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
#include "vmlinux.h"
|
|
#include <bpf/bpf_helpers.h>
|
|
#include <bpf/bpf_tracing.h>
|
|
#include "../test_kmods/bpf_testmod_kfunc.h"
|
|
|
|
char _license[] SEC("license") = "GPL";
|
|
|
|
/*
|
|
* No tests in here, just to trigger 'bpf_fentry_test*'
|
|
* through tracing test_run
|
|
*/
|
|
SEC("fentry/bpf_modify_return_test")
|
|
int BPF_PROG(trigger)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
SEC("kprobe.multi/bpf_fentry_test1")
|
|
int test1(struct pt_regs *ctx)
|
|
{
|
|
bpf_kfunc_common_test();
|
|
return 0;
|
|
}
|
|
|
|
SEC("kprobe/bpf_kfunc_common_test")
|
|
int test2(struct pt_regs *ctx)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
SEC("kprobe/bpf_kfunc_common_test")
|
|
int test3(struct pt_regs *ctx)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
SEC("kprobe/bpf_kfunc_common_test")
|
|
int test4(struct pt_regs *ctx)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
SEC("kprobe.multi/bpf_kfunc_common_test")
|
|
int test5(struct pt_regs *ctx)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
SEC("kprobe.session/bpf_kfunc_common_test")
|
|
int test6(struct pt_regs *ctx)
|
|
{
|
|
return 0;
|
|
}
|