[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251022125209.2649287-1-maciej.fijalkowski@intel.com>
Date: Wed, 22 Oct 2025 14:52:07 +0200
From: Maciej Fijalkowski <maciej.fijalkowski@...el.com>
To: bpf@...r.kernel.org,
ast@...nel.org,
daniel@...earbox.net,
hawk@...nel.org
Cc: netdev@...r.kernel.org,
magnus.karlsson@...el.com,
aleksander.lobakin@...el.com,
ilias.apalodimas@...aro.org,
toke@...hat.com,
lorenzo@...nel.org,
kuba@...nel.org,
Maciej Fijalkowski <maciej.fijalkowski@...el.com>
Subject: [PATCH v3 bpf 0/2] xdp: fix page_pool leaks
v1:
https://lore.kernel.org/bpf/20251003140243.2534865-1-maciej.fijalkowski@intel.com/
v1->v2:
- add skb to xdp_buff converter (Jakub)
- postpone restoration of veth's xdp_rxq_info mem model (AI)
v2:
https://lore.kernel.org/bpf/20251017143103.2620164-1-maciej.fijalkowski@intel.com/T/
v2->v3:
- make skb->xdp_buff conversion agnostic of current skb->data position
(Toke)
- do not pull mac header in veth (Toke)
- use virt_to_head_page() when checking if xdp->data comes from
page_pool (Olek)
- add ack from Toke
Hi,
here we fix page_pool leaks which happen when fragment is released
within XDP program and memory type is set incorrectly. The reports come
from syzbot and AF_XDP test suite.
Most of the changes are about pulling out the common code for
init/prepare xdp_buff based on existing skb and supplying it with
correct xdp_rxq_info's mem_type that is assigned to xdp_buff. A bit more
stuff, page_pool related, had to be done on veth side.
Originally, this work was started by Octavian Purdila.
Thanks!
Maciej Fijalkowski (2):
xdp: introduce xdp_convert_skb_to_buff()
veth: update mem type in xdp_buff
drivers/net/veth.c | 43 ++++++++++++++++++++++++++-----------------
include/net/xdp.h | 27 +++++++++++++++++++++++++++
net/core/dev.c | 25 ++++---------------------
3 files changed, 57 insertions(+), 38 deletions(-)
--
2.43.0
Powered by blists - more mailing lists