selftests/bpf: Test bpf_cpumask_populate() rejects a borrowed cpumask

bpf_cpumask_populate() now takes a struct bpf_cpumask *, so update the
kfunc declaration and drop the struct cpumask * casts in the existing
populate tests. Add test_populate_borrowed_destination, which passes a
borrowed task->cpus_ptr and asserts the verifier rejects it as a writable
destination.

Signed-off-by: Nicholas Dudar <main.kalliope@gmail.com>
Acked-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Emil Tsalapatis <emil@etsalapatis.com>
Link: https://lore.kernel.org/bpf/20260709182800.2037938-3-main.kalliope@gmail.com
Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
This commit is contained in:
Nicholas Dudar 2026-07-09 14:28:00 -04:00 • committed by Kumar Kartikeya Dwivedi
commit 6267b83528
No known key found for this signature in database
GPG key ID: 472D377B63542F83
3 changed files with 25 additions and 6 deletions