linux/tools/testing/selftests/bpf/test_kmods
Kumar Kartikeya Dwivedi 5a34139b27 selftests/bpf: Add syscall ctx variable offset tests
Add various tests to exercise fixed and variable offsets on PTR_TO_CTX
for syscall programs, and cover disallowed cases for other program types
lacking convert_ctx_access callback. Load verifier_ctx with CAP_SYS_ADMIN
so that kfunc related logic can be tested. While at it, convert assembly
tests to C. Unfortunately, ctx_pointer_to_helper_2's unpriv case conflicts
with usage of kfuncs in the file and cannot be run.

Reviewed-by: Emil Tsalapatis <emil@etsalapatis.com>
Acked-by: Puranjay Mohan <puranjay@kernel.org>
Acked-by: Mykyta Yatsenko <yatsenko@meta.com>
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/r/20260406194403.1649608-5-memxor@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2026-04-06 15:27:26 -07:00
..
.gitignore
bpf_test_modorder_x.c
bpf_test_modorder_y.c
bpf_test_no_cfi.c
bpf_test_rqspinlock.c selftests/bpf: Add success stats to rqspinlock stress test 2025-11-29 09:35:36 -08:00
bpf_testmod_kfunc.h selftests/bpf: Improve test coverage for kfunc call 2026-03-13 07:13:35 -07:00
bpf_testmod-events.h selftests/bpf: test bpf_get_func_arg() for tp_btf 2026-01-21 09:31:35 -08:00
bpf_testmod.c selftests/bpf: Add syscall ctx variable offset tests 2026-04-06 15:27:26 -07:00
bpf_testmod.h selftests/bpf: Add test for struct_ops __ref argument in any position 2026-03-24 08:51:23 -07:00
Makefile selftests/bpf: Add stress test for rqspinlock in NMI 2025-09-28 03:18:40 -07:00