Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests/bpf: add testcase for TRACING with 6+ arguments

Add fentry_many_args.c and fexit_many_args.c to test the fentry/fexit
with 7/11 arguments. As this feature is not supported by arm64 yet, we
disable these testcases for arm64 in DENYLIST.aarch64. We can combine
them with fentry_test.c/fexit_test.c when arm64 is supported too.

Correspondingly, add bpf_testmod_fentry_test7() and
bpf_testmod_fentry_test11() to bpf_testmod.c

Meanwhile, add bpf_modify_return_test2() to test_run.c to test the
MODIFY_RETURN with 7 arguments.

Add bpf_testmod_test_struct_arg_7/bpf_testmod_test_struct_arg_7 in
bpf_testmod.c to test the struct in the arguments.

And the testcases passed on x86_64:

./test_progs -t fexit
Summary: 5/14 PASSED, 0 SKIPPED, 0 FAILED

./test_progs -t fentry
Summary: 3/2 PASSED, 0 SKIPPED, 0 FAILED

./test_progs -t modify_return
Summary: 1/0 PASSED, 0 SKIPPED, 0 FAILED

./test_progs -t tracing_struct
Summary: 1/0 PASSED, 0 SKIPPED, 0 FAILED

Signed-off-by: Menglong Dong <imagedong@tencent.com>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/r/20230713040738.1789742-4-imagedong@tencent.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>

authored by

Menglong Dong and committed by
Alexei Starovoitov
5e9cf77d 473e3150

