xdp: fix page_pool leaks
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v5 Latest2 patches 11 repliesIn review
- v42 patches 6 repliesSuperseded
- v32 patches 2 repliesSuperseded
Earlier versions · 2
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v2 | 2 patches | 13 replies | Superseded | |
| v1 | 2 patches | 10 replies | Superseded |
Changes in v5 from the cover letter
- rely again on sk_buff::pp_recycle when setting mem type on rxq (Jesper, Jakub)
- add ack from Toke on patch 2 and restore it on patch 1
Patches in v5 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | xdp: introduce xdp_convert_skb_to_buff()include/ net/ | +29 | 9 replies | |
| 2/2 | veth: update mem type in xdp_buffdrivers/ | +26 | 2 replies |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Ihor Solodrai | Toke Høiland-Jørgensen |
|---|---|---|
| 1/2 | T-b | R-b |
| 2/2 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v5 bpf 0/2] xdp: fix page_pool leaks
v1:
https://lore.kernel.org/bpf/[email protected]/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/[email protected]/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
v3:
https://lore.kernel.org/bpf/[email protected]/v3->v4:
- include skb->head when calculating packet length (Toke, lkp)
v4:
https://lore.kernel.org/bpf/[email protected]/v4->v5:
- rely again on sk_buff::pp_recycle when setting mem type on rxq (Jesper, Jakub)
- add ack from Toke on patch 2 and restore it on patch 1
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 | 25 +++++++++++++++++++++++++ net/core/dev.c | 25 ++++--------------------- 3 files changed, 55 insertions(+), 38 deletions(-)
Signature · 1 line
2.43.0