]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests/sched_ext: Add non_scx_kfunc_deny test
authorCheng-Yang Chou <yphbchou0911@gmail.com>
Mon, 20 Apr 2026 09:28:48 +0000 (17:28 +0800)
committerTejun Heo <tj@kernel.org>
Mon, 20 Apr 2026 17:57:29 +0000 (07:57 -1000)
commit5897ca15d2c444af95eaae5f0a384401765afa00
tree6186b5f9577f45f46335cf3d15be1ebd47bd8e97
parent2d2b026c3ea792a0c91d4acf4430d8b65bedf271
selftests/sched_ext: Add non_scx_kfunc_deny test

Verify that the BPF verifier rejects a non-SCX struct_ops program
(tcp_congestion_ops) that attempts to call an SCX kfunc (scx_bpf_kick_cpu).
The test expects the load to fail with -EACCES from scx_kfunc_context_filter.

Signed-off-by: Cheng-Yang Chou <yphbchou0911@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
tools/testing/selftests/sched_ext/Makefile
tools/testing/selftests/sched_ext/non_scx_kfunc_deny.bpf.c [new file with mode: 0644]
tools/testing/selftests/sched_ext/non_scx_kfunc_deny.c [new file with mode: 0644]