Re: [PATCH v2 bpf 0/4] bpf: Fix ring buffer position wrap handling on 32-bit

From: patchwork-bot+netdevbpf

Date: Fri Aug 14 2026 - 18:32:03 EST


Hello:

This series was applied to bpf/bpf-next.git (master)
by Andrii Nakryiko <andrii@xxxxxxxxxx>:

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