Received: from fout-b6-smtp.messagingengine.com (fout-b6-smtp.messagingengine.com [202.12.124.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 407334CA279 for ; Tue, 9 Jun 2026 17:41:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.149 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781026921; cv=none; b=qIPGFp504IVIb9rfZV7r5aBL5pZcoS56NEYatIu24Dw6s7Tp5sR2Tv61FSXjdu8rHhv09Is1No2uh0SvTGJ7wqtay9J49OEl1MDTCp4evgnRubwF8MAFsoMjWlPnJ0e0v/RekY92OOHYDcZqUQU+DGb734R3JFLHcUFtc6Y6uEo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781026921; c=relaxed/simple; bh=e4Q1isazpz99HOU3E+1/24R3he1NKFv9e3nObgeFtuo=; h=MIME-Version:Date:From:To:Cc:Message-Id:In-Reply-To:References: Subject:Content-Type; b=GNGLv3aq7ih+E8UHMhirVIXSbteXgj20UD//bYFEIdd5A4XLT0mGChplKzUGtm0zGq0U+tTAHF8WyUoE2GClXPvz4HR56cJbP27N26cV/A1QvYwOuzOz07hmViiimvyVtMQBSeZ0/0YH4O0q8OZ7HQm2r/HZbcZk+KYuJ1Q4Gwg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=fastmail.im; spf=pass smtp.mailfrom=fastmail.im; dkim=pass (2048-bit key) header.d=fastmail.im header.i=@fastmail.im header.b=Ma2gjjBX; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=iy/lRKc4; arc=none smtp.client-ip=202.12.124.149 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=fastmail.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fastmail.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=fastmail.im header.i=@fastmail.im header.b="Ma2gjjBX"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="iy/lRKc4" Received: from phl-compute-10.internal (phl-compute-10.internal [10.202.2.50]) by mailfout.stl.internal (Postfix) with ESMTP id D41FB1D0010E; Tue, 9 Jun 2026 13:41:57 -0400 (EDT) Received: from phl-imap-03 ([10.202.2.93]) by phl-compute-10.internal (MEProxy); Tue, 09 Jun 2026 13:41:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.im; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1781026917; x=1781113317; bh=Ccwb45dhYsfmemFEqxMkVcZvHm4fm6w18SMr8fzGWfA=; b= Ma2gjjBXEquT6+WCaJvnoA1Clj7PjfA4Jzh4Y1hXoxNAbvLFGYrhcrA/ANmoofgC wQhPFMKOk79V4Qu4bDGh6X+Or2RnjsB4lmd0suciLocjW9lPZieyNEWZgMknKWXN cidxNATclxcwWSkD7AnW7EI4ZixYVokEu9ThLLn/KLYQwzSK1Y4+b8pFTeBtzg4o 2SKC3T93P6BK4f7hKnN262GTORj3CEWrIq5Mnqs3e5dkQ9zeJrrmEI3NV5l356uo AHczS3CX9SaY+WXJemwV2y6zjFTC2MbIa5ghoEK+BvqrPZiuJaruS/DINc94PE7a Ucpf2d3hlFb7LpyOvRhRig== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1781026917; x= 1781113317; bh=Ccwb45dhYsfmemFEqxMkVcZ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rkPA97aUAD7GQ X-ME-Proxy: Feedback-ID: i559e4809:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id D28D318E006C; Tue, 9 Jun 2026 13:41:56 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Date: Tue, 09 Jun 2026 19:41:35 +0200 From: "Alice Mikityanska" To: "Paolo Abeni" , "Daniel Borkmann" , "David S. Miller" , "Eric Dumazet" , "Jakub Kicinski" , "Xin Long" , "Willem de Bruijn" , "Willem de Bruijn" , "David Ahern" , "Nikolay Aleksandrov" Cc: "Shuah Khan" , "Stanislav Fomichev" , "Andrew Lunn" , "Simon Horman" , "Florian Westphal" , netdev@vger.kernel.org, "Alice Mikityanska" Message-Id: <6bdf5092-d877-4c09-b3a2-07a92b57fd54@app.fastmail.com> In-Reply-To: References: <20260602093931.516281-1-alice.kernel@fastmail.im> <20260602093931.516281-6-alice.kernel@fastmail.im> Subject: Re: [PATCH net-next v6 05/11] udp: Support gro_ipv4_max_size > 65536 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Tue, Jun 9, 2026, at 10:32, Paolo Abeni wrote: > Hi, > > On 6/2/26 11:39 AM, Alice Mikityanska wrote: >> @@ -2605,6 +2605,9 @@ int udp_rcv(struct sk_buff *skb) >> if (ulen > skb->len) >> goto short_packet; >> =20 >> + if (!ulen) >> + ulen =3D skb->len; > > Sashiko noted the above is a bit fragile, as malformed udp skb will > unconditionally use the skb len. Malformed packets are addressed in patch 7 =E2=80=94 it closes the gap, = so that uh->len =3D 0 can't come from the wire. > What about introducing/using an additional helper alike: > > int udp_get_len(const struct sk_buff *skb, const struct udphdr *uh) > { > if (uh->len) > return htons(uh->len); > if (skb_is_gso(skb)) > return skb->len; > return 0; > } > > and use it here and in the next patch? Since UDP-Lite was removed along with the special case in udp_rcv, the helper for udp_get_len makes sense now, yes. The only two places where it's going to be used, though, are udp_rcv and udpv6_rcv. AFAIR, only these two need to read and decode len=3D0. I'm not sure about the skb_is_gso check, though. Given that malformed packets are addressed in patch 7, do we need this check? udpv6_rcv already does the following without checking for GSO: /* Check for jumbo payload */ if (ulen =3D=3D 0) ulen =3D skb->len; I don't think Linux supports jumbo UDP with HBH coming from the wire natively, does it? If it doesn't, and the above is only for BIG TCP, it should be safe to check skb_is_gso in udpv6_rcv too, but again, is it actually necessary after patch 7? Thanks! > /P