]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests: bpf: fix cgroup_hierarchical_stats
authorPuranjay Mohan <puranjay@kernel.org>
Fri, 2 Jan 2026 18:00:35 +0000 (10:00 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 2 Jan 2026 20:04:29 +0000 (12:04 -0800)
commitcf82580c86a91de2aa979260985cadcb39ed28d2
treeacb86d856390b25d73be6804cc789165975bcc4f
parent230b0118e416583a53fc0ad5d1fecb37f496fe34
selftests: bpf: fix cgroup_hierarchical_stats

The cgroup_hierarchical_stats selftests uses an fentry program attached
to cgroup_attach_task and then passes the received &dst_cgrp->self to
the css_rstat_updated() kfunc. The verifier now assumes that all kfuncs
only takes trusted pointer arguments, and pointers received by fentry
are not marked trustes by default.

Use a tp_btf program in place for fentry for this test, pointers
received by tp_btf programs are marked trusted by the verifier.

Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Reviewed-by: Emil Tsalapatis <emil@etsalapatis.com>
Signed-off-by: Puranjay Mohan <puranjay@kernel.org>
Link: https://lore.kernel.org/r/20260102180038.2708325-10-puranjay@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/progs/cgroup_hierarchical_stats.c