Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5973056rwb; Tue, 22 Nov 2022 07:15:59 -0800 (PST) X-Google-Smtp-Source: AA0mqf7QLa0xaaj8nN0D3DHcSDVYp6/Jr6PYRdFv8c5a0KC42P9oiSOF14vnxRgpNWil37l2kkW6 X-Received: by 2002:a17:903:2144:b0:17d:95af:fb59 with SMTP id s4-20020a170903214400b0017d95affb59mr4340676ple.154.1669130158905; Tue, 22 Nov 2022 07:15:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669130158; cv=none; d=google.com; s=arc-20160816; b=pFNBcExZLL301k0t4rCq7z4oZWv2IgkTiVxLvnF2AF3CxsfX6zFPGQ3stZ9pDL8aQa CURFJER/A1LWlHCuA1/tM5Tonbxk2pYwbYrXGS9OO7nxxl76wAYAZ6hTIdQxzxbSQnIK K3xihGqDRdn0wVbpcfGXr4oEuMTHCxjeHloeOE0bgTXRNie8Y4ZUVwU2H2jFWliWGgLL tqwGnm3XXRj4Brp91x5cUfh4qNkkr+gFzgQp63Zydl+CINvoRgH2yP/aJR+wd7dDKbcW rECK4OmlYGSdZKkTDq+oEhnVKzH4b91vqAYVVi74DL3DUP9h//1ujqxL6ZASmID9so9d 1alw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=JTXHliGkwFbAvvGXxfkFbQkqDVWqZZH0nH2iHGLdV0I=; b=o2l2UCSnNXFh76iqqClwV0bD5aHaUJzn3CV770LFjcfcRynkbd2TCkrSpMvL+Z2yPo L4I2VxRRaakivmJExjvu4da9sAS4TkbT8mcZ1yt09XdVTxY1qh/szidRfjujg3lSxddr i7R8PU/bIk+H3NBGM60ND1huvGmdr2m0V7uPpGY3VrVSrguE3KPKR67KJltaWZW/g8AU pmqVAVdT1KMm0eM8BIUm/JzjiRC+AmR/oO8zBQrXiGJc3BzaE8RD0SQpFoa+fQ3EC9nM KX36q8GHpME2rHEm9drKDKATLXduaNoRZGMP8XY0C8lv+AC1P2P9FyFGVns679nmnt9/ Xn8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=EkR7AvwK; 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=lunn.ch Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o68-20020a634147000000b0047679c22ad6si13807085pga.237.2022.11.22.07.15.46; Tue, 22 Nov 2022 07:15:58 -0800 (PST) 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=@lunn.ch header.s=20171124 header.b=EkR7AvwK; 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=lunn.ch Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232645AbiKVOu5 (ORCPT + 90 others); Tue, 22 Nov 2022 09:50:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232410AbiKVOuy (ORCPT ); Tue, 22 Nov 2022 09:50:54 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5752B663D2; Tue, 22 Nov 2022 06:50:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=JTXHliGkwFbAvvGXxfkFbQkqDVWqZZH0nH2iHGLdV0I=; b=EkR7AvwKw7/77Gyqk9CslT4+jV pB50ssBJUZg5FnA9n3hQwmtXjFZ19xqpQ3pjIJkuQ4vEV5geB15AssZ4e3u/DCLkSmExSPERidtVt omfBId4VblVuw/07rEPHBiwutZuGiTLkfVI272K4yikc3bglh16cqZtUqobSdWPQF40Q=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1oxUai-00383o-NA; Tue, 22 Nov 2022 15:49:40 +0100 Date: Tue, 22 Nov 2022 15:49:40 +0100 From: Andrew Lunn To: Maxim Korotkov Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Guangbin Huang , Alexander Lobakin , "Keller, Jacob E" , Tom Rix , Marco Bonelli , Edward Cree , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org Subject: Re: [PATCH v3] ethtool: avoiding integer overflow in ethtool_phys_id() Message-ID: References: <20221122122901.22294-1-korotkov.maxim.s@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221122122901.22294-1-korotkov.maxim.s@gmail.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS 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 Tue, Nov 22, 2022 at 03:29:01PM +0300, Maxim Korotkov wrote: > The value of an arithmetic expression "n * id.data" is subject > to possible overflow due to a failure to cast operands to a larger data > type before performing arithmetic. Used macro for multiplication instead > operator for avoiding overflow. > > Found by Linux Verification Center (linuxtesting.org) with SVACE. > > Signed-off-by: Maxim Korotkov Reviewed-by: Andrew Lunn Andrew