Re: [PATCH bpf-next v2] libbpf: Add a check to ensure that page_cnt is non-zero

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello:

This patch was applied to bpf/bpf-next.git (master)
by Daniel Borkmann <daniel@xxxxxxxxxxxxx>:

On Thu,  3 Mar 2022 08:59:21 +0800 you wrote:
> The page_cnt parameter is used to specify the number of memory pages
> allocated for each per-CPU buffer, it must be non-zero and a power of 2.
> 
> Currently, the __perf_buffer__new() function attempts to validate that
> the page_cnt is a power of 2 but forgets checking for the case where
> page_cnt is zero, we can fix it by replacing 'page_cnt & (page_cnt - 1)'
> with 'page_cnt == 0 || (page_cnt & (page_cnt - 1))'.
> 
> [...]

Here is the summary with links:
  - [bpf-next,v2] libbpf: Add a check to ensure that page_cnt is non-zero
    https://git.kernel.org/bpf/bpf-next/c/41332d6e3a43

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





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux