diff options
Diffstat (limited to 'tools/testing/selftests/bpf/progs/tracing_struct.c')
| -rw-r--r-- | tools/testing/selftests/bpf/progs/tracing_struct.c | 54 | 
1 files changed, 54 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/progs/tracing_struct.c b/tools/testing/selftests/bpf/progs/tracing_struct.c index c435a3a8328a..515daef3c84b 100644 --- a/tools/testing/selftests/bpf/progs/tracing_struct.c +++ b/tools/testing/selftests/bpf/progs/tracing_struct.c @@ -18,6 +18,11 @@ struct bpf_testmod_struct_arg_3 {  	int b[];  }; +struct bpf_testmod_struct_arg_4 { +	u64 a; +	int b; +}; +  long t1_a_a, t1_a_b, t1_b, t1_c, t1_ret, t1_nregs;  __u64 t1_reg0, t1_reg1, t1_reg2, t1_reg3;  long t2_a, t2_b_a, t2_b_b, t2_c, t2_ret; @@ -25,6 +30,9 @@ long t3_a, t3_b, t3_c_a, t3_c_b, t3_ret;  long t4_a_a, t4_b, t4_c, t4_d, t4_e_a, t4_e_b, t4_ret;  long t5_ret;  int t6; +long t7_a, t7_b, t7_c, t7_d, t7_e, t7_f_a, t7_f_b, t7_ret; +long t8_a, t8_b, t8_c, t8_d, t8_e, t8_f_a, t8_f_b, t8_g, t8_ret; +  SEC("fentry/bpf_testmod_test_struct_arg_1")  int BPF_PROG2(test_struct_arg_1, struct bpf_testmod_struct_arg_2, a, int, b, int, c) @@ -130,4 +138,50 @@ int BPF_PROG2(test_struct_arg_11, struct bpf_testmod_struct_arg_3 *, a)  	return 0;  } +SEC("fentry/bpf_testmod_test_struct_arg_7") +int BPF_PROG2(test_struct_arg_12, __u64, a, void *, b, short, c, int, d, +	      void *, e, struct bpf_testmod_struct_arg_4, f) +{ +	t7_a = a; +	t7_b = (long)b; +	t7_c = c; +	t7_d = d; +	t7_e = (long)e; +	t7_f_a = f.a; +	t7_f_b = f.b; +	return 0; +} + +SEC("fexit/bpf_testmod_test_struct_arg_7") +int BPF_PROG2(test_struct_arg_13, __u64, a, void *, b, short, c, int, d, +	      void *, e, struct bpf_testmod_struct_arg_4, f, int, ret) +{ +	t7_ret = ret; +	return 0; +} + +SEC("fentry/bpf_testmod_test_struct_arg_8") +int BPF_PROG2(test_struct_arg_14, __u64, a, void *, b, short, c, int, d, +	      void *, e, struct bpf_testmod_struct_arg_4, f, int, g) +{ +	t8_a = a; +	t8_b = (long)b; +	t8_c = c; +	t8_d = d; +	t8_e = (long)e; +	t8_f_a = f.a; +	t8_f_b = f.b; +	t8_g = g; +	return 0; +} + +SEC("fexit/bpf_testmod_test_struct_arg_8") +int BPF_PROG2(test_struct_arg_15, __u64, a, void *, b, short, c, int, d, +	      void *, e, struct bpf_testmod_struct_arg_4, f, int, g, +	      int, ret) +{ +	t8_ret = ret; +	return 0; +} +  char _license[] SEC("license") = "GPL";  | 
