Re: [PATCH] veth: Fix race with AF_XDP exposing old or uninitialized descriptors

patchwork-bot+netdevbpf
2022-12-22T14:40:22Z

Hello:

This patch was applied to netdev/net.git (master)
by Paolo Abeni <pabeni@redhat.com>:

On Tue, 20 Dec 2022 12:59:03 -0600 you wrote:
> When AF_XDP is used on on a veth interface the RX ring is updated in two
> steps. veth_xdp_rcv() removes packet descriptors from the FILL ring
> fills them and places them in the RX ring updating the cached_prod
> pointer. Later xdp_do_flush() syncs the RX ring prod pointer with the
> cached_prod pointer allowing user-space to see the recently filled in
> descriptors. The rings are intended to be SPSC, however the existing
> order in veth_poll allows the xdp_do_flush() to run concurrently with
> another CPU creating a race condition that allows user-space to see old
> or uninitialized descriptors in the RX ring. This bug has been observed
> in production systems.
>
> [...]

Here is the summary with links:
- veth: Fix race with AF_XDP exposing old or uninitialized descriptors
https://git.kernel.org/netdev/net/c/fa349e396e48

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.