From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BC63DC433ED for ; Thu, 22 Apr 2021 00:57:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 970B360FE5 for ; Thu, 22 Apr 2021 00:57:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343963AbhDVA5h (ORCPT ); Wed, 21 Apr 2021 20:57:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244335AbhDVA5c (ORCPT ); Wed, 21 Apr 2021 20:57:32 -0400 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0E0DC06138A for ; Wed, 21 Apr 2021 17:56:57 -0700 (PDT) Received: by mail-wm1-x32f.google.com with SMTP id o21-20020a1c4d150000b029012e52898006so2184662wmh.0 for ; Wed, 21 Apr 2021 17:56:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philpotter-co-uk.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=RMcxAc3bT3n/yl2vxPyU4HWbgYtisPNEV2uY9DSNfAs=; b=uwkenkncbsJESIBHS9mPWpBwvyg3x0Y2ZRUiFqWbb4Hwp3JBZIigH0fMlYr0aJGpOx O6lNQ7ye9ZSMQbHaiM8Jb3G9WDUd8T38/c4FXBbjrunpJFRtkqM7RgFHrXPLFpusu3CN Q23bp1SSV0UfrTI3zwfZD06d2o1ZPY3uYvA/+0xgXUMeUdHk/gNiAb6RpEexxRgsweiX GpdjFcxSFdEEPvr8sQj3ZwAcLj0u0Zb7hygS0LdtCqZm/gEH8ZuDZOVfpAC3cvgDBpyi a2tg4yw7L/4qq6YqeETTcEbir7zUc63pfYx1CxeND0bN1QaS5meNiL28mbAriAH95ecZ f+KQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=RMcxAc3bT3n/yl2vxPyU4HWbgYtisPNEV2uY9DSNfAs=; b=ZYNL7A3/yD1T9SE87Qelab7rgtk5aT4cBzzG8cTlhMgFoR5O+aXT1wISOg2eMhkDT3 g5o05u3S1qFBnxfO34Eg8H0w2Ip2bbFImlZr45juq/XUnRRItatuTAGBOq8WYKE31riF BIewgUZrLxfQZ7uKgWR+v4ebpaiAGgFAUutVQDzP5GW0jUoankN4S/h3JrnrfmK9uslh D8f/atGlCv8cr1suIaPPoRIjo2FBqjF/tYz6tbkNPikuHX6halryQJxompXCDJ/bVete n6p8oc1ycGcBk5JASuOk5msrnSDNF1D1lOt94zqw7ukTmJx6UoQdqpz3sOkJ2fqlSEoo XCAg== X-Gm-Message-State: AOAM532Mjo47hdj676ygKLbvz1gVbgwBoJj+XNVKFOCPRkC7kSk3DMFY is9JbIRJsYY231BoxCMwO9s2rQ== X-Google-Smtp-Source: ABdhPJwa2X16yYGlY7mpYZUMIE4Q1frqLxkxXFcI4ayr7tXXg3G5lZFma6Cj87jRvVWBIKuiZRV3wA== X-Received: by 2002:a1c:e006:: with SMTP id x6mr12666139wmg.40.1619053016353; Wed, 21 Apr 2021 17:56:56 -0700 (PDT) Received: from equinox (2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.a.1.e.e.d.f.d.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:dfde:e1a0::2]) by smtp.gmail.com with ESMTPSA id v4sm1179807wrf.36.2021.04.21.17.56.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Apr 2021 17:56:55 -0700 (PDT) Date: Thu, 22 Apr 2021 01:56:54 +0100 From: Phillip Potter To: Florian Westphal Cc: davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, edumazet@google.com Subject: Re: [PATCH] net: geneve: modify IP header check in geneve6_xmit_skb Message-ID: References: <20210421231100.7467-1-phil@philpotter.co.uk> <20210422003942.GF4841@breakpoint.cc> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210422003942.GF4841@breakpoint.cc> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 22, 2021 at 02:39:42AM +0200, Florian Westphal wrote: > Phillip Potter wrote: > > Modify the check in geneve6_xmit_skb to use the size of a struct iphdr > > rather than struct ipv6hdr. This fixes two kernel selftest failures > > introduced by commit 6628ddfec758 > > ("net: geneve: check skb is large enough for IPv4/IPv6 header"), without > > diminishing the fix provided by that commit. > > What errors? > > > Reported-by: kernel test robot > > Signed-off-by: Phillip Potter > > --- > > drivers/net/geneve.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c > > index 42f31c681846..a57a5e6f614f 100644 > > --- a/drivers/net/geneve.c > > +++ b/drivers/net/geneve.c > > @@ -988,7 +988,7 @@ static int geneve6_xmit_skb(struct sk_buff *skb, struct net_device *dev, > > __be16 sport; > > int err; > > > > - if (!pskb_network_may_pull(skb, sizeof(struct ipv6hdr))) > > + if (!pskb_network_may_pull(skb, sizeof(struct iphdr))) > > return -EINVAL; > > Seems this is papering over some bug, this change makes no sense to > me. Can you please explain this? Dear Florian, I made the change to fix failures in the following tests: IPv4 over geneve6: PMTU exceptions IPv4 over geneve6: PMTU exceptions - nexthop objects Error for both tests was: PMTU exception wasn't created after exceeding link layer MTU on geneve interface I was notified by the kernel test reobot due to the failures being caused by my previous patch to this file. Sorry if I've done this the wrong way, just didn't want to hold anyone up. I also tested the patch with syzbot again to make sure it still fixed the original problem from my last commit. Regards, Phil