1 // SPDX-License-Identifier: GPL-2.0 2 #include <vmlinux.h> 3 #include <bpf/bpf_helpers.h> 4 #include <bpf/bpf_tracing.h> 5 6 char _license[] SEC("license") = "GPL"; 7 8 __hidden extern int tracing_multi_arg_check(__u64 *ctx, __u64 *test_result, bool is_return); 9 10 __u64 test_result_fentry = 0; 11 __u64 test_result_fexit = 0; 12 13 SEC("fentry.multi/bpf_fentry_test*") 14 int BPF_PROG(test_fentry) 15 { 16 tracing_multi_arg_check(ctx, &test_result_fentry, false); 17 return 0; 18 } 19 20 SEC("fexit.multi/bpf_fentry_test*") 21 int BPF_PROG(test_fexit) 22 { 23 tracing_multi_arg_check(ctx, &test_result_fexit, true); 24 return 0; 25 } 26 27 SEC("fentry.multi.s/bpf_fentry_test1") 28 int BPF_PROG(test_fentry_s) 29 { 30 tracing_multi_arg_check(ctx, &test_result_fentry, false); 31 return 0; 32 } 33 34 SEC("fexit.multi.s/bpf_fentry_test1") 35 int BPF_PROG(test_fexit_s) 36 { 37 tracing_multi_arg_check(ctx, &test_result_fexit, true); 38 return 0; 39 } 40