diff options
author | Andrii Nakryiko <andriin@fb.com> | 2020-06-30 09:15:00 +0300 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2020-06-30 17:31:55 +0300 |
commit | 517bbe1994a3cee29a35c730662277bb5daff582 (patch) | |
tree | e1c863b9b31b8101e280f2c8b8a5b1443f274c74 /kernel/taskstats.c | |
parent | 7e0245753f1794f17de472dcf4694fa5ed527384 (diff) | |
download | linux-517bbe1994a3cee29a35c730662277bb5daff582.tar.xz |
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 'kernel/taskstats.c')
0 files changed, 0 insertions, 0 deletions