Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2921150rwd; Fri, 9 Jun 2023 20:52:46 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7p7/UcxNv65q+eSVyyKfI1qhgMaKPJ51NSKkZ2qeTGJvFTsSDCX8x1khwOo5m1oIaeLWXL X-Received: by 2002:a17:902:cec9:b0:1b1:dfbd:a192 with SMTP id d9-20020a170902cec900b001b1dfbda192mr760876plg.57.1686369166363; Fri, 09 Jun 2023 20:52:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686369166; cv=none; d=google.com; s=arc-20160816; b=LRm+Nz4mdtvj4JWMVeG/Md3U0xZ2xhuLcDgtsrBPG/KE663v3Uap8qWE7H7TQnH0lo a1TnuHhp2TwJ0UMpyvjP0aFiLvL5+n7mC9Ic1Rn4kIpmIcomuqbGbJtHLtBLuYk2o2qK qs/k/KeZYXLHsuUTcU8Y1d9v+cd1rNEQ+x5FKVYmFDecbzXE6/PUDKtusLl1BizLvpHP DxmUmrM45ym19y4a0OlZFjPRlw20EVhv87ubixj3JSdlsrpl6v8fFlTv4JZwKsDkdUGS GWnPUD397la7LiWGzxMpih8CbjbUAORCEPFgYuX+93LkZ1+uP82JMd0vHWqyxtMfQU2Y UdUg== 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:subject:user-agent:mime-version:date:message-id; bh=pVa+E/26cci1wBHOtZJ2RlGnlnUFJNVnTsg7XNyDtDM=; b=zbfxycTKCDaudyk9hcP9Ixp7N8+SmuQnXPDAHMvrWCagfFunOJw0JIRE7yhbGgSiVv XMRGd7o1lhN7I942VdKtTHwfzc60hF+Ssg85rht6iA6bSlJAD8qyPq80InNVhAwAf6Wd Dp+kk3qfyeZRkuutOWRH4B1xZpFOdz312h+6kuM1+OMnsCtaY3yXHmED2Zk8m6RJ8w9n 52ew1E05xZ8Yp8qkZ8PpiA4ZDyGxadtg6aJENTZz9KG6Us3y/ZXyKMQMU3vbDFvwJYWi srcI2LAmXt16R51p7iYJdJ8CEkqK4/8+FMlOxGI8VIBitrnJkHVdO5/tDcUnCBri6pJa EQ1Q== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=sangfor.com.cn Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e7-20020a17090301c700b001b1cdef2654si3583646plh.645.2023.06.09.20.52.34; Fri, 09 Jun 2023 20:52:46 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=sangfor.com.cn Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230450AbjFJDrk (ORCPT + 99 others); Fri, 9 Jun 2023 23:47:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229461AbjFJDrh (ORCPT ); Fri, 9 Jun 2023 23:47:37 -0400 Received: from mail-m11875.qiye.163.com (mail-m11875.qiye.163.com [115.236.118.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69A83272A; Fri, 9 Jun 2023 20:47:34 -0700 (PDT) Received: from [IPV6:240e:3b7:3279:1440:9db:41ed:be98:62d0] (unknown [IPV6:240e:3b7:3279:1440:9db:41ed:be98:62d0]) by mail-m11875.qiye.163.com (Hmail) with ESMTPA id 9DE07280E6E; Sat, 10 Jun 2023 11:47:27 +0800 (CST) Message-ID: Date: Sat, 10 Jun 2023 11:47:40 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 Subject: Re: [PATCH net-next] net: ethtool: Fix out-of-bounds copy to user To: Alexander Duyck , Jakub Kicinski Cc: 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 References: <20230601112839.13799-1-dinghui@sangfor.com.cn> <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> From: Ding Hui In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFITzdXWS1ZQUlXWQ8JGhUIEh9ZQVkaSUxNVk0eTBhJQ0tKGk1CGFUTARMWGhIXJBQOD1 lXWRgSC1lBWUlPSx5BSBlMQUhJTEJBSk9PS0FCHxlBT0oeH0EZHkJDQU1JH0tZV1kWGg8SFR0UWU FZT0tIVUpKS0hKTFVKS0tVS1kG X-HM-Tid: 0a88a36a888b2eb1kusn9de07280e6e X-HM-MType: 1 X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6Nk06LAw5HT1DTSM3MC0rMUoe EBUwCyJVSlVKTUNNSE1DQ09DT0tDVTMWGhIXVR8SFRwTDhI7CBoVHB0UCVUYFBZVGBVFWVdZEgtZ QVlJT0seQUgZTEFISUxCQUpPT0tBQh8ZQU9KHh9BGR5CQ0FNSR9LWVdZCAFZQU9IQ043Bg++ X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,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 2023/6/10 1:59, Alexander Duyck wrote: > On Fri, Jun 9, 2023 at 10:13 AM Jakub Kicinski wrote: >> >> 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. Sorry, my research is rough indeed. > > 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. > Thanks to point that, the examples NFP and ixgbe do help me. -- Thanks, -dinghui