WSL2-Linux-Kernel/net/xdp
Magnus Karlsson 58ca14ed98 xsk: Fix corrupted packets for XDP_SHARED_UMEM
Fix an issue in XDP_SHARED_UMEM mode together with aligned mode where
packets are corrupted for the second and any further sockets bound to
the same umem. In other words, this does not affect the first socket
bound to the umem. The culprit for this bug is that the initialization
of the DMA addresses for the pre-populated xsk buffer pool entries was
not performed for any socket but the first one bound to the umem. Only
the linear array of DMA addresses was populated. Fix this by populating
the DMA addresses in the xsk buffer pool for every socket bound to the
same umem.

Fixes: 94033cd8e7 ("xsk: Optimize for aligned case")
Reported-by: Alasdair McWilliam <alasdair.mcwilliam@outlook.com>
Reported-by: Intrusion Shield Team <dnevil@intrusion.com>
Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Tested-by: Alasdair McWilliam <alasdair.mcwilliam@outlook.com>
Acked-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Link: https://lore.kernel.org/xdp-newbies/6205E10C-292E-4995-9D10-409649354226@outlook.com/
Link: https://lore.kernel.org/bpf/20220812113259.531-1-magnus.karlsson@gmail.com
2022-08-15 17:26:07 +02:00
..
Kconfig
Makefile
xdp_umem.c xdp: Directly use ida_alloc()/free() APIs 2022-06-02 16:25:30 -07:00
xdp_umem.h
xsk.c xsk: Mark napi_id on sendmsg() 2022-07-14 22:45:34 +02:00
xsk.h
xsk_buff_pool.c xsk: Fix corrupted packets for XDP_SHARED_UMEM 2022-08-15 17:26:07 +02:00
xsk_diag.c
xsk_queue.c
xsk_queue.h xsk: Fix handling of invalid descriptors in XSK TX batching API 2022-06-08 16:20:07 +02:00
xskmap.c bpf: Compute map_btf_id during build time 2022-04-26 11:35:21 -07:00