mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stanislav Fomichev <sdf.kernel@gmail.com>
To: Paolo Abeni <pabeni@redhat.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com,
	 kuba@kernel.org, horms@kernel.org, hawk@kernel.org,
	ilias.apalodimas@linaro.org,  sdf@fomichev.me,
	bobbyeshleman@meta.com, almasrymina@google.com,
	 kaiyuanz@google.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v2 3/3] net: devmem: decode DMA addresses for TX
Date: Tue, 29 Sep 2026 08:55:31 -0700	[thread overview]
Message-ID: <arvfYIx_0z6lU_Lq@devvm7509.cco0.facebook.com> (raw)
In-Reply-To: <97f2fdff-3954-4d53-aa55-156672658ee5@redhat.com>

On 09/29, Paolo Abeni wrote:
> On 9/29/26 11:43, Paolo Abeni wrote:
> > On 9/25/26 22:15, Stanislav Fomichev wrote:
> > > 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.
> > > 
> > > Fixes: bd61848900bf ("net: devmem: Implement TX path")
> > > Reviewed-by: Mina Almasry <almasrymina@google.com>
> > > Signed-off-by: Stanislav Fomichev <sdf@fomichev.me>
> > Fixes tag for net-next patches pointing to old code are highly discouraged.
> > My understanding is that netem on 32 bits is mostly a theoretical thing,
> > i.e. no actual usage.
> > Would you be ok to strip the tag? No need to repost, just reply here.
> Actually the above is more FYI than a real request. I'll apply the
> series stripping the tag.

Yes, agreed, this does not look like a real issue to me either. Thanks!

  reply	other threads:[~2026-09-29 16:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-25 20:15 [PATCH net-next v2 0/3] net: consolidate devmem net_iov freelist and DMA handling Stanislav Fomichev
2026-09-25 20:15 ` [PATCH net-next v2 1/3] net: netmem: move to index based freelist Stanislav Fomichev
2026-09-25 20:15 ` [PATCH net-next v2 2/3] net: devmem: use memory provider helpers for net_iovs Stanislav Fomichev
2026-09-25 20:15 ` [PATCH net-next v2 3/3] net: devmem: decode DMA addresses for TX Stanislav Fomichev
2026-09-29  9:43   ` Paolo Abeni
2026-09-29 13:39     ` Paolo Abeni
2026-09-29 15:55       ` Stanislav Fomichev [this message]
2026-09-29 14:10 ` [PATCH net-next v2 0/3] net: consolidate devmem net_iov freelist and DMA handling patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=arvfYIx_0z6lU_Lq@devvm7509.cco0.facebook.com \
    --to=sdf.kernel@gmail.com \
    --cc=almasrymina@google.com \
    --cc=bobbyeshleman@meta.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hawk@kernel.org \
    --cc=horms@kernel.org \
    --cc=ilias.apalodimas@linaro.org \
    --cc=kaiyuanz@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sdf@fomichev.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®