netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf 0/2] xdp: fix page_pool leaks
@ 2025-10-03 14:02 Maciej Fijalkowski
  2025-10-03 14:02 ` [PATCH bpf 1/2] xdp: update xdp_rxq_info's mem type in XDP generic hook Maciej Fijalkowski
  2025-10-03 14:02 ` [PATCH bpf 2/2] veth: update mem type in xdp_buff Maciej Fijalkowski
  0 siblings, 2 replies; 13+ messages in thread
From: Maciej Fijalkowski @ 2025-10-03 14:02 UTC (permalink / raw)
  To: bpf, ast, daniel, hawk, ilias.apalodimas, toke, lorenzo
  Cc: netdev, magnus.karlsson, andrii, stfomichev, aleksander.lobakin,
	Maciej Fijalkowski

Hi,

this set fixes 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.

This work was started by Octavian Purdila, below you can find links to
two revisions:
v2:
https://lore.kernel.org/bpf/20251001074704.2817028-1-tavip@google.com/
- use a local xdp_rxq_info structure and update mem.type instead of
  skipping using page pool if the netdev xdp_rxq_info is not set to
  MEM_TYPE_PAGE_POOL (which is always the case currently)
v1:
https://lore.kernel.org/netdev/20250924060843.2280499-1-tavip@google.com/


In this approach we use a small helper that utilizes
page_pool_page_is_pp(), which is enough for setting correct mem type in
xdp_rxq_info.

Thanks!

Maciej Fijalkowski (2):
  xdp: update xdp_rxq_info's mem type in XDP generic hook
  veth: update mem type in xdp_buff

 drivers/net/veth.c | 2 ++
 include/net/xdp.h  | 7 +++++++
 net/core/dev.c     | 2 ++
 3 files changed, 11 insertions(+)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2025-10-14 16:53 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-03 14:02 [PATCH bpf 0/2] xdp: fix page_pool leaks Maciej Fijalkowski
2025-10-03 14:02 ` [PATCH bpf 1/2] xdp: update xdp_rxq_info's mem type in XDP generic hook Maciej Fijalkowski
2025-10-03 17:29   ` Alexei Starovoitov
2025-10-07 19:39     ` Maciej Fijalkowski
2025-10-07 20:18       ` Alexei Starovoitov
2025-10-03 14:02 ` [PATCH bpf 2/2] veth: update mem type in xdp_buff Maciej Fijalkowski
2025-10-03 23:10   ` Jakub Kicinski
2025-10-07 14:59     ` Maciej Fijalkowski
2025-10-08  1:11       ` Jakub Kicinski
2025-10-08  9:22         ` Maciej Fijalkowski
2025-10-08 10:37           ` Maciej Fijalkowski
2025-10-13 23:24             ` Jakub Kicinski
2025-10-14 16:53               ` Toke Høiland-Jørgensen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).