Re: [PATCH net 1/2] net/ipv4: reserve exthdrlen as headroom instead of counting it in skb->len
flat view
From: Willem de Bruijn <willemb@google.com>
Date: 2026-10-29 14:21:57
On Thu, Oct 29, 2026 at 4:33 AM tencentos_secure(TencentOS安全公共邮箱)
[off-list ref] wrote:Thanks for reviewing this and involving the IPsec maintainer. I understand the concern about stable backports. For the same inputs to the skb setup block, the allocation request is unchanged, and the tail offset is equal before and after: hh_len + (fraglen + exthdrlen - pagedlen) == (hh_len + exthdrlen) + (fraglen - pagedlen) The network and transport header offsets from skb->head are also unchanged. The initial pull in __ip_make_skb() becomes unnecessary because skb->data already points to the network header. These are local layout checks, not a proof that the change is semantically neutral:
But very helpul in reasoning about the risk of side-effects, thanks.
skb->len intentionally excludes the reserved space, which changes the subsequent fragmentation calculations. Also, my claim that every skb has len <= maxfraglen was too strong: an skb can reach mtu, which may exceed maxfraglen. I will correct that wording in the next revision. Understood on IPv6: the corresponding variable is dst_exthdrlen. I'll wait for the additional review before respinning.
I'd love to see my eyes on this. But unless anyone responds, let's move forward. The series has been listed as changes requested in patchwork now, so a new revision will indeed be needed.