Re: [PATCH bpf-next] bpf/selftests: use bpf_num_possible_cpus() in per-cpu map allocations

From: patchwork-bot+netdevbpf
Date: Wed Apr 06 2022 - 15:32:54 EST


Hello:

This patch was applied to bpf/bpf-next.git (master)
by Andrii Nakryiko <andrii@xxxxxxxxxx>:

On Wed, 6 Apr 2022 10:54:08 +0200 you wrote:
> bpf_map_value_size() uses num_possible_cpus() to determine map size, but
> some of the tests only allocate enough memory for online cpus. This
> results in out-of-bound writes in userspace during bpf(BPF_MAP_LOOKUP_ELEM)
> syscalls in cases when number of online cpus is lower than the number of
> possible cpus. Fix by switching from get_nprocs_conf() to
> bpf_num_possible_cpus() when determining the number of processors in
> these tests (test_progs/netcnt and test_cgroup_storage).
>
> [...]

Here is the summary with links:
- [bpf-next] bpf/selftests: use bpf_num_possible_cpus() in per-cpu map allocations
https://git.kernel.org/bpf/bpf-next/c/ebaf24c589d7

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html