+345 -16
+13 -1
net/bpf/test_run.c
··· 565 565 return a + *b; 566 566 } 567 567 568 + __bpf_kfunc int bpf_modify_return_test2(int a, int *b, short c, int d, 569 + void *e, char f, int g) 570 + { 571 + *b += 1; 572 + return a + *b + c + d + (long)e + f + g; 573 + } 574 + 568 575 int noinline bpf_fentry_shadow_test(int a) 569 576 { 570 577 return a + 1; ··· 607 600 608 601 BTF_SET8_START(bpf_test_modify_return_ids) 609 602 BTF_ID_FLAGS(func, bpf_modify_return_test) 603 + BTF_ID_FLAGS(func, bpf_modify_return_test2) 610 604 BTF_ID_FLAGS(func, bpf_fentry_test1, KF_SLEEPABLE) 611 605 BTF_SET8_END(bpf_test_modify_return_ids) 612 606 ··· 675 667 case BPF_MODIFY_RETURN: 676 668 ret = bpf_modify_return_test(1, &b); 677 669 if (b != 2) 678 - side_effect = 1; 670 + side_effect++; 671 + b = 2; 672 + ret += bpf_modify_return_test2(1, &b, 3, 4, (void *)5, 6, 7); 673 + if (b != 2) 674 + side_effect++; 679 675 break; 680 676 default: 681 677 goto out;
+2
tools/testing/selftests/bpf/DENYLIST.aarch64
··· 10 10 kprobe_multi_test/link_api_syms # link_fd unexpected link_fd: actual -95 < expected 0 11 11 kprobe_multi_test/skel_api # libbpf: failed to load BPF skeleton 'kprobe_multi': -3 12 12 module_attach # prog 'kprobe_multi': failed to auto-attach: -95 13 + fentry_test/fentry_many_args # fentry_many_args:FAIL:fentry_many_args_attach unexpected error: -524 14 + fexit_test/fexit_many_args # fexit_many_args:FAIL:fexit_many_args_attach unexpected error: -524
+48 -1
tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c
··· 34 34 int b[]; 35 35 }; 36 36 37 + struct bpf_testmod_struct_arg_4 { 38 + u64 a; 39 + int b; 40 + }; 41 + 37 42 __diag_push(); 38 43 __diag_ignore_all("-Wmissing-prototypes", 39 44 "Global functions as their definitions will be in bpf_testmod.ko BTF"); ··· 77 72 noinline int 78 73 bpf_testmod_test_struct_arg_6(struct bpf_testmod_struct_arg_3 *a) { 79 74 bpf_testmod_test_struct_arg_result = a->b[0]; 75 + return bpf_testmod_test_struct_arg_result; 76 + } 77 + 78 + noinline int 79 + bpf_testmod_test_struct_arg_7(u64 a, void *b, short c, int d, void *e, 80 + struct bpf_testmod_struct_arg_4 f) 81 + { 82 + bpf_testmod_test_struct_arg_result = a + (long)b + c + d + 83 + (long)e + f.a + f.b; 84 + return bpf_testmod_test_struct_arg_result; 85 + } 86 + 87 + noinline int 88 + bpf_testmod_test_struct_arg_8(u64 a, void *b, short c, int d, void *e, 89 + struct bpf_testmod_struct_arg_4 f, int g) 90 + { 91 + bpf_testmod_test_struct_arg_result = a + (long)b + c + d + 92 + (long)e + f.a + f.b + g; 80 93 return bpf_testmod_test_struct_arg_result; 81 94 } 82 95 ··· 214 191 return a + b + c; 215 192 } 216 193 194 + noinline int bpf_testmod_fentry_test7(u64 a, void *b, short c, int d, 195 + void *e, char f, int g) 196 + { 197 + return a + (long)b + c + d + (long)e + f + g; 198 + } 199 + 200 + noinline int bpf_testmod_fentry_test11(u64 a, void *b, short c, int d, 201 + void *e, char f, int g, 202 + unsigned int h, long i, __u64 j, 203 + unsigned long k) 204 + { 205 + return a + (long)b + c + d + (long)e + f + g + h + i + j + k; 206 + } 207 + 217 208 int bpf_testmod_fentry_ok; 218 209 219 210 noinline ssize_t ··· 243 206 struct bpf_testmod_struct_arg_1 struct_arg1 = {10}; 244 207 struct bpf_testmod_struct_arg_2 struct_arg2 = {2, 3}; 245 208 struct bpf_testmod_struct_arg_3 *struct_arg3; 209 + struct bpf_testmod_struct_arg_4 struct_arg4 = {21, 22}; 246 210 int i = 1; 247 211 248 212 while (bpf_testmod_return_ptr(i)) ··· 254 216 (void)bpf_testmod_test_struct_arg_3(1, 4, struct_arg2); 255 217 (void)bpf_testmod_test_struct_arg_4(struct_arg1, 1, 2, 3, struct_arg2); 256 218 (void)bpf_testmod_test_struct_arg_5(); 219 + (void)bpf_testmod_test_struct_arg_7(16, (void *)17, 18, 19, 220 + (void *)20, struct_arg4); 221 + (void)bpf_testmod_test_struct_arg_8(16, (void *)17, 18, 19, 222 + (void *)20, struct_arg4, 23); 223 + 257 224 258 225 struct_arg3 = kmalloc((sizeof(struct bpf_testmod_struct_arg_3) + 259 226 sizeof(int)), GFP_KERNEL); ··· 286 243 287 244 if (bpf_testmod_fentry_test1(1) != 2 || 288 245 bpf_testmod_fentry_test2(2, 3) != 5 || 289 - bpf_testmod_fentry_test3(4, 5, 6) != 15) 246 + bpf_testmod_fentry_test3(4, 5, 6) != 15 || 247 + bpf_testmod_fentry_test7(16, (void *)17, 18, 19, (void *)20, 248 + 21, 22) != 133 || 249 + bpf_testmod_fentry_test11(16, (void *)17, 18, 19, (void *)20, 250 + 21, 22, 23, 24, 25, 26) != 231) 290 251 goto out; 291 252 292 253 bpf_testmod_fentry_ok = 1;
+39 -4
tools/testing/selftests/bpf/prog_tests/fentry_test.c
··· 2 2 /* Copyright (c) 2019 Facebook */ 3 3 #include <test_progs.h> 4 4 #include "fentry_test.lskel.h" 5 + #include "fentry_many_args.skel.h" 5 6 6 - static int fentry_test(struct fentry_test_lskel *fentry_skel) 7 + static int fentry_test_common(struct fentry_test_lskel *fentry_skel) 7 8 { 8 9 int err, prog_fd, i; 9 10 int link_fd; ··· 38 37 return 0; 39 38 } 40 39 41 - void test_fentry_test(void) 40 + static void fentry_test(void) 42 41 { 43 42 struct fentry_test_lskel *fentry_skel = NULL; 44 43 int err; ··· 47 46 if (!ASSERT_OK_PTR(fentry_skel, "fentry_skel_load")) 48 47 goto cleanup; 49 48 50 - err = fentry_test(fentry_skel); 49 + err = fentry_test_common(fentry_skel); 51 50 if (!ASSERT_OK(err, "fentry_first_attach")) 52 51 goto cleanup; 53 52 54 - err = fentry_test(fentry_skel); 53 + err = fentry_test_common(fentry_skel); 55 54 ASSERT_OK(err, "fentry_second_attach"); 56 55 57 56 cleanup: 58 57 fentry_test_lskel__destroy(fentry_skel); 58 + } 59 + 60 + static void fentry_many_args(void) 61 + { 62 + struct fentry_many_args *fentry_skel = NULL; 63 + int err; 64 + 65 + fentry_skel = fentry_many_args__open_and_load(); 66 + if (!ASSERT_OK_PTR(fentry_skel, "fentry_many_args_skel_load")) 67 + goto cleanup; 68 + 69 + err = fentry_many_args__attach(fentry_skel); 70 + if (!ASSERT_OK(err, "fentry_many_args_attach")) 71 + goto cleanup; 72 + 73 + ASSERT_OK(trigger_module_test_read(1), "trigger_read"); 74 + 75 + ASSERT_EQ(fentry_skel->bss->test1_result, 1, 76 + "fentry_many_args_result1"); 77 + ASSERT_EQ(fentry_skel->bss->test2_result, 1, 78 + "fentry_many_args_result2"); 79 + ASSERT_EQ(fentry_skel->bss->test3_result, 1, 80 + "fentry_many_args_result3"); 81 + 82 + cleanup: 83 + fentry_many_args__destroy(fentry_skel); 84 + } 85 + 86 + void test_fentry_test(void) 87 + { 88 + if (test__start_subtest("fentry")) 89 + fentry_test(); 90 + if (test__start_subtest("fentry_many_args")) 91 + fentry_many_args(); 59 92 }
+39 -4
tools/testing/selftests/bpf/prog_tests/fexit_test.c
··· 2 2 /* Copyright (c) 2019 Facebook */ 3 3 #include <test_progs.h> 4 4 #include "fexit_test.lskel.h" 5 + #include "fexit_many_args.skel.h" 5 6 6 - static int fexit_test(struct fexit_test_lskel *fexit_skel) 7 + static int fexit_test_common(struct fexit_test_lskel *fexit_skel) 7 8 { 8 9 int err, prog_fd, i; 9 10 int link_fd; ··· 38 37 return 0; 39 38 } 40 39 41 - void test_fexit_test(void) 40 + static void fexit_test(void) 42 41 { 43 42 struct fexit_test_lskel *fexit_skel = NULL; 44 43 int err; ··· 47 46 if (!ASSERT_OK_PTR(fexit_skel, "fexit_skel_load")) 48 47 goto cleanup; 49 48 50 - err = fexit_test(fexit_skel); 49 + err = fexit_test_common(fexit_skel); 51 50 if (!ASSERT_OK(err, "fexit_first_attach")) 52 51 goto cleanup; 53 52 54 - err = fexit_test(fexit_skel); 53 + err = fexit_test_common(fexit_skel); 55 54 ASSERT_OK(err, "fexit_second_attach"); 56 55 57 56 cleanup: 58 57 fexit_test_lskel__destroy(fexit_skel); 58 + } 59 + 60 + static void fexit_many_args(void) 61 + { 62 + struct fexit_many_args *fexit_skel = NULL; 63 + int err; 64 + 65 + fexit_skel = fexit_many_args__open_and_load(); 66 + if (!ASSERT_OK_PTR(fexit_skel, "fexit_many_args_skel_load")) 67 + goto cleanup; 68 + 69 + err = fexit_many_args__attach(fexit_skel); 70 + if (!ASSERT_OK(err, "fexit_many_args_attach")) 71 + goto cleanup; 72 + 73 + ASSERT_OK(trigger_module_test_read(1), "trigger_read"); 74 + 75 + ASSERT_EQ(fexit_skel->bss->test1_result, 1, 76 + "fexit_many_args_result1"); 77 + ASSERT_EQ(fexit_skel->bss->test2_result, 1, 78 + "fexit_many_args_result2"); 79 + ASSERT_EQ(fexit_skel->bss->test3_result, 1, 80 + "fexit_many_args_result3"); 81 + 82 + cleanup: 83 + fexit_many_args__destroy(fexit_skel); 84 + } 85 + 86 + void test_fexit_test(void) 87 + { 88 + if (test__start_subtest("fexit")) 89 + fexit_test(); 90 + if (test__start_subtest("fexit_many_args")) 91 + fexit_many_args(); 59 92 }
+3 -1
tools/testing/selftests/bpf/prog_tests/get_func_args_test.c
··· 30 30 prog_fd = bpf_program__fd(skel->progs.fmod_ret_test); 31 31 err = bpf_prog_test_run_opts(prog_fd, &topts); 32 32 ASSERT_OK(err, "test_run"); 33 - ASSERT_EQ(topts.retval, 1234, "test_run"); 33 + 34 + ASSERT_EQ(topts.retval >> 16, 1, "test_run"); 35 + ASSERT_EQ(topts.retval & 0xffff, 1234 + 29, "test_run"); 34 36 35 37 ASSERT_EQ(skel->bss->test1_result, 1, "test1_result"); 36 38 ASSERT_EQ(skel->bss->test2_result, 1, "test2_result");
+7 -3
tools/testing/selftests/bpf/prog_tests/modify_return.c
··· 41 41 ASSERT_EQ(skel->bss->fexit_result, 1, "modify_return fexit_result"); 42 42 ASSERT_EQ(skel->bss->fmod_ret_result, 1, "modify_return fmod_ret_result"); 43 43 44 + ASSERT_EQ(skel->bss->fentry_result2, 1, "modify_return fentry_result2"); 45 + ASSERT_EQ(skel->bss->fexit_result2, 1, "modify_return fexit_result2"); 46 + ASSERT_EQ(skel->bss->fmod_ret_result2, 1, "modify_return fmod_ret_result2"); 47 + 44 48 cleanup: 45 49 modify_return__destroy(skel); 46 50 } ··· 53 49 void serial_test_modify_return(void) 54 50 { 55 51 run_test(0 /* input_retval */, 56 - 1 /* want_side_effect */, 57 - 4 /* want_ret */); 52 + 2 /* want_side_effect */, 53 + 33 /* want_ret */); 58 54 run_test(-EINVAL /* input_retval */, 59 55 0 /* want_side_effect */, 60 - -EINVAL /* want_ret */); 56 + -EINVAL * 2 /* want_ret */); 61 57 }
+19
tools/testing/selftests/bpf/prog_tests/tracing_struct.c
··· 55 55 56 56 ASSERT_EQ(skel->bss->t6, 1, "t6 ret"); 57 57 58 + ASSERT_EQ(skel->bss->t7_a, 16, "t7:a"); 59 + ASSERT_EQ(skel->bss->t7_b, 17, "t7:b"); 60 + ASSERT_EQ(skel->bss->t7_c, 18, "t7:c"); 61 + ASSERT_EQ(skel->bss->t7_d, 19, "t7:d"); 62 + ASSERT_EQ(skel->bss->t7_e, 20, "t7:e"); 63 + ASSERT_EQ(skel->bss->t7_f_a, 21, "t7:f.a"); 64 + ASSERT_EQ(skel->bss->t7_f_b, 22, "t7:f.b"); 65 + ASSERT_EQ(skel->bss->t7_ret, 133, "t7 ret"); 66 + 67 + ASSERT_EQ(skel->bss->t8_a, 16, "t8:a"); 68 + ASSERT_EQ(skel->bss->t8_b, 17, "t8:b"); 69 + ASSERT_EQ(skel->bss->t8_c, 18, "t8:c"); 70 + ASSERT_EQ(skel->bss->t8_d, 19, "t8:d"); 71 + ASSERT_EQ(skel->bss->t8_e, 20, "t8:e"); 72 + ASSERT_EQ(skel->bss->t8_f_a, 21, "t8:f.a"); 73 + ASSERT_EQ(skel->bss->t8_f_b, 22, "t8:f.b"); 74 + ASSERT_EQ(skel->bss->t8_g, 23, "t8:g"); 75 + ASSERT_EQ(skel->bss->t8_ret, 156, "t8 ret"); 76 + 58 77 tracing_struct__detach(skel); 59 78 destroy_skel: 60 79 tracing_struct__destroy(skel);
+2 -2
tools/testing/selftests/bpf/prog_tests/trampoline_count.c
··· 88 88 if (!ASSERT_OK(err, "bpf_prog_test_run_opts")) 89 89 goto cleanup; 90 90 91 - ASSERT_EQ(opts.retval & 0xffff, 4, "bpf_modify_return_test.result"); 92 - ASSERT_EQ(opts.retval >> 16, 1, "bpf_modify_return_test.side_effect"); 91 + ASSERT_EQ(opts.retval & 0xffff, 33, "bpf_modify_return_test.result"); 92 + ASSERT_EQ(opts.retval >> 16, 2, "bpf_modify_return_test.side_effect"); 93 93 94 94 cleanup: 95 95 for (; i >= 0; i--) {
+39
tools/testing/selftests/bpf/progs/fentry_many_args.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + /* Copyright (c) 2023 Tencent */ 3 + #include <linux/bpf.h> 4 + #include <bpf/bpf_helpers.h> 5 + #include <bpf/bpf_tracing.h> 6 + 7 + char _license[] SEC("license") = "GPL"; 8 + 9 + __u64 test1_result = 0; 10 + SEC("fentry/bpf_testmod_fentry_test7") 11 + int BPF_PROG(test1, __u64 a, void *b, short c, int d, void *e, char f, 12 + int g) 13 + { 14 + test1_result = a == 16 && b == (void *)17 && c == 18 && d == 19 && 15 + e == (void *)20 && f == 21 && g == 22; 16 + return 0; 17 + } 18 + 19 + __u64 test2_result = 0; 20 + SEC("fentry/bpf_testmod_fentry_test11") 21 + int BPF_PROG(test2, __u64 a, void *b, short c, int d, void *e, char f, 22 + int g, unsigned int h, long i, __u64 j, unsigned long k) 23 + { 24 + test2_result = a == 16 && b == (void *)17 && c == 18 && d == 19 && 25 + e == (void *)20 && f == 21 && g == 22 && h == 23 && 26 + i == 24 && j == 25 && k == 26; 27 + return 0; 28 + } 29 + 30 + __u64 test3_result = 0; 31 + SEC("fentry/bpf_testmod_fentry_test11") 32 + int BPF_PROG(test3, __u64 a, __u64 b, __u64 c, __u64 d, __u64 e, __u64 f, 33 + __u64 g, __u64 h, __u64 i, __u64 j, __u64 k) 34 + { 35 + test3_result = a == 16 && b == 17 && c == 18 && d == 19 && 36 + e == 20 && f == 21 && g == 22 && h == 23 && 37 + i == 24 && j == 25 && k == 26; 38 + return 0; 39 + }
+40
tools/testing/selftests/bpf/progs/fexit_many_args.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + /* Copyright (c) 2023 Tencent */ 3 + #include <linux/bpf.h> 4 + #include <bpf/bpf_helpers.h> 5 + #include <bpf/bpf_tracing.h> 6 + 7 + char _license[] SEC("license") = "GPL"; 8 + 9 + __u64 test1_result = 0; 10 + SEC("fexit/bpf_testmod_fentry_test7") 11 + int BPF_PROG(test1, __u64 a, void *b, short c, int d, void *e, char f, 12 + int g, int ret) 13 + { 14 + test1_result = a == 16 && b == (void *)17 && c == 18 && d == 19 && 15 + e == (void *)20 && f == 21 && g == 22 && ret == 133; 16 + return 0; 17 + } 18 + 19 + __u64 test2_result = 0; 20 + SEC("fexit/bpf_testmod_fentry_test11") 21 + int BPF_PROG(test2, __u64 a, void *b, short c, int d, void *e, char f, 22 + int g, unsigned int h, long i, __u64 j, unsigned long k, 23 + int ret) 24 + { 25 + test2_result = a == 16 && b == (void *)17 && c == 18 && d == 19 && 26 + e == (void *)20 && f == 21 && g == 22 && h == 23 && 27 + i == 24 && j == 25 && k == 26 && ret == 231; 28 + return 0; 29 + } 30 + 31 + __u64 test3_result = 0; 32 + SEC("fexit/bpf_testmod_fentry_test11") 33 + int BPF_PROG(test3, __u64 a, __u64 b, __u64 c, __u64 d, __u64 e, __u64 f, 34 + __u64 g, __u64 h, __u64 i, __u64 j, __u64 k, __u64 ret) 35 + { 36 + test3_result = a == 16 && b == 17 && c == 18 && d == 19 && 37 + e == 20 && f == 21 && g == 22 && h == 23 && 38 + i == 24 && j == 25 && k == 26 && ret == 231; 39 + return 0; 40 + }
+40
tools/testing/selftests/bpf/progs/modify_return.c
··· 47 47 48 48 return 0; 49 49 } 50 + 51 + static int sequence2; 52 + 53 + __u64 fentry_result2 = 0; 54 + SEC("fentry/bpf_modify_return_test2") 55 + int BPF_PROG(fentry_test2, int a, int *b, short c, int d, void *e, char f, 56 + int g) 57 + { 58 + sequence2++; 59 + fentry_result2 = (sequence2 == 1); 60 + return 0; 61 + } 62 + 63 + __u64 fmod_ret_result2 = 0; 64 + SEC("fmod_ret/bpf_modify_return_test2") 65 + int BPF_PROG(fmod_ret_test2, int a, int *b, short c, int d, void *e, char f, 66 + int g, int ret) 67 + { 68 + sequence2++; 69 + /* This is the first fmod_ret program, the ret passed should be 0 */ 70 + fmod_ret_result2 = (sequence2 == 2 && ret == 0); 71 + return input_retval; 72 + } 73 + 74 + __u64 fexit_result2 = 0; 75 + SEC("fexit/bpf_modify_return_test2") 76 + int BPF_PROG(fexit_test2, int a, int *b, short c, int d, void *e, char f, 77 + int g, int ret) 78 + { 79 + sequence2++; 80 + /* If the input_reval is non-zero a successful modification should have 81 + * occurred. 82 + */ 83 + if (input_retval) 84 + fexit_result2 = (sequence2 == 3 && ret == input_retval); 85 + else 86 + fexit_result2 = (sequence2 == 3 && ret == 29); 87 + 88 + return 0; 89 + }
+54
tools/testing/selftests/bpf/progs/tracing_struct.c
··· 18 18 int b[]; 19 19 }; 20 20 21 + struct bpf_testmod_struct_arg_4 { 22 + u64 a; 23 + int b; 24 + }; 25 + 21 26 long t1_a_a, t1_a_b, t1_b, t1_c, t1_ret, t1_nregs; 22 27 __u64 t1_reg0, t1_reg1, t1_reg2, t1_reg3; 23 28 long t2_a, t2_b_a, t2_b_b, t2_c, t2_ret; ··· 30 25 long t4_a_a, t4_b, t4_c, t4_d, t4_e_a, t4_e_b, t4_ret; 31 26 long t5_ret; 32 27 int t6; 28 + long t7_a, t7_b, t7_c, t7_d, t7_e, t7_f_a, t7_f_b, t7_ret; 29 + long t8_a, t8_b, t8_c, t8_d, t8_e, t8_f_a, t8_f_b, t8_g, t8_ret; 30 + 33 31 34 32 SEC("fentry/bpf_testmod_test_struct_arg_1") 35 33 int BPF_PROG2(test_struct_arg_1, struct bpf_testmod_struct_arg_2, a, int, b, int, c) ··· 135 127 int BPF_PROG2(test_struct_arg_11, struct bpf_testmod_struct_arg_3 *, a) 136 128 { 137 129 t6 = a->b[0]; 130 + return 0; 131 + } 132 + 133 + SEC("fentry/bpf_testmod_test_struct_arg_7") 134 + int BPF_PROG2(test_struct_arg_12, __u64, a, void *, b, short, c, int, d, 135 + void *, e, struct bpf_testmod_struct_arg_4, f) 136 + { 137 + t7_a = a; 138 + t7_b = (long)b; 139 + t7_c = c; 140 + t7_d = d; 141 + t7_e = (long)e; 142 + t7_f_a = f.a; 143 + t7_f_b = f.b; 144 + return 0; 145 + } 146 + 147 + SEC("fexit/bpf_testmod_test_struct_arg_7") 148 + int BPF_PROG2(test_struct_arg_13, __u64, a, void *, b, short, c, int, d, 149 + void *, e, struct bpf_testmod_struct_arg_4, f, int, ret) 150 + { 151 + t7_ret = ret; 152 + return 0; 153 + } 154 + 155 + SEC("fentry/bpf_testmod_test_struct_arg_8") 156 + int BPF_PROG2(test_struct_arg_14, __u64, a, void *, b, short, c, int, d, 157 + void *, e, struct bpf_testmod_struct_arg_4, f, int, g) 158 + { 159 + t8_a = a; 160 + t8_b = (long)b; 161 + t8_c = c; 162 + t8_d = d; 163 + t8_e = (long)e; 164 + t8_f_a = f.a; 165 + t8_f_b = f.b; 166 + t8_g = g; 167 + return 0; 168 + } 169 + 170 + SEC("fexit/bpf_testmod_test_struct_arg_8") 171 + int BPF_PROG2(test_struct_arg_15, __u64, a, void *, b, short, c, int, d, 172 + void *, e, struct bpf_testmod_struct_arg_4, f, int, g, 173 + int, ret) 174 + { 175 + t8_ret = ret; 138 176 return 0; 139 177 } 140 178