diff options
author | 2022-11-16 15:23:50 +0800 | |
---|---|---|
committer | 2022-11-17 15:49:39 -0800 | |
commit | 64176bff2446cd825b163976ee451fb6e5cd851d (patch) | |
tree | ce7ea47216f9fb50875065ea9e850d5e1f6975b9 /drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | |
parent | libbpf: Handle size overflow for ringbuf mmap (diff) | |
download | wireguard-linux-64176bff2446cd825b163976ee451fb6e5cd851d.tar.xz wireguard-linux-64176bff2446cd825b163976ee451fb6e5cd851d.zip |
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 'drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c')
0 files changed, 0 insertions, 0 deletions