Re: [PATCH net] net/sched: fix pedit partial COW leading to page cache corruption
From: Jakub Kicinski <kuba@kernel.org>
Date: 2026-05-23 16:46:43
From: Jakub Kicinski <kuba@kernel.org>
Date: 2026-05-23 16:46:43
On Sat, 23 May 2026 08:13:21 -0400 Jamal Hadi Salim wrote:
quoted
quoted
@@ -474,8 +473,6 @@ TC_INDIRECT_SCOPE int tcf_pedit_act(struct sk_buff *skb, } *ptr = ((*ptr & tkey->mask) ^ val); - if (ptr == &hdata) - skb_store_bits(skb, hoffset + offset, ptr, 4); } goto done;I see you are trying to get rid of the skb_header_pointer() / skb_store_bits() piece. Sure looks cleaner if we must linearize.The other thing (i may be over thinking) with pskb_may_pull is: if the data is already linear (in a clone), wouldn't we corrupt the shared linear data of the clone?
I said for the portion of the problem that's "we are writing to frags" IOW not replacing the rest of the patch (assuming we care).