Re: [PATCH v2 bpf 0/4] bpf: Fix ring buffer position wrap handling on 32-bit
| Newsgroups | org.kernel.vger.bpf,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <178674662888.3982694.9316190652482491178.git-patchwork-notify@kernel.org> |
Hello: This series was applied to bpf/bpf-next.git (master) by Andrii Nakryiko <[email protected]>: On Fri, 14 Aug 2026 14:48:39 +0200 you wrote: > Patch 1 is v1 with the (long) cast dropped, as requested: pending_pos never > runs ahead of producer_pos, so the unsigned difference is the real distance. > > While looking for other places where these positions are compared as values > rather than as distances, three more turned up; patches 2-4 fix those. All > four are the same class of bug: the positions are unsigned long, they wrap at > 2^32 on 32-bit architectures, Documentation/bpf/ringbuf.rst says that wrap is > expected, and therefore every comparison between them has to be written as a > difference. > > [...] Here is the summary with links: - [v2,bpf,1/4] bpf: Fix pending_pos walk on 32-bit ring position wrap https://git.kernel.org/bpf/bpf-next/c/6ff5b56a50c5 - [v2,bpf,2/4] bpf: Fix available-data accounting on 32-bit wrap in overwrite mode https://git.kernel.org/bpf/bpf-next/c/3f611e9b820e - [v2,bpf,3/4] bpf: Read producer_pos before overwrite_pos in ringbuf_avail_data_sz() (no matching commit) - [v2,bpf,4/4] libbpf: Fix ring buffer consumer loop on 32-bit position wrap https://git.kernel.org/bpf/bpf-next/c/fdd4fad0bbbd You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html