]> git.ipfire.org Git - thirdparty/linux.git/commit
selftests/bpf: Add tests for KF_IMPLICIT_ARGS
authorIhor Solodrai <ihor.solodrai@linux.dev>
Tue, 20 Jan 2026 22:26:31 +0000 (14:26 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 21 Jan 2026 00:15:57 +0000 (16:15 -0800)
commite939f3d16d77a88e5f363394ef73db4c898c4107
tree6a825ee50e1a7400380d76f2a5961f2c161f62e8
parent9d199965990c0b21160c565076b93725d6638c28
selftests/bpf: Add tests for KF_IMPLICIT_ARGS

Add trivial end-to-end tests to validate that KF_IMPLICIT_ARGS flag is
properly handled by both resolve_btfids and the verifier.

Declare kfuncs in bpf_testmod. Check that bpf_prog_aux pointer is set
in the kfunc implementation. Verify that calls with implicit args and
a legacy case all work.

Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Signed-off-by: Ihor Solodrai <ihor.solodrai@linux.dev>
Link: https://lore.kernel.org/r/20260120222638.3976562-7-ihor.solodrai@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/kfunc_implicit_args.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/kfunc_implicit_args.c [new file with mode: 0644]
tools/testing/selftests/bpf/test_kmods/bpf_testmod.c