From: sashiko-bot@kernel.org
To: "Zihan Xi" <zihanx@nebusec.ai>, virtualization@lists.linux.dev
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
"Eugenio Perez" <eperezma@redhat.com>
Subject: Re: [PATCH nf v8 2/3] netfilter: nf_dup_netdev: bound asynchronous duplication
Date: Thu, 15 Oct 2026 07:58:18 +0000 [thread overview]
Message-ID: <sashiko-outbox-172440@kernel.org> (raw)
In-Reply-To: <a23b041de631f3c3821de021cbd4d421f2359ae9.1792048855.git.zihanx@nebusec.ai>
> The task-local transmit recursion counter covers synchronous
> dev_queue_xmit() recursion, but does not follow a duplicated skb through
> asynchronous receive paths. Carry a bounded duplication depth with the skb
> and preserve it across skb and XDP conversions.
>
> Store the depth in the sk_buff headers group. __copy_skb_header() copies
> that group with a single memcpy(), so skb_clone() preserves the depth.
> Propagate it explicitly when veth converts an skb to an XDP buffer and
> when XDP buffers or frames are converted back to skbs in the core and
> virtio paths. Preserve it through zero-copy XDP frame conversion as well.
>
> Clear the depth when GRO reuses an skb and when AF_XDP or libeth
> reinitializes a recycled XDP buffer, so a fresh packet does not inherit
> stale recursion state.
>
> Keep the existing recursion limit and reject MIRRED flow offload where
> the software depth cannot be enforced.
>
> Fixes: 502061f81d3e ("netfilter: nf_tables: add packet duplication to the netdev family")
> Cc: stable@vger.kernel.org
> Reported-by: Vega <vega@nebusec.ai>
> Assisted-by: LLM
> Co-developed-by: Luxing Yin <root@tr0jan.top>
> Signed-off-by: Luxing Yin <root@tr0jan.top>
> Signed-off-by: Zihan Xi <zihanx@nebusec.ai>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1792048855.git.zihanx@nebusec.ai?part=2
next prev parent reply other threads:[~2026-10-15 7:58 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-15 7:43 [PATCH nf v8 0/3] netfilter: bound asynchronous packet duplication Zihan Xi
2026-10-15 7:43 ` [PATCH nf v8 1/3] netfilter: nf_dup: preserve guard across NFQUEUE reinjection Zihan Xi
2026-10-15 7:56 ` sashiko-bot
2026-10-15 8:13 ` zihan xi
2026-10-15 7:43 ` [PATCH nf v8 2/3] netfilter: nf_dup_netdev: bound asynchronous duplication Zihan Xi
2026-10-15 7:58 ` sashiko-bot [this message]
2026-10-15 7:43 ` [PATCH nf v8 3/3] netfilter: nf_dup: prevent TTL and hop-limit underflow Zihan Xi
2026-10-15 7:51 ` sashiko-bot
2026-10-15 7:49 ` [PATCH nf v8 0/3] netfilter: bound asynchronous packet duplication netdev-bot+sinfo
2026-10-15 10:39 ` Florian Westphal
2026-10-15 11:33 ` zihan xi
2026-10-16 16:12 ` zihan xi
2026-10-16 16:20 ` Florian Westphal
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=sashiko-outbox-172440@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=eperezma@redhat.com \
--cc=mst@redhat.com \
--cc=sashiko-reviews@lists.linux.dev \
--cc=virtualization@lists.linux.dev \
--cc=zihanx@nebusec.ai \
/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