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=-1.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED 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 8AC3FC282C3 for ; Tue, 22 Jan 2019 17:03:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 50A02217D4 for ; Tue, 22 Jan 2019 17:03:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="HuSGswIk" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729468AbfAVRDF (ORCPT ); Tue, 22 Jan 2019 12:03:05 -0500 Received: from mail-yb1-f182.google.com ([209.85.219.182]:42766 "EHLO mail-yb1-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729282AbfAVRDE (ORCPT ); Tue, 22 Jan 2019 12:03:04 -0500 Received: by mail-yb1-f182.google.com with SMTP id q145so8834089ybq.9 for ; Tue, 22 Jan 2019 09:03:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=SoRbnYLVqLJuQrXJzrA+TiF6+C0wUTzkKp1jDUR5NWY=; b=HuSGswIkiJBly/3RtTjxtLU64fY4+DSfm1PMW6ul4aOmY6qaKmR7PKe4+vnu3ijGST zN0AFz0QyS+Qb7u6nshSDo6Mh2WYk9ArioGSfnEbS4iPqmFWBffMBjnjx4z7wW4/v0Vx Oo5tgPbuzaVuS9jm658DwCYW5BHscLdcxJl1YbBHZADOSetL3UmrhFymirEXrd3Wa2Nd 9UU35e1pu04cxDqqe7n64RPMV5x5pXaMLVdzq96sMlmDAk3/ehAPHPiGXA5MudMKAX61 HZI4SryKOIb7ca5eZ3icvcE3sHdZKylP0+7gV5OcsPXrOcawzwOhZsZYxjjOFxckpAj9 MpOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=SoRbnYLVqLJuQrXJzrA+TiF6+C0wUTzkKp1jDUR5NWY=; b=YkShYLV+RY38eq+dgWBJ7lolv+FRm3GqzNPelwtITRa/Kyzu7nOFnOtzOTiDygr2jl eXaoXaE7bKc6xY6TLVe4h6ANCm5N1jWOXGfTE4rn2SyOppE4fBnapiZtIsVWW8WMRSSY iQgprUEczzPO980ZL+G6qFchAkfY02bZxUw/+nR48OFKWoHiut5jhWvsZekcuV5Xecay IubT/wJkf+LZVXBRHzz++zrWs40kSSsOW3e+/nNAoInV+2SbX9HuICbQeRy+/BDBMEZV Dw/iTBxxijTa00BY58AECvs/9QkrBTgODEVFvhvrMlsvwH+WrZI9xmG7FTj60mE1wYVm S27w== X-Gm-Message-State: AJcUukdXXtMgTSGwra42DvLBDHWVJI8gmnri2ElpwoDLSQ6qCfLIy7Ab zHCzvNZ2Mz3bttnKzH5uixtTFC72 X-Google-Smtp-Source: ALg8bN6xyxYd9dPUjmroJ3oZZ2May5TUJ3njJ54wDq8CDxhvl060okHIU6fCiXhCwcKagePx+03zRA== X-Received: by 2002:a25:8b0e:: with SMTP id i14mr21426340ybl.312.1548176582825; Tue, 22 Jan 2019 09:03:02 -0800 (PST) Received: from mail-yb1-f179.google.com (mail-yb1-f179.google.com. [209.85.219.179]) by smtp.gmail.com with ESMTPSA id x203sm8642935ywd.41.2019.01.22.09.03.01 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Jan 2019 09:03:01 -0800 (PST) Received: by mail-yb1-f179.google.com with SMTP id a190so8850751ybg.3 for ; Tue, 22 Jan 2019 09:03:01 -0800 (PST) X-Received: by 2002:a25:9c46:: with SMTP id x6mr6437101ybo.444.1548176580732; Tue, 22 Jan 2019 09:03:00 -0800 (PST) MIME-Version: 1.0 References: <1548174286.3229.299.camel@codethink.co.uk> In-Reply-To: <1548174286.3229.299.camel@codethink.co.uk> From: Willem de Bruijn Date: Tue, 22 Jan 2019 12:02:24 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: GSO where gso_size is too big for hardware To: Ben Hutchings Cc: "David S. Miller" , netdev , Daniel Axtens , Eric Dumazet , Mahesh Bandewar , michael.chan@broadcom.com Content-Type: text/plain; charset="UTF-8" Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, Jan 22, 2019 at 11:24 AM Ben Hutchings wrote: > > Last year you applied these fixes for a potential denial-of-service in > the bnx2x driver: > > commit 2b16f048729bf35e6c28a40cbfad07239f9dcd90 > Author: Daniel Axtens > Date: Wed Jan 31 14:15:33 2018 +1100 > > net: create skb_gso_validate_mac_len() > > commit 8914a595110a6eca69a5e275b323f5d09e18f4f9 > Author: Daniel Axtens > Date: Wed Jan 31 14:15:34 2018 +1100 > > bnx2x: disable GSO where gso_size is too big for hardware > > However I don't understand why the check is done only in the bnx2x > driver. Shouldn't the networking core ensure that gso_size + L3/L4 > headers is <= the device MTU? If not, is every driver that does TSO > expected to check this? > > Also, should these fixes go to stable? I'm not sure whether you're > still handling stable patches for any of the unfixed versions (< 4.16) > now. > > Ben. Irrespective of the GSO issue, this sounds relevant to this other thread Stack sends oversize UDP packet to the driver https://www.mail-archive.com/netdev@vger.kernel.org/msg279006.html which discusses a specific cause of larger than MTU packets and its effect on the bnxt. Perhaps these patches were initially applied to the bnx2x driver only, because at the time that was the only nic known to lock up on such packets? Either way, a device independent validation is indeed probably preferable (independent of fixing that lo flapping root cause).