Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: Xin Xie <xiexinet@gmail.com>
To: Simon Horman <horms@kernel.org>
Cc: netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com,
	wsa+renesas@sang-engineering.com, jie.luo@oss.qualcomm.com,
	shuah@kernel.org, linux-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org, fmancera@suse.de,
	bigeasy@linutronix.de, fmaurer@redhat.com, luka.gejak@linux.dev
Subject: Re: [PATCH net-next v4 1/4] net: hsr: add PRP interlink (RedBox) datapath and duplicate discard
Date: Fri, 24 Jul 2026 23:27:57 +0200	[thread overview]
Message-ID: <cc09e554-45fa-4b75-8937-7da15432a886@gmail.com> (raw)
In-Reply-To: <20260724131230.679892-1-horms@kernel.org>

On Fri, 24 Jul 2026 14:12:30 +0100 Simon Horman wrote:
> [Severity: High]
> ... does modifying the MAC header directly in hsr_xmit() corrupt
> shared packet data? [...]
> Should the skb be unshared before making these direct modifications?

I checked this against the v4 base and the series diff.

The shared-data write is real. hsr_xmit() writes
eth_hdr(skb)->h_source in place - the slave-address substitution
for master-originated frames, and the macaddress_redbox
substitution for the interlink port - on skbs that can be clones.
Multiple consumers can share the same packet data while needing
different source addresses: a PRP LAN broadcast or multicast can be
delivered to the master (source rewritten via
hsr_addr_subst_source()) and forwarded to the interlink (rewritten
to macaddress_redbox) from the same underlying buffer.

Two scope facts. This is pre-existing HSR RedBox code, present
since v6.11: hsr_xmit() itself is untouched by the series (patch
1/4's hsr_forward.c changes sit below it and do not modify its
body), and the series' only h_source-adjacent change moves an
existing ether_addr_copy() a few lines earlier in
hsr_dev_finalize(), where no skb is involved. But the series does
make the existing interlink path reachable for PRP.

I will handle this as an independent fix for the existing HSR/PRP
code, posted separately for net with its own Fixes: tag - not
folded into this feature series.

Would you like the feature series to wait for that fix, or may v4
proceed while it is reviewed separately?

(The hsr_create_tagged_frame() side question overlaps the third
finding in your 3/4 mail; it is answered there.)

--
Xin

  reply	other threads:[~2026-07-24 21:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-17 20:14 [PATCH net-next v4 0/4] net: hsr: PRP RedBox (PRP-SAN) support Xin Xie
2026-07-17 20:14 ` [PATCH net-next v4 1/4] net: hsr: add PRP interlink (RedBox) datapath and duplicate discard Xin Xie
2026-07-24 13:12   ` Simon Horman
2026-07-24 21:27     ` Xin Xie [this message]
2026-07-27 15:02       ` Simon Horman
2026-07-17 20:14 ` [PATCH net-next v4 2/4] net: hsr: emit RedBox-MAC TLV in PRP RedBox supervision frames Xin Xie
2026-07-17 20:14 ` [PATCH net-next v4 3/4] net: hsr: allow PRP RedBox (interlink) creation Xin Xie
2026-07-24 13:12   ` Simon Horman
2026-07-24 21:30     ` Xin Xie
2026-07-17 20:14 ` [PATCH net-next v4 4/4] selftests: net: hsr: add PRP RedBox test Xin Xie
2026-07-28  1:00 ` [PATCH net-next v4 0/4] net: hsr: PRP RedBox (PRP-SAN) support patchwork-bot+netdevbpf

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=cc09e554-45fa-4b75-8937-7da15432a886@gmail.com \
    --to=xiexinet@gmail.com \
    --cc=bigeasy@linutronix.de \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=fmancera@suse.de \
    --cc=fmaurer@redhat.com \
    --cc=horms@kernel.org \
    --cc=jie.luo@oss.qualcomm.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=luka.gejak@linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shuah@kernel.org \
    --cc=wsa+renesas@sang-engineering.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