Re: [PATCH net v3 1/3] net: hsr: privatize interlink-bound skbs before address mutation

From
Xin Xie <hidden>
Date
2026-09-18 21:47:09
Also in
linux-kselftest
Reply to
Jakub Kicinski, 2026-08-14
On 14/08/2026 03:27, Jakub Kicinski wrote:
[Severity: Medium]
Is the enumeration in this comment complete?  The unconditional interlink
source-address rewrite is pre-existing and was not introduced by this
patch, but the new guard and the commit message claim ("Other interlink
traffic keeps its zero-copy behavior") assert that the uncovered cases are
safe, and there looks to be one that isn't.
... 
Since skb_cow(skb, 0) is a no-op for a non-cloned skb (__skb_cow() only
calls pskb_expand_head() when skb_cloned() or extra headroom is needed),
could the call be keyed on the actual sharing state, or simply made
unconditional for HSR_PT_INTERLINK, instead of on the topology predicate?
Correct, the enumeration is incomplete. For TAG_RM ingress retained
in frame->skb_std, a queued packet-socket clone can still share its data
even when the frame is not locally destined. The interlink source rewrite
can then change that clone.

I'll remove the topology-based assumption when revising the COW handling
for v4.

-- 
Xin
Thread (16 messages) 16 messages, 2 authors, last reply 2026-09-18
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help