From: Fred Li <dracodingfly@gmail.com>
To: dracodingfly@gmail.com
Cc: andrii@kernel.org, ast@kernel.org, bpf@vger.kernel.org,
daniel@iogearbox.net, davem@davemloft.net,
john.fastabend@gmail.com, kafai@fb.com, kpsingh@kernel.org,
kuba@kernel.org, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org, songliubraving@fb.com, yhs@fb.com
Subject: Re: [PATCH] test_bpf: Add an skb_segment test for a non linear frag_list whose head_frag=1 and gso_size was mangled
Date: Mon, 27 May 2024 21:59:45 +0800 [thread overview]
Message-ID: <20240527135945.89764-1-dracodingfly@gmail.com> (raw)
In-Reply-To: <20240517154028.70588-1-dracodingfly@gmail.com>
For kernel 6.6.8, when sg is true and skb_headlen(list_skb) != len, it also has
chance run into this BUG_ON() line 4548.
'''
4544 hsize = skb_headlen(head_skb) - offset;
4545
4546 if (hsize <= 0 && i >= nfrags && skb_headlen(list_skb) &&
4547 (skb_headlen(list_skb) == len || sg)) {
4548 BUG_ON(skb_headlen(list_skb) > len);
4549
4550 nskb = skb_clone(list_skb, GFP_ATOMIC);
'''
As commit 9e4b7a99a03a("net: gso: fix panic on frag_list with mixed head alloc types")
said. It walk the frag_list in skb_segment and clear NETIF_F_SG when there is non head_frag
skb.
But for frag_list only with one head_frag, NETIF_F_SG was not cleared, if skb_headlen(list_skb) != len,
in this case, maybe we can fix it with run into segment as commit 13acc94eff122(net: permit skb_segment on
head_frag frag_list skb).
Any suggestions for resolving this issue.
Thanks
Fred Li
prev parent reply other threads:[~2024-05-27 14:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-15 14:43 [PATCH] net: Fix the gso BUG_ON that treat the skb which head_frag is true as non head_frag dracoding
2024-05-16 17:59 ` Willem de Bruijn
2024-05-17 14:02 ` Fred Li
2024-05-17 13:51 ` Fred Li
2024-05-17 15:40 ` [PATCH] test_bpf: Add an skb_segment test for a non linear frag_list whose head_frag=1 and gso_size was mangled Fred Li
2024-05-27 13:59 ` Fred Li [this message]
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=20240527135945.89764-1-dracodingfly@gmail.com \
--to=dracodingfly@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=john.fastabend@gmail.com \
--cc=kafai@fb.com \
--cc=kpsingh@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=songliubraving@fb.com \
--cc=yhs@fb.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.