aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include
diff options
context:
space:
mode:
authorAndrii Nakryiko <andriin@fb.com>2020-06-29 23:15:00 -0700
committerDaniel Borkmann <daniel@iogearbox.net>2020-06-30 16:31:55 +0200
commit517bbe1994a3cee29a35c730662277bb5daff582 (patch)
treee1c863b9b31b8101e280f2c8b8a5b1443f274c74 /include
parentxsk: Use dma_need_sync instead of reimplenting it (diff)
downloadwireguard-linux-517bbe1994a3cee29a35c730662277bb5daff582.tar.xz
wireguard-linux-517bbe1994a3cee29a35c730662277bb5daff582.zip
bpf: Enforce BPF ringbuf size to be the power of 2
BPF ringbuf assumes the size to be a multiple of page size and the power of 2 value. The latter is important to avoid division while calculating position inside the ring buffer and using (N-1) mask instead. This patch fixes omission to enforce power-of-2 size rule. Fixes: 457f44363a88 ("bpf: Implement BPF ring buffer and verifier support for it") Signed-off-by: Andrii Nakryiko <andriin@fb.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20200630061500.1804799-1-andriin@fb.com
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions