Netdev List
 help / color / mirror / Atom feed
From: Hangbin Liu <liuhangbin@gmail.com>
To: Xiang Mei <xmei5@asu.edu>
Cc: Jay Vosburgh <jv@jvosburgh.net>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	 "David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	 Jakub Kicinski <kuba@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org,  linux-kernel@vger.kernel.org,
	AutonomousCodeSecurity@microsoft.com,
	 tgopinath@linux.microsoft.com, kys@microsoft.com
Subject: Re: [PATCH net] bonding: fix skb_under_panic in bond_ns_send() over stacked VLANs
Date: Thu, 30 Jul 2026 11:50:15 +0800	[thread overview]
Message-ID: <amrIbBqpw9Ol5wPJ@fedora> (raw)
In-Reply-To: <CAPpSM+RkHO7uEVrEbqgfundSbiLU67enaSXhtk6mL8bXzC17xQ@mail.gmail.com>

Hi Xiang,

On 29.07.2026 16:30, Xiang Mei wrote:
>>         Does adding one or two more nested VLANs move the panic into the
>> above call path?
>>
>
>No, for both of the reasons above: there is no room to add more
>(-EMLINK at N = 7), and skb_cow_head() would absorb it if there were.

What about the scenario that involves nested VLANs? For example:

vlan.1 - vlan.1.2 ... vlan.1..6 - bond - bond.1 - bond.1.2 ... bond.1..6?

>Both symptoms have the same cause, tags inserted before any header
>exists, so the fix is to build the probe in the order the stack uses:
>
>  - push the IPv6 header first, so the reservation is consumed up front
>    and the later tag inserts grow the head via skb_vlan_push() instead
>    of eating it;
>
>  - run the probe through NF_INET_LOCAL_OUT as a bare IPv6 packet,
>    exactly what ndisc_send_skb() feeds the hooks today.  This needs a
>    small export (ndisc_attach_dst()) because ip6_route_me_harder()
>    dereferences skb_dst() unconditionally;
>
>  - only then push the link-layer header and add the VLAN tags, so they
>    land at a real Ethernet header and the target address is untouched.
>
>With that applied the N = 1..6 wire capture is clean throughout.  I kept
>LOCAL_OUT deliberately so NS monitoring keeps traversing netfilter the
>way it does today; dropping it would be simpler, but a silent behaviour
>change.
>
>I am not familiar with the bonding and ndisc internals, so I posted it as
>an RFC rather than presenting it as settled:
>
>  https://lore.kernel.org/netdev/20260729230119.2717507-1-xmei5@asu.edu/T/#t

I'm not sure if calling NF_INET_LOCAL_OUT in bond code is a good idea. Waiting
for other's opinion.

Thanks
Hangbin

  reply	other threads:[~2026-07-30  3:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-19 23:21 [PATCH net] bonding: fix skb_under_panic in bond_ns_send() over stacked VLANs Xiang Mei (Microsoft)
2026-07-20 17:58 ` Jay Vosburgh
2026-07-29 23:30   ` Xiang Mei
2026-07-30  3:50     ` Hangbin Liu [this message]
2026-07-31 23:57       ` Hangbin Liu

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=amrIbBqpw9Ol5wPJ@fedora \
    --to=liuhangbin@gmail.com \
    --cc=AutonomousCodeSecurity@microsoft.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jv@jvosburgh.net \
    --cc=kuba@kernel.org \
    --cc=kys@microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=tgopinath@linux.microsoft.com \
    --cc=xmei5@asu.edu \
    /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