lkml.org 
[lkml]   [2022]   [Apr]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH bpf-next] bpf/selftests: use bpf_num_possible_cpus() in per-cpu map allocations
From
Date
Hello:

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

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


\
 
 \ /
  Last update: 2022-04-06 21:35    [W:0.042 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site