From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795961264; b=QkLtztjNqV7hJTH26fYQqsfNHZF16lT6ugwTAcQB3BU7LrvlbgRb983zNCFsDcagg08C Z2ZbiViBfVSBEQ//xa4JvQqyLbDIRu9DbyW7OlM3SW+OiwjXIQaWkiPeCChN+efC2DzCh KPNlISU5BrKElKD/UA4HB0IRRcCcY8vkyQvZRIR26TsB1bhueiR0rxlzhZ4SlLqjqaA7s gby/XVYptrzc8bmUDIeD4IfbtGEl+e7/AP1f2AyuYPLSr4iQvy10+LVyEo8KfoKvxBYJ2 yEILPHfYMwquiybl0KamruLbJOZWpZznK8Qt6I6DNvmzUPcdgDa6QCklRz5H/FY9PIw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795961264; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=VMvhRwYI+MJfs4ALTeq9Gl3XEe8IYvKRYXqwcxZ1qGE=; b=V/PNpNHfPB970pc0CtMGTwhE78VVfzpLD5FFsGJF9IroNv1crPI+vy1VWn3qTIp52n2u DY1xckPocTqrsozv3XTQp19ePjEqa59wfPpzDcGv/0x+vTJesOIQ0fC6Zk5l6uhGQ9zf9 0WbbNN1feFeriYW/gmMRqEZ0n+IR9n/jL8IdarR07rUpDsxPfzjZ6iWOXx3a7erRfc/Sw 7EhIfR2QO5MNiyYPhQWvEs4KpHZBdPTq486hh8bqmuhhyIudrHWWR17Zz4Wps3bQ6r5hE OFM3UTD494y/lNPqv7cA+IcCWulAGJlWuOzj7t4p+SZmr54SJwAM4xx0MMoyYpk37uQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="k/NP2Rkz"; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8F565606A31C; Sun, 29 Nov 2026 14:07:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=k/NP2Rkz Received: by smtp.kernel.org (Postfix) with ESMTPSA id 043C81F00897; Sun, 29 Nov 2026 14:07:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795961264; bh=VMvhRwYI+MJfs4ALTeq9Gl3XEe8IYvKRYXqwcxZ1qGE=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=k/NP2Rkzv6LUpM8ytjiCpII8gkSm0JRtX69rfJS6c059fEXDM0Lh9hq24m1T4fYtd Jxn1wRnzQkpr2vs54XBXGNd6pWxsZc+h16s0riPDoVM9isHsXUXkp/0bpYG1Sv3YLm nTa2bI5x8LDtQxF2kCRyVxqWu5WoWOc9CcscDKtuwMZjZ6SbXJc66vfCBFNKbowSmw k163258KnuOVu3sDJs9pYhpHG24WzlKCbdgLbaKIMFjR+Hr5ZVhFIA/WXTWFfCAQty rJvNONhs2DNQzGQb3FEqxapB5d4kBTw5UB66vU7QAL+S3WnKDcFTIVI9yE5OwqASiL fnRZbFHdtLH1w== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH net-next v4 1/2] net: keep the TCP fixed-ID flags on the header they describe Reply-To: sashiko-reviews@lists.linux.dev To: "Julius Bairaktaris" Cc: linux-rdma@vger.kernel.org, bpf@vger.kernel.org In-Reply-To: References: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Sun, 29 Nov 2026 14:07:43 +0000 X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Medium] xfrm: stale inner_protocol in xfrm_output() skips saving inner header offsets -- commit 6f304adf33d568f2ad16eea15056eaded001170a Author: Julius Bairaktaris net: keep the TCP fixed-ID flags on the header they describe This commit makes SKB_GSO_TCP_FIXEDID describe the innermost IPv4 header again, replaces SKB_GSO_TCP_FIXEDID_INNER with SKB_GSO_TCP_FIXEDID_OUTER for the outermost header of an encapsulated packet, and updates tunnel and XFRM encapsulation/decapsulation paths accordingly. > diff --git a/net/xfrm/xfrm_output.c b/net/xfrm/xfrm_output.c > index f1f612cd7b438..e5bcb845e9acb 100644 > --- a/net/xfrm/xfrm_output.c > +++ b/net/xfrm/xfrm_output.c > @@ -791,6 +791,7 @@ int xfrm_output(struct sock *sk, struct sk_buff *skb) > secpath_reset(skb); > =20 > if (xfrm_dev_offload_ok(skb, x)) { > + bool encap =3D skb->encapsulation; > struct sec_path *sp; > =20 > sp =3D secpath_set(skb); > @@ -805,10 +806,25 @@ int xfrm_output(struct sock *sk, struct sk_buff *sk= b) > xfrm_state_hold(x); > =20 > xfrm_get_inner_ipproto(skb, x); > + /* > + * Transport and BEET mode keep the IPv4 header and its ID, so > + * the header that SKB_GSO_TCP_FIXEDID describes is the outer > + * one as well. > + */ > + if (!encap && > + (x->props.mode =3D=3D XFRM_MODE_TRANSPORT || > + x->props.mode =3D=3D XFRM_MODE_BEET) && > + (skb_shinfo(skb)->gso_type & SKB_GSO_TCP_FIXEDID)) > + skb_shinfo(skb)->gso_type |=3D SKB_GSO_TCP_FIXEDID_OUTER; > skb->encapsulation =3D 1; > =20 > if (skb_is_gso(skb)) { > - if (skb->inner_protocol && x->props.mode =3D=3D XFRM_MODE_TUNNEL) > + /* > + * inner_protocol is only valid on an encapsulated skb: > + * a tunnel that decapsulated the packet leaves it set. > + */ > + if (encap && skb->inner_protocol && > + x->props.mode =3D=3D XFRM_MODE_TUNNEL) > return xfrm_output_gso(net, sk, skb); > =20 > skb_shinfo(skb)->gso_type |=3D SKB_GSO_ESP; [Severity: Medium] When !encap and a stale skb->inner_protocol remains from an earlier tunnel decapsulation, does skipping xfrm_output_gso() without clearing skb->inner_protocol cause xfrm4_tunnel_encap_add() and xfrm6_tunnel_encap_add() to skip saving the inner header offsets? net/xfrm/xfrm_output.c:xfrm4_tunnel_encap_add() { ... if (!skb->inner_protocol) { skb_set_inner_network_header(skb, skb_network_offset(skb)); skb_set_inner_transport_header(skb, skb_transport_offset(skb)); } ... } For a decapsulated SKB_GSO_FRAGLIST GRO packet (where inet_gro_complete() s= et skb->inner_protocol, while tcp4_gro_complete() returned early on is_flist without calling tcp_gro_complete() to set inner_transport_header), inner_transport_header is left unset when xfrm4_tunnel_encap_add() pushes t= he outer IP header. qdisc_pkt_len_segs_init() then sees a negative or invalid skb_inner_transport_offset(skb) on the offloaded SKB_GSO_ESP packet and dro= ps it with SKB_DROP_REASON_SKB_BAD_GSO. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/cover.1795869698.gi= t.julius@bairaktaris.de?part=3D1