diff options
| author | Stanislav Fomichev <sdf.kernel@gmail.com> | 2026-09-25 13:15:22 -0700 |
|---|---|---|
| committer | Paolo Abeni <pabeni@redhat.com> | 2026-09-29 15:41:31 +0200 |
| commit | 5c729e6c71f1be48b5afb99326a6b687e3600c67 (patch) | |
| tree | 834c0e57399a3a4fe6783314d87324f7800b2f51 /include/linux/timerqueue.h | |
| parent | 5bdeb89ec5b07c751c490af7cac9b1e20a1426ac (diff) | |
net: devmem: decode DMA addresses for TX
On 32-bit architectures where dma_addr_t is wider than unsigned long,
page_pool_set_dma_addr_netmem() stores page-aligned DMA addresses shifted
by PAGE_SHIFT. The net_iov branch of __skb_frag_dma_map() adds byte offsets
to the encoded value, so the NIC is programmed with an invalid DMA address.
This can trigger an IOMMU fault or DMA from unintended memory.
Consolidate DMA address encoding, decoding, and representability checks in
netmem helpers. Use the common decoder from the page pool and net_iov TX
paths so both interpret stored addresses consistently.
Reviewed-by: Mina Almasry <almasrymina@google.com>
Signed-off-by: Stanislav Fomichev <sdf@fomichev.me>
Link: https://patch.msgid.link/20260925201522.254717-4-sdf@fomichev.me
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions
