Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2379933rwd; Fri, 9 Jun 2023 10:15:59 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4IQfFM7c2+kAERSRLjVRKAv+2LXP+iUnPH7ATpybiIPnKUHOhX4o/U5lZhyvnuI+F6b4hr X-Received: by 2002:a05:6a00:1310:b0:64c:ae1c:33ac with SMTP id j16-20020a056a00131000b0064cae1c33acmr1451007pfu.25.1686330959198; Fri, 09 Jun 2023 10:15:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686330959; cv=none; d=google.com; s=arc-20160816; b=uHhlfyBUtp7cWSPMJWZxR9n5FAWAHhr7c55oJvLRYcbSvTYKl5YaPHnneIs37ioJ7w DWrH6EcQJ2DdUPulrxZFNq7TRi+EmOwn/5la9GT8B/t4M9X8rDQQHKgmrmqBB4jef7j3 lFmLUJT5OD90s7EFxnVNJJEyU14mffvIzrP7Mkqdg4qsQ1LL47BvWjsisft4O5tq8XDM 9EuPnbsaDo/0iTxjNlLOtrobA7YdWe2OI5qV3ENT1lvUmznSXYobl7sN1jemp67mLzcV T71PfZzWKhpFXsnivEcOHCumYaDSBOXCj8YjfuufQAS44W8+3aoxTzNHXO5KsrdLKdB+ lC1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=zxeMECl7YkIWybmOBN5h38pdjOnkIaXVWbnWW3rp75s=; b=rYSKTeLJTh0aLUOqu6epGDOr4ioHDBwlyEixM6YQn+FlrdT7+cFpomTNNQA30G261T 6z4lj70l/l/feJ4eODw+v1WF7pbhYzMKJbrttCL68zKAv5UapeOy+l5OogzmuIlD6nht gBxcdMsjoZZpTpFTn6s04Ma7B0Xcnv9KpMPXbsFgc/YzcVEQAC5YfUEaHKNJV2coCqJ1 CxOcvCPynlfUVx9eGDbaaHv6jOEgghDZhw+HY5mHhdkxvgRuoNvXOpaS3D2k0NlYLrP/ dLZF++w0xWAN6slvj73AE3hwn+v1NsNMofDmp44icOMBk6mfMGCXZSu6EHpeI3PvrchO OQIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="G/5uGXkL"; 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 k69-20020a638448000000b0053fb7cd1ac4si2909999pgd.519.2023.06.09.10.15.46; Fri, 09 Jun 2023 10:15:59 -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="G/5uGXkL"; 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 S229773AbjFIRNM (ORCPT + 99 others); Fri, 9 Jun 2023 13:13:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229790AbjFIRNL (ORCPT ); Fri, 9 Jun 2023 13:13:11 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CE93E4A for ; Fri, 9 Jun 2023 10:13:04 -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 A520B60E74 for ; Fri, 9 Jun 2023 17:13:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9DA13C43443; Fri, 9 Jun 2023 17:13:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686330783; bh=QorKWSlUmR8VyfEQ12IGaZAZpaAnU+6xibyZrAzdmw8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=G/5uGXkLsR/0UUtACvbRyTHsCR3ib2vWon/j1uWF+myWZR+feZbfKXVJ38Jox51JR rrtHokVF5qc59QtN9pm2Aid0mvukRBZvvJRPZnMbg2LXs3W7FKPZb9DOddPRChq+04 7JL179HQwrruYVCt5r+Vpovt+Sdk0LBPzRVwZ+XI4OxhpxXiK+RMYVBB6czMEHwqkY 9nvDxyvxeseP5A1dCBkDhN/eYc+RpV6LMY9wlppJzF1oM6crzwjxPq6bMGEFktgFeN bzKdtfoMXdzWE3wfQVZbFK6g8hrEo/W1k4le2ij7WEnQVWWKb8u3T1oth+LITk7sME fXE6BWmEgd5wA== Date: Fri, 9 Jun 2023 10:13:01 -0700 From: Jakub Kicinski To: Ding Hui Cc: Alexander Duyck , 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 Subject: Re: [PATCH net-next] net: ethtool: Fix out-of-bounds copy to user Message-ID: <20230609101301.39fcb12b@kernel.org> In-Reply-To: <9c1fecc1-7d17-c039-6bfa-c63be6fcf013@sangfor.com.cn> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 Fri, 9 Jun 2023 23:25:34 +0800 Ding Hui wrote: > drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c: .get_sset_count = nfp_net_get_sset_count, > drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c: .get_sset_count = 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.