From: Pavel Begunkov <asml.silence@gmail.com>
To: Mina Almasry <almasrymina@google.com>,
Stanislav Fomichev <sdf@fomichev.me>,
Paolo Abeni <pabeni@redhat.com>,
Kaiyuan Zhang <kaiyuanz@google.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Simon Horman <horms@kernel.org>,
Bobby Eshleman <bobbyeshleman@meta.com>,
Ralf Lici <ralf@mandelbit.com>
Subject: Re: [PATCH net v1] net: devmem: prevent mixing fragments from different bindings
Date: Thu, 8 Oct 2026 14:03:17 +0100 [thread overview]
Message-ID: <36d9e570-15d8-4a2d-aafb-3ee6e5681205@gmail.com> (raw)
In-Reply-To: <20261008033952.1399670-1-almasrymina@google.com>
On 10/8/26 04:39, Mina Almasry wrote:
> validate_xmit_unreadable_skb() only inspects shinfo->frags[0] and
> assumes all fragments in an unreadable skb belong to that same devmem
> binding. However, tcp_sendmsg_locked() only checks that readability
> matches the presence of a binding (skb_frags_readable(skb) != !binding),
> allowing consecutive sendmsg() calls with different dmabuf bindings to
> collapse into the same skb and bypass per-device and unbind checks in
> validate_xmit_unreadable_skb().
>
> Add net_devmem_skb_binding() to query the binding associated with an
> skb, reuse it in validate_xmit_unreadable_skb(), and check in
> zerocopy_fill_skb_from_devmem() that existing fragments match the target
> binding.
Looks good
Pavel Begunkov <asml.silence@gmail.com>
--
Pavel Begunkov
next prev parent reply other threads:[~2026-10-08 13:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-08 3:39 Mina Almasry
2026-10-08 3:45 ` netdev-bot+sinfo
2026-10-08 3:47 ` Mina Almasry
2026-10-08 8:29 ` Bobby Eshleman
2026-10-08 13:03 ` Pavel Begunkov [this message]
2026-10-08 13:16 ` Pavel Begunkov
2026-10-08 22:10 ` Stanislav Fomichev
2026-10-08 3:40 Mina Almasry
2026-10-08 3:45 ` netdev-bot+sinfo
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=36d9e570-15d8-4a2d-aafb-3ee6e5681205@gmail.com \
--to=asml.silence@gmail.com \
--cc=almasrymina@google.com \
--cc=bobbyeshleman@meta.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=horms@kernel.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=ralf@mandelbit.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®