Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp337760rwn; Wed, 7 Sep 2022 17:55:18 -0700 (PDT) X-Google-Smtp-Source: AA6agR4zY5q+wmRsEReEysXWBYXrao7HUdaOQ3vRDhU6L5Yb0JjLGNL7k+p4SbIPmTtHz054AeKb X-Received: by 2002:a05:6402:e96:b0:443:a086:e3e8 with SMTP id h22-20020a0564020e9600b00443a086e3e8mr5279978eda.330.1662598518446; Wed, 07 Sep 2022 17:55:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662598518; cv=none; d=google.com; s=arc-20160816; b=i6M9hymK+y6PynR7yL/PnENANqjkpkpKsIR8u3FA+YfvRBMzDaVl2Ii2HIl4hXVHUD oyz/8sWafVQ7FwISVT/AAoUuYf9BCQ1FzSZh8JkisSTrfZxDqabMHar35RvxgMoTFXrC o3zQKEVuiMv9BNyCn/zZk2opxaMBjAs+tUdipWb2hkG38hbdLk4UWcEmg7qqeNWlh0BV Sp4T+hTAEHClXCj8YgoYBwTLdI7ZGL5E6i/EtVAHqBIPFxMEHyRAt864UD1li6j4LpfR pTj7fYjhAdC2I1kVKplZXetQmO0kegvmuxQEQ5+v4OnU8r6+WqRBzV3xW9Ycg56kvEc6 k0KA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=Ynd4eT556fqTIJVnSbjMROyWIXe/ybhO1GEY+Kv8lv0=; b=dLt8vM0FcZ7eTuFFhDMZiSFKJE+nN/PC1pb7w+OV2DBLZXOu9+zjIFbYFcEIWA2j4+ 4Esl9mZaonRs6HHWOw0doUMcPXSIm2Z1pHKzxFga/7fJAHTxXLdzjE7swPJZjkZGU6bT 5pqXLtMzNraKSSho+qUw9yoGRijtfgaSMg9TyQmo96gifVa8NLfylaNDQowinVGCPmCf B9w6w9tE9owoN00uFsvW46yiWAQWQstW5sYjMLA8iE5JzXwxFFAcbR9CXkzVzd1cLIDK Z4V2MPUaHxotmhwaz8nWzBOp63pbAj5LrXfgYyTGGFQMoFsXS/CFPRLoegmPMfZfWm0y A0yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mBW8jT9k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l18-20020a056402255200b004483d18b119si15363131edb.433.2022.09.07.17.54.53; Wed, 07 Sep 2022 17:55:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mBW8jT9k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229911AbiIHAlC (ORCPT + 99 others); Wed, 7 Sep 2022 20:41:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229713AbiIHAlA (ORCPT ); Wed, 7 Sep 2022 20:41:00 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1CD10A287A; Wed, 7 Sep 2022 17:40:59 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id AE209610A6; Thu, 8 Sep 2022 00:40:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 96374C433D6; Thu, 8 Sep 2022 00:40:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662597658; bh=8nHfraft5uM1bANg22z1Icv/Joe/Mli5tnGpmBVUDJY=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=mBW8jT9kUvPR7q2CxAOB5JSvOvMoe8c4841tg/x9OVDXB1oMel0U0/RwIc7Q9nBv1 JJlm5M+gmtogRJZ65jXldSDew3JD0t5rhNggAs6MxgZw7ox4zdH+RF+DKu7mtA2a6U o9kj7P9mpyHStnGzm6kPpdaPLWPAcgZ6NT3SwlpuywtlXAD1vc5/JDhsxXa/l4XA7S kvM6fE5WXebAHsjQnMv3I7jhc/ffE6z0bGYC7j3by6wFXwPqXxnYDkilG9xUBByGXk SEjSN3Ebi0cuSuhAFzKN6L3QElweQhsGtP6rLlFiVpG1L/mIrIJ7bEOi12dHbxktSC wx9moGxacVBIg== Message-ID: Date: Wed, 7 Sep 2022 18:40:56 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Subject: Re: [PATCH v3 1/6] udp: allow header check for dodgy GSO_UDP_L4 packets. Content-Language: en-US To: Andrew Melnychenko , edumazet@google.com, netdev@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, davem@davemloft.net, kuba@kernel.org, jasowang@redhat.com, mst@redhat.com, pabeni@redhat.com, yoshfuji@linux-ipv6.org Cc: yan@daynix.com, yuri.benditovich@daynix.com References: <20220907125048.396126-1-andrew@daynix.com> <20220907125048.396126-2-andrew@daynix.com> From: David Ahern In-Reply-To: <20220907125048.396126-2-andrew@daynix.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/7/22 6:50 AM, Andrew Melnychenko wrote: > diff --git a/net/ipv4/udp_offload.c b/net/ipv4/udp_offload.c > index 6d1a4bec2614..8e002419b4d5 100644 > --- a/net/ipv4/udp_offload.c > +++ b/net/ipv4/udp_offload.c > @@ -387,7 +387,7 @@ static struct sk_buff *udp4_ufo_fragment(struct sk_buff *skb, > if (!pskb_may_pull(skb, sizeof(struct udphdr))) > goto out; > > - if (skb_shinfo(skb)->gso_type & SKB_GSO_UDP_L4) > + if (skb_shinfo(skb)->gso_type & SKB_GSO_UDP_L4 && !skb_gso_ok(skb, features | NETIF_F_GSO_ROBUST)) that line needs to be wrapped. > return __udp_gso_segment(skb, features, false); > > mss = skb_shinfo(skb)->gso_size;