[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH net-next v3 04/15] net: skbuff: fail segmentation when a segment can't be checksummed


  • To: Josef Bacik <josef@xxxxxxxxxxxxxx>
  • From: Mina Almasry <almasrymina@xxxxxxxxxx>
  • Date: Mon, 2 Nov 2026 18:36:59 -0800
  • Arc-authentication-results: i=1; mx.google.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=fqTX7BP0mkUbiNPaPzqmPJM6ISWnYd5yW6X5U8Sw0eo=; fh=oEDfn6R5kx8c9P4yhJ6ogrKFv+4IUDwyQ+1pWLnW2ww=; b=U/+6u0K2ySW+xalSrFRzywTvXpfM+VXYGo6OyRh/W1Pq7GMtApShIjXzTQfmunc5/R 2f49z0EmxuF1F0QpsJl3943JDuLH4bgSP4CDWFrgvKQ+k5n6L0u90dm7A7/d/QGcSFWa MbMrDTbmmxqvkSR1oOAr/1wVJ23y+Ba2goSbA6/MrKQLSFpIy02/cK2zOzTqIIB9z8BV Q+22TaeZI+c0vVngZmtv2by9ysrtIyMt3JNAfqnGM7XMdBU7VxOElstDlNTP+lVMxwXa lspYaUj0D34W5aEEofEwzD7Wi+0dF+z6+aoVhid/JII9g/GfQKOq89ptkS5Ta10xwpWb ZQQg==; darn=lists.xenproject.org
  • Arc-seal: i=1; a=rsa-sha256; t=1793673431; cv=none; d=google.com; s=arc-20260327; b=i8tsGGlHCax8y+1kSxzZI2ZB/RaScZBExzf0y+ueaCVl8MK/OV1fjKIePjOvVB/bvt hb7htmK9CdRcS1dq15IyxGX+CsmtTYaNwZvPLPQtXya+eXUVMXAefJqZz7b635YHthps cJHrmou8Y2afP+vOgET8YGvn7rWbiH7W++v6CuBx7Mirvdq4XZjrfwWZeln1ehA1dPIF XrEpmrG91/PqjH0k1GouspaodHbo1MAGiupulBzpuTFqO/dt03HLYCXk/T6cTHDqBPDW 7K9KrsdSl6X7R/mhz8ySoPgLYCPb56goPs3CHIhaHsJ6DRnz91zBLtN/KnO5M6cLZk4v vfqQ==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=20260707 header.d=google.com header.i="@google.com" header.h="Content-Transfer-Encoding:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To:References:MIME-Version"
  • Cc: "David S. Miller" <davem@xxxxxxxxxxxxx>, Eric Dumazet <edumazet@xxxxxxxxxx>, Jakub Kicinski <kuba@xxxxxxxxxx>, Paolo Abeni <pabeni@xxxxxxxxxx>, Simon Horman <horms@xxxxxxxxxx>, Andrew Lunn <andrew+netdev@xxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Willem de Bruijn <willemdebruijn.kernel@xxxxxxxxx>, Fernando Fernandez Mancera <fmancera@xxxxxxx>, David Laight <david.laight.linux@xxxxxxxxx>, netdev@xxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Tue, 03 Nov 2026 02:37:17 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Mon, Nov 2, 2026 at 6:28 PM Josef Bacik <josef@xxxxxxxxxxxxxx> wrote:
>
> When the device can't checksum the protocol, skb_segment() checksums
> each segment with skb_checksum().  If the segment has unreadable frags,
> or its lengths don't add up, skb_checksum() returns 0 and the segment
> goes out with a checksum that doesn't cover its payload.
>
> Devmem TCP doesn't get that far today.  Its skbs take SKBFL_SHARED_FRAG
> from the zerocopy uarg, so skb_segment() tries to linearize the segment
> first, and that fails with -ENOMEM for unreadable frags.  No other path
> is known to bring an unreadable segment here either.
>
> Use skb_checksum_full() and fail the segmentation with -EFAULT, so that
> the checksum doesn't depend on that flag.
>
> Found by the Sashiko AI review of an earlier fix for the same path with
> SG off.
>
> Link: 
> https://lore.kernel.org/all/20261009-b4-skb-segment-nosg-unreadable-v1-1-7e2334a55fe8@xxxxxxxxxxxxxx/
> Reviewed-by: Fernando Fernandez Mancera <fmancera@xxxxxxx>

Acked-by: Mina Almasry <almasrymina@xxxxxxxxxx>

-- 
Thanks,
Mina



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.