Skip to content

Commit ad97cb2

Browse files
eddyz87Alexei Starovoitov
authored andcommitted
selftests/bpf: Remove enum64 case from __arg_untrusted test suite
The enum64 type used by verifier_global_ptr_args test case requires CONFIG_SCHED_CLASS_EXT. At the moment selftets do not depend on this option. There are just a few enum64 types in the kernel. Instead of tying selftests to implementation details of unrelated sub-systems, just remove enum64 test case. Simple enums are covered and that should be sufficient. Fixes: 68cca81 ("selftests/bpf: tests for __arg_untrusted void * global func params") Reported-by: Amery Hung <[email protected]> Signed-off-by: Eduard Zingerman <[email protected]> Tested-by: Amery Hung <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
1 parent 3413bc0 commit ad97cb2

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

tools/testing/selftests/bpf/progs/verifier_global_ptr_args.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -275,11 +275,6 @@ __weak int subprog_enum_untrusted(enum bpf_attach_type *p __arg_untrusted)
275275
return *(int *)p;
276276
}
277277

278-
__weak int subprog_enum64_untrusted(enum scx_public_consts *p __arg_untrusted)
279-
{
280-
return *(int *)p;
281-
}
282-
283278
SEC("tp_btf/sys_enter")
284279
__success
285280
__log_level(2)
@@ -306,10 +301,9 @@ int anything_to_untrusted_mem(void *ctx)
306301
subprog_void_untrusted((void *)mem + off);
307302
/* variable offset to untrusted mem (trusted) */
308303
subprog_void_untrusted(bpf_get_current_task_btf() + off);
309-
/* variable offset to untrusted char/enum/enum64 (map) */
304+
/* variable offset to untrusted char/enum (map) */
310305
subprog_char_untrusted(mem + off);
311306
subprog_enum_untrusted((void *)mem + off);
312-
subprog_enum64_untrusted((void *)mem + off);
313307
return 0;
314308
}
315309

0 commit comments

Comments
 (0)