[PATCH bpf-next v3 2/2] selftests/bpf: Add testcase where 7th argment is struct

Pu Lehui pulehui at huawei.com
Mon Apr 8 06:58:24 PDT 2024


On 2024/4/3 23:50, Pu Lehui wrote:
> 
> 
> On 2024/4/3 22:40, Daniel Borkmann wrote:
>> On 4/3/24 9:28 AM, Pu Lehui wrote:
>>> From: Pu Lehui <pulehui at huawei.com>
>>>
>>> Add testcase where 7th argument is struct for architectures with 8
>>> argument registers, and increase the complexity of the struct.
>>>
>>> Signed-off-by: Pu Lehui <pulehui at huawei.com>
>>> Acked-by: Björn Töpel <bjorn at kernel.org>
>>> Reviewed-by: Björn Töpel <bjorn at rivosinc.com>
>>> ---
>>>   tools/testing/selftests/bpf/DENYLIST.aarch64  |  1 +
>>>   .../selftests/bpf/bpf_testmod/bpf_testmod.c   | 19 ++++++++++
>>>   .../selftests/bpf/prog_tests/tracing_struct.c | 13 +++++++
>>>   .../selftests/bpf/progs/tracing_struct.c      | 35 +++++++++++++++++++
>>>   4 files changed, 68 insertions(+)
>>>
>>> diff --git a/tools/testing/selftests/bpf/DENYLIST.aarch64 
>>> b/tools/testing/selftests/bpf/DENYLIST.aarch64
>>> index d8ade15e2789..639ee3f5bc74 100644
>>> --- a/tools/testing/selftests/bpf/DENYLIST.aarch64
>>> +++ b/tools/testing/selftests/bpf/DENYLIST.aarch64
>>> @@ -6,6 +6,7 @@ kprobe_multi_test                                # 
>>> needs CONFIG_FPROBE
>>>   module_attach                                    # prog 
>>> 'kprobe_multi': failed to auto-attach: -95
>>>   fentry_test/fentry_many_args                     # 
>>> fentry_many_args:FAIL:fentry_many_args_attach unexpected error: -524
>>>   fexit_test/fexit_many_args                       # 
>>> fexit_many_args:FAIL:fexit_many_args_attach unexpected error: -524
>>> +tracing_struct                                   # 
>>> test_fentry:FAIL:tracing_struct__attach unexpected error: -524
>>
>> Do we need to blacklist the whole test given it had coverage on arm64
>> before.. perhaps this test here could be done as a new subtest and only
>> that one is listed for arm64?
> 
> Yeah, I thought so at first, just like fexit_many_args of fentry/fexit, 
> but I found that the things struct_tracing does are all in the same 
> series, but the number or type of parameters are different, and the new 
> use case I added is the same in this way. And I found that the execution 
> logic of stract_tracing is relatively simple and clear, triggering all 
> hook points, executing all bpf programs, and asserting all parameters.
> Shall we need to slice them up?

ping~ Daniel, shall we need to do that?

> 
>>
>>>   fill_link_info/kprobe_multi_link_info            # 
>>> bpf_program__attach_kprobe_multi_opts unexpected error: -95
>>>   fill_link_info/kretprobe_multi_link_info         # 
>>> bpf_program__attach_kprobe_multi_opts unexpected error: -95
>>>   fill_link_info/kprobe_multi_invalid_ubuff        # 
>>> bpf_program__attach_kprobe_multi_opts unexpected error: -95
>>
>> Thanks,
>> Daniel
> 



More information about the linux-riscv mailing list