From: Paolo Abeni <pabeni@redhat.com>
To: Josef Bacik <josef@toxicpanda.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Simon Horman <horms@kernel.org>,
Andrew Lunn <andrew+netdev@lunn.ch>
Cc: Willem de Bruijn <willemdebruijn.kernel@gmail.com>,
Fernando Fernandez Mancera <fmancera@suse.de>,
Mina Almasry <almasrymina@google.com>,
David Laight <david.laight.linux@gmail.com>,
netdev@vger.kernel.org
Subject: Re: [PATCH net-next 2/4] net: skbuff: don't clone a stale frag_list member
Date: Thu, 19 Nov 2026 10:26:19 +0100 [thread overview]
Message-ID: <e57353ef-9994-4ec4-b831-05a4fa41537c@redhat.com> (raw)
In-Reply-To: <20261113-b4-skb-segment-clone-fixes-v1-2-f777fb06f3e7@toxicpanda.com>
On 11/13/26 01:21, Josef Bacik wrote:
> Without SG, skb_segment() copies a segment out of head_skb by offset and
> doesn't move pos, i or list_skb along. It still clones list_skb if its
> linear part is as long as a later segment, although part or all of that
> member has been copied already.
>
> This doesn't take a broken skb. Take a gso_size of 1000, a head of 500
> bytes and one member with 1000 linear bytes and a frag of 700. The
> second segment is a clone that starts at the member's first byte again.
> With a head of 2500 bytes and members of 1000 and 500 bytes, the
> segmentation fails with -EINVAL instead.
I must admit the problematic layout is not clear to me, nor if there is
anything build such skbs in the kernel.
Could you please clarify? Note that in the latter case I think we should
drop even this patch.
Thanks,
Paolo
next prev parent reply other threads:[~2026-11-19 9:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-13 0:21 [PATCH net-next 0/4] net: skbuff: skb_segment() fixes for frag_lists without SG Josef Bacik
2026-11-13 0:21 ` [PATCH net-next 1/4] net: skbuff: don't clone a nested frag_list member Josef Bacik
2026-11-19 9:23 ` Paolo Abeni
2026-11-13 0:21 ` [PATCH net-next 2/4] net: skbuff: don't clone a stale " Josef Bacik
2026-11-19 9:26 ` Paolo Abeni [this message]
2026-11-13 0:21 ` [PATCH net-next 3/4] net: compare the payload in the GSO KUnit test Josef Bacik
2026-11-13 0:21 ` [PATCH net-next 4/4] net: test more frag_list layouts without SG Josef Bacik
2026-11-13 2:52 ` [PATCH net-next 0/4] net: skbuff: skb_segment() fixes for frag_lists " Mina Almasry
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=e57353ef-9994-4ec4-b831-05a4fa41537c@redhat.com \
--to=pabeni@redhat.com \
--cc=almasrymina@google.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=david.laight.linux@gmail.com \
--cc=edumazet@kernel.org \
--cc=fmancera@suse.de \
--cc=horms@kernel.org \
--cc=josef@toxicpanda.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=willemdebruijn.kernel@gmail.com \
/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