selftests/bpf: Add tests for dynamic pointers parameters in kfuncs
authorRoberto Sassu <roberto.sassu@huawei.com>
Tue, 20 Sep 2022 07:59:51 +0000 (09:59 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 22 Sep 2022 00:33:43 +0000 (17:33 -0700)
commitb94fa9f9dcf99730eabd8febc4c95e44342bfb59
tree72f03eef8072c708925a60dcf33e1b6394586121
parentfc97590668ae60b94ad8bc4d9e85958f10cb3567
selftests/bpf: Add tests for dynamic pointers parameters in kfuncs

Add tests to ensure that only supported dynamic pointer types are accepted,
that the passed argument is actually a dynamic pointer, that the passed
argument is a pointer to the stack, and that bpf_verify_pkcs7_signature()
correctly handles dynamic pointers with data set to NULL.

The tests are currently in the deny list for s390x (JIT does not support
calling kernel function).

Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com>
Acked-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/r/20220920075951.929132-14-roberto.sassu@huaweicloud.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/DENYLIST.s390x
tools/testing/selftests/bpf/prog_tests/kfunc_dynptr_param.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/test_kfunc_dynptr_param.c [new file with mode: 0644]