diff options
author | Hou Tao <houtao1@huawei.com> | 2022-11-16 10:23:50 +0300 |
---|---|---|
committer | Andrii Nakryiko <andrii@kernel.org> | 2022-11-18 02:49:39 +0300 |
commit | 64176bff2446cd825b163976ee451fb6e5cd851d (patch) | |
tree | ce7ea47216f9fb50875065ea9e850d5e1f6975b9 /tools/perf/scripts/python/stackcollapse.py | |
parent | 927cbb478adf917e0a142b94baa37f06279cc466 (diff) | |
download | linux-64176bff2446cd825b163976ee451fb6e5cd851d.tar.xz |
libbpf: Handle size overflow for user ringbuf mmap
Similar with the overflow problem on ringbuf mmap, in user_ringbuf_map()
2 * max_entries may overflow u32 when mapping writeable region.
Fixing it by casting the size of writable mmap region into a __u64 and
checking whether or not there will be overflow during mmap.
Fixes: b66ccae01f1d ("bpf: Add libbpf logic for user-space ring buffer")
Signed-off-by: Hou Tao <houtao1@huawei.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20221116072351.1168938-4-houtao@huaweicloud.com
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions