Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: 68cca81fd57f ("selftests/bpf: tests for __arg_untrusted void * global func params")
Reported-by: Amery Hung <ameryhung@gmail.com>
Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
Tested-by: Amery Hung <ameryhung@gmail.com>
Link: https://lore.kernel.org/r/20250708220856.3059578-1-eddyz87@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>

authored by

Eduard Zingerman and committed by
Alexei Starovoitov
ad97cb2e 3413bc0c

+1 -7
+1 -7
tools/testing/selftests/bpf/progs/verifier_global_ptr_args.c
··· 275 275 return *(int *)p; 276 276 } 277 277 278 - __weak int subprog_enum64_untrusted(enum scx_public_consts *p __arg_untrusted) 279 - { 280 - return *(int *)p; 281 - } 282 - 283 278 SEC("tp_btf/sys_enter") 284 279 __success 285 280 __log_level(2) ··· 301 306 subprog_void_untrusted((void *)mem + off); 302 307 /* variable offset to untrusted mem (trusted) */ 303 308 subprog_void_untrusted(bpf_get_current_task_btf() + off); 304 - /* variable offset to untrusted char/enum/enum64 (map) */ 309 + /* variable offset to untrusted char/enum (map) */ 305 310 subprog_char_untrusted(mem + off); 306 311 subprog_enum_untrusted((void *)mem + off); 307 - subprog_enum64_untrusted((void *)mem + off); 308 312 return 0; 309 313 } 310 314