From: Björn Töpel <bjo…@kernel.org>
Date: Mon, 30 Nov 2026 13:37:34 +0100
> i40e, igb, igc and ixgbe copy an XSk zero-copy packet that the XDP
> program passes into a new skb, and round the length of the copy up to
> a multiple of 8 bytes. The copy then reads up to 7 bytes past the end
> of the data. When the data ends at the end of the last chunk of the
> UMEM, the read hits the guard page after the UMEM mapping and faults.
>
> On i40e the device can already fill a single-buffer chunk to its end.
> The last patch of this series lets multi-buffer pools and
> bpf_xdp_adjust_tail() reach the end of a chunk on all four.
>
> Copy the exact length.
>
> Found by an AI code review agent in review of this series. Reproduced
> on igb in QEMU. An AF_XDP socket in zero copy with 4K chunks and only
> the last chunk of the UMEM in the FILL ring, and an XDP program that
> adds 4 bytes of metadata, grows the tail to the end of the chunk and
> passes the packet:
>
> BUG: unable to handle page fault for address: ffa0000001048000
> RIP: 0010:memcpy+0xc/0x30
> igb_clean_rx_irq_zc+0x8a7/0x1520
> igb_poll+0x1039/0x4f50
>
> With this patch the same test passes.
>
> Fixes: 6dba29537c0f ("i40e: respect metadata on XSK Rx to skb")
> Fixes: f322a620be69 ("ixgbe: respect metadata on XSK Rx to skb")
> Fixes: f9e61d365baf ("igc: don't reserve excessive XDP_PACKET_HEADROOM on XSK Rx to skb")
> Fixes: 2c6196013f84 ("igb: Add AF_XDP zero-copy Rx support")
> Signed-off-by: Björn Töpel <bjo…@kernel.org>
Acked-by: Alexander Lobakin <alek…@intel.com>
Thanks,
Olek