🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #10351

[PATCH net v3 0/2] net: gro: fix frag0 and remcsum handling

#10351
From: Eric Dumazet
Date: Tue, 03 Nov 2026 10:57
46 lines
9345 bytes
Two GRO fixes for paths using remote checksum offload (VXLAN, GUE)
and for NAPI_GRO_CB(skb)->frag0 after a pull.

Patch 1 skips skb_gro_remcsum_cleanup() once the skb was merged,
as grc->offset can no longer be trusted, except for fraglist members,
whose inner checksum is restored.

Patch 2 invalidates frag0 before a pull, which commit bd56a29c7a4e
("net: gro: change skb_gro_network_header()") stopped doing.

v3:
- Patch 1: restore the inner checksum of fraglist members instead of
  keeping the adjusted value, which was wrong for forwarded packets
  and for GUE. Only restore it when it is part of the headers
  pulled by skb_gro_receive_list(), as start and offset come from the
  packet. Mention FOU_F_REMCSUM_NOPARTIAL (Sashiko).
- Patch 2: only use frag0 in gro_try_pull_from_frag0() while frag0_len
  is not zero, to not corrupt headers after a failed pull (Sashiko).
- Explain how the issues were found (netdev bot).

v2: https://lore.kernel.org/netdev/20261030125955.3107383-1-edumazet@kernel.org/
- Patch 1: reword the comment and changelog: skb->data is not always
  moved (frag/head steal).
- Patch 2: invalidate frag0 before the pull, as __pskb_pull_tail()
  can fail after pskb_expand_head() freed the old head (Sashiko).
- Patch 2: add a Fixes: tag for UDP fraglist GRO, which pulls
  directly since before bd56a29c7a4e (Sashiko).
- CC Tom Herbert and stable.

v1: https://lore.kernel.org/netdev/20261028141325.2103814-1-edumazet@kernel.org/


Eric Dumazet (2):
  net: gro: do not undo remote checksum offload on merged packets
  net: gro: invalidate frag0 after a pull

 include/net/gro.h       | 27 +++++++++++++++++++++++++++
 net/core/gro.c          |  9 ++++++++-
 net/ipv4/esp4_offload.c |  1 +
 net/ipv4/udp_offload.c  |  1 +
 net/ipv6/esp6_offload.c |  1 +
 5 files changed, 38 insertions(+), 1 deletion(-)

-- 
2.53.0
Technical Details
Message-ID: <20261103105752.49542-1-edumazet@kernel.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-355491-linux-kernel-netdev=dewy.ru

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-355491-linux-kernel-netdev=dewy.ru
From: edumazet@kernel.org (Eric Dumazet)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net v3 0/2] net: gro: fix frag0 and remcsum handling
Date: Tue,  3 Nov 2026 11:57:50 +0100
Organization: Usenet Network
Message-ID: <20261103105752.49542-1-edumazet@kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="3168269"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:98JTA3zuM0KeL0PmpN3RL77U0sc= sha256:PrXTuPQczG/QgK+yWiaib4uY3rVswlcNebiTfF9Rsv8=
	sha1:PHTElfyLg2LwotCewM5PMnrh8ic= sha256:ePhPQ9HbeL+ugHNib29dKzcLvV6lOMR04f7B4PpTnKM=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 635EE112888; Tue,  3 Nov 2026 15:53:41 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.401
