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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E8978C4332F for ; Tue, 22 Nov 2022 14:51:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232903AbiKVOu7 (ORCPT ); Tue, 22 Nov 2022 09:50:59 -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> 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