Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2444956rwd; Fri, 9 Jun 2023 11:15:28 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7xPqUy4v0P3O22sRrDJXWHfkMpEjhf4z4qXZz/fbVmXuRPV2XITb8Tbk5PGoM5KCDZFlHv X-Received: by 2002:a05:6e02:5c5:b0:33b:edab:e701 with SMTP id l5-20020a056e0205c500b0033bedabe701mr2172987ils.4.1686334528400; Fri, 09 Jun 2023 11:15:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686334528; cv=none; d=google.com; s=arc-20160816; b=nAND+eEn9GjCQ+VIG0ej69OkW4Mb3l6LWGRPRdkku9DsC6QHMMVToB9IxtNTqEiUcW 4s8q5mKeDkmzbMdTky4oav/E2Ynlk8vlujgFhpqRLd/El2IZ2aqLlzlRJbWAWv64PTGC PvfZJ+VmopVzF5J9ZsZGBuAoAfewbV8k+YYd/7tLWz1pma2qPvA1nH5jHIHfCL4+vBNp A6h+JXsTSAdqx7r0GXssuckwLTfrERW519L4ZoolFtDaRTidT2vcSgjzy6hiGy7ym+hx 7EQx0n6S6tcxTVigka+YPKgj5vSBvxybu9osSqjVez0UWjAgKDBC9CPgIm7seZb+ikIt lvKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=SNb1MMHKODE+W69ko8eJiIRbDLaj/HDstcAoEpqfK+Q=; b=vwPhxuRzMMr3QK6xx1JyYSBHnvJojmWAbuIQuaiHVjCxFSC9WSXbQQPUrJTBOG6c+N FfJsmobuMM3/0uyJpdV8dgeWp73PcqN5UdKLg8BKAClXuRFSFGXvuNHSmtm+nxXnew/r DZJ7Q/4EEC1LaAzKqb2r/tS8IavBdGoIyjYz4J+Uh1cy5M2RFejeMKNH0TuAFqoAm1oq stkBhXnslhgOSQbOH4clf0Ocqeic6EGD5wTzCrqGob5xwYy7OA2djECIahDY6idAYCt1 1SSdcTBTKQRfqAUO5ndaHKLAbIsRl0bsVZMyvG4qqK8t9bQbbyeZwJrik6jysitPVeOg HduQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=dg0V5yQi; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kt5-20020a170903088500b001ae453d07a3si2982941plb.539.2023.06.09.11.15.14; Fri, 09 Jun 2023 11:15:28 -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=@gmail.com header.s=20221208 header.b=dg0V5yQi; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231299AbjFISAG (ORCPT + 99 others); Fri, 9 Jun 2023 14:00:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229464AbjFISAE (ORCPT ); Fri, 9 Jun 2023 14:00:04 -0400 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36A3DD8; Fri, 9 Jun 2023 11:00:02 -0700 (PDT) Received: by mail-pj1-x102a.google.com with SMTP id 98e67ed59e1d1-256c8bed212so746635a91.3; Fri, 09 Jun 2023 11:00:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686333601; x=1688925601; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=SNb1MMHKODE+W69ko8eJiIRbDLaj/HDstcAoEpqfK+Q=; b=dg0V5yQi2bkckFqDvdwYht29KbuZk08RXcEsyF2X3Ha58HuE6aUhmdK6vxDq5PmFHl aDA4tDHvPzey4FIRZ/12YgWXj/flmLIt/t2++bNafoKmxtK+jcd7l60AQR+wsACNlBB4 ZywHGyd3VN2XVQHnp/mR1rdyU0JdhH87vZX3FuzhHWkRsMJtezV6nk7SurWCAEMJ6OGa DONYUebJM8W/NcSsZPG9ptDaSv6aykWe8wG0B1YHcVOb3wsXLoDAAwylJb5+PJVUDfhV OiflbFSY50YSygvNqe5eRbK2VWsQS9LrD1WzPnDXQjPWIEVXoAocXScOKhsb0z52oXNc bgzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686333601; x=1688925601; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SNb1MMHKODE+W69ko8eJiIRbDLaj/HDstcAoEpqfK+Q=; b=c/Px3VNJqnqNz1dmqgjynRytpnWsBJCatnO/kr+x3F/o/g4xSccA9JLTOfY/vni0se cdDq3wpHarHQZa854bnreqJSQFHybygd8BrEqqsFuA3U7YBNr1JGx4z3erPWGeu2nGPD q5iB+0zUJCJFRXv5hA14PxT1xgDN7RIz64POM3P1Mo1mKULQMZT3iJOZVD33vK/loCb2 uI6BG78HXRo6e/6fvq8C2EfGLzP3iDknw+eZB3lUoHHDv+jXMb6s/4kSNvW7vslNmmU4 V30blwobub1wpoy8v+1ZcSlQePhsMydfXSSckuhq3Rp+5Omor/9p49ZeXIL/5XLFhV4u 1eig== X-Gm-Message-State: AC+VfDxNQZx5Y4cgEBHLr2wDhLlIc3d4PBn5L9hMPNmo/NGswr5XDdqA raKPfn6gEIbJV4WUhSgPzs6hTSxFYIkjW+xsH6Xigkbk X-Received: by 2002:a17:90a:6309:b0:259:5494:db4a with SMTP id e9-20020a17090a630900b002595494db4amr1460435pjj.30.1686333601370; Fri, 09 Jun 2023 11:00:01 -0700 (PDT) MIME-Version: 1.0 References: <20230601112839.13799-1-dinghui@sangfor.com.cn> <135a45b2c388fbaf9db4620cb01b95230709b9ac.camel@gmail.com> <6110cf9f-c10e-4b9b-934d-8d202b7f5794@lunn.ch> <6e28cea9-d615-449d-9c68-aa155efc8444@lunn.ch> <44905acd-3ac4-cfe5-5e91-d182c1959407@sangfor.com.cn> <20230602225519.66c2c987@kernel.org> <5f0f2bab-ae36-8b13-2c6d-c69c6ff4a43f@sangfor.com.cn> <20230604104718.4bf45faf@kernel.org> <20230605113915.4258af7f@kernel.org> <034f5393-e519-1e8d-af76-ae29677a1bf5@sangfor.com.cn> <9c1fecc1-7d17-c039-6bfa-c63be6fcf013@sangfor.com.cn> <20230609101301.39fcb12b@kernel.org> In-Reply-To: <20230609101301.39fcb12b@kernel.org> From: Alexander Duyck Date: Fri, 9 Jun 2023 10:59:25 -0700 Message-ID: Subject: Re: [PATCH net-next] net: ethtool: Fix out-of-bounds copy to user To: Jakub Kicinski Cc: Ding Hui , Andrew Lunn , davem@davemloft.net, edumazet@google.com, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, pengdonglin@sangfor.com.cn, huangcun@sangfor.com.cn Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 Fri, Jun 9, 2023 at 10:13=E2=80=AFAM Jakub Kicinski wr= ote: > > On Fri, 9 Jun 2023 23:25:34 +0800 Ding Hui wrote: > > drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c: .get_sset_count = =3D nfp_net_get_sset_count, > > drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c: .get_sset_count = =3D nfp_port_get_sset_count, > > Not sure if your research is accurate, NFP does not change the number > of stats. The number depends on the device and the FW loaded, but those > are constant during a lifetime of a netdevice. Yeah, the value doesn't need to be a constant, it just need to be constant. So for example in the ixgbe driver I believe we were using the upper limits on the Tx and Rx queues which last I recall are stored in the netdev itself.