X-Spam-Status: No, score=-3.401 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=kernel.org
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id 1AwGb6HtpW8p;
	Tue,  3 Nov 2026 15:53:37 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-355491-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 533A4112881; Tue,  3 Nov 2026 15:53:28 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id 9362CE5889; Tue,  3 Nov 2026 11:06:16 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1793703484;
	b=Jliw/q0bPrRoLUwvnWYg+NPavZ5SAJ2n4t6lC+TcMtggZ/dJkcUSwHiBFN/GSgUwR9sy
	 pB0E1Yg7o8TRSSDyXXP9j79yj2CIcgSkH3KQxHq4w8NuUj6oOVBaK+7p+wa+zkdM8mPHU
	 vKElRBG/+gbE5+224060w+3jNdBO4IqrJazB9pa7y1vk9B9O4TVH77hPoeH+LmCAq+f1P
	 yL79gqDyWd1lqSVjmgxjeLhDnXMONzUJ7Ls+XQR2V5WxpS+sVXvZJ/nJ7b4lskLUhf4F9
	 jb9/MypXbWxNfkonf38JW6NIyBGZB/1YN8ooNc8/yZ7xHTzZlYduJUHGO4eEMX2K9Fw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793703484;
	h=X-Original-To:Received:Received:DKIM-Signature:From:To:Cc:Subject:
	 Date:Message-ID:X-Mailer:X-Mailing-List:List-Id:List-Post:List-Help:
	 List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version:
	 Content-Transfer-Encoding;
	bh=ktfr6TtXjrppBhI0etKRTkR3kgLgwWr61FrkywuETvQ=;
	b=cbswyupGhPsaj9V34QKbk63JuuwVFGGjRrB4ldRzlfua6PIT1okuiyRXBHhWn27xlOVZ
	 eSGrBIx3PrgYtERmNgXfgMGyt7RKvVYJOcP6C5nTGM/f2XF+EbYxFObp/QAj5mJ84Bwz+
	 uit1c6P9KhBUcAzIWhYL62QaChhSyipcpbftiu802zIwPVXCaDqLq+SsIek19OMvFPdr6
	 Pm6apurnYLVp0iDZSnyz/blziRlxngmYjCxRqHkc4iRzlJ9NCQKBI76nQ6p47liKcxj7M
	 5C4ZUGAxg9I3EQHE9IzIDd13v5vIlJgDfk0sgtGtBKxi42XHLcxXjG3zoeYLi1UAjOw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=LUZtmLoj;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 5B436606F7FE;
	Tue,  3 Nov 2026 10:58:04 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=LUZtmLoj
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1793703483;
	b=U+FL1dRVRra4C2YwquezV3oEr1/xjdBXjvvFy/O4cMpjzwBoSum2GiS0+3Dbtc9+gTY+
	 KBdJGxqOUg5134KJpCoB0/n1mL9NTrrLqsgdZeQ9Pok3ICslPxJvdDpgBB8o3C6wvXVIp
	 741/NG5TlpZEy9qQjrQO/mh8CJV0gaL7nO0C55mtHR2wNRRWoTW5gET6uG8NGuSrqjDTt
	 8zeWnSPpQ61ashkngibMsQlPfjVwhD+So/vzkEyzMH7DtKBYyznks5zwP5t1GDt/7HNm9
	 3RlrYuDwTaAlrFdL5c1w2rTbzDVAOealYIndiQgIEwosB8RtFo+fqucKBmvy3FpKoCA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793703483;
	h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer:
	 MIME-Version:Content-Transfer-Encoding;
	bh=ktfr6TtXjrppBhI0etKRTkR3kgLgwWr61FrkywuETvQ=;
	b=5o8EWf5E4iTk/xdLjoA1idmfCje3MsWvnb69DoPFM1mqUrsLkS6VI/5likz4lF+QEguS
	 5iHVqaEhj5bfUIIKh2M2FMbMq1SiLFoUqsvEbhWtjfiHGTCl2Gi5enofWGlOOurXe7jFi
	 7l4LVVnb7Unskck30nypmb2BFjSTHWt7lr/O/bmIcIyiRRXY99PVmv8kLn2EhmQwQ2jHQ
	 Z/km+oCBPvzKYs8uQbgONKSxJUO3NKoqvi2cGDmCDOaorAw3Sl6trGC/HDEKk5if2Wd3X
	 rmFKudpT72yUHeXzz7uLIgfw26hYX/9JBCN3tUTd6/Yh/GWoWkM+SuG65fqDsQ3qtpg==
X-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=LUZtmLoj;
	arc=none smtp.remote-ip=100.103.45.18
X-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 3CCB6606C5B6
	for <netdev@vger.kernel.org>; Tue,  3 Nov 2026 10:58:02 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 331EE1F00919;
	Tue,  3 Nov 2026 10:58:00 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1793703482;
	bh=ktfr6TtXjrppBhI0etKRTkR3kgLgwWr61FrkywuETvQ=;
	h=From:To:Cc:Subject:Date;
	b=LUZtmLojHRgppM2Dma6+UABig1CCezxtjGZpzUOHcapJIqWkl/QwAqfQHDY85yRPS
	 lk4g2bSG4q+Wf/3WB0hSluXXuvC6EhPu8XdVBopP8uCxfS7TnC4A+rfphUjXKXZbc2
	 nViqyX8XWBb2da2291uLsKzjWhwfhOJCdzwcmbXGbTkblH3u6biBS3B42eLezYKAoF
	 R3rLHi7O99YYVc2e0iSNhi0i3EdZU75DdcrJLxLC70WxmWjTAyceuR5MZbhUZsC1bR
	 AanGzaBX0LddZe1C13xgmXL2vX1jnkNfvBLpUtH9IJGqgNXEM7MOtsXy+zjVOx1n8L
	 o6HG8b/bRfYPA==
X-Cc: horms@kernel.org,
	netdev@vger.kernel.org,
	willemb@google.com,
	steffen.klassert@secunet.com,
	tom@herbertland.com,
	cenzhang@linux.microsoft.com,
	AutonomousCodeSecurity@microsoft.com,
	Eric Dumazet <edumazet@kernel.org>
X-Mailer: git-send-email 2.53.0
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list