]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
selftests: bpf: fix tests with raw_tp calling kfuncs
authorPuranjay Mohan <puranjay@kernel.org>
Mon, 22 Dec 2025 13:32:46 +0000 (05:32 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 23 Dec 2025 06:23:38 +0000 (22:23 -0800)
As the previous commit allowed raw_tp programs to call kfuncs, so of the
selftests that were expected to fail will now succeed.

Signed-off-by: Puranjay Mohan <puranjay@kernel.org>
Acked-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20251222133250.1890587-3-puranjay@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/progs/dynptr_fail.c
tools/testing/selftests/bpf/progs/verifier_kfunc_prog_types.c

index dda6a8dada826cc5244398af241188b6edecb3d3..8f2ae96408862c67ff4429736eeb7aae7abd6e1d 100644 (file)
@@ -1465,7 +1465,7 @@ int xdp_invalid_data_slice2(struct xdp_md *xdp)
 }
 
 /* Only supported prog type can create skb-type dynptrs */
-SEC("?raw_tp")
+SEC("?xdp")
 __failure __msg("calling kernel function bpf_dynptr_from_skb is not allowed")
 int skb_invalid_ctx(void *ctx)
 {
index a509cad97e69b8770f6e2b3452894519fb6ec848..1fce7a7e8d030b8f1bc40dec9e92d3f42cb0b6f5 100644 (file)
@@ -32,7 +32,7 @@ static void task_kfunc_load_test(void)
 }
 
 SEC("raw_tp")
-__failure __msg("calling kernel function")
+__success
 int BPF_PROG(task_kfunc_raw_tp)
 {
        task_kfunc_load_test();
@@ -86,7 +86,7 @@ static void cgrp_kfunc_load_test(void)
 }
 
 SEC("raw_tp")
-__failure __msg("calling kernel function")
+__success
 int BPF_PROG(cgrp_kfunc_raw_tp)
 {
        cgrp_kfunc_load_test();
@@ -138,7 +138,7 @@ static void cpumask_kfunc_load_test(void)
 }
 
 SEC("raw_tp")
-__failure __msg("calling kernel function")
+__success
 int BPF_PROG(cpumask_kfunc_raw_tp)
 {
        cpumask_kfunc_load_test();