From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 021A2A034D for ; Fri, 25 Feb 2022 15:48:42 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E7CA7411DF; Fri, 25 Feb 2022 15:48:41 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id F1C464068B; Fri, 25 Feb 2022 15:48:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645800519; x=1677336519; h=message-id:date:to:cc:references:from:subject: in-reply-to:content-transfer-encoding:mime-version; bh=vvnmVEHb6e9kCGusqbV1W3j5UBLUs9rfBBbpx1rIrrQ=; b=JUor8O+sHxMfjiecuHqTyUFddXW+o7UWei7gvQ7YrnZ7T6uNtFb9hXuU JEvq9pmQC2oG/PSxwG2TfwQ/U2i33gGvY6tXROdctQGYHQBdJpK7M3g3F 0IJ6dEHVMYvcIivOIq0alAjxP0ncYvuqpYKtFptk1IMdQIBBK9aeZoYGH 5hhaHYs+kT1SrgzwVdViS9DdGNBR21WIeEJ4zt08Db4QVYsDbCcozPAnT 5NpnACoBO/iAyGILTcVrPuvPbCDE7f/d26hk+BZzyaJAxm4D0itagyFaH 5mp5dF3xOlgLbEQ5vXRc1pyd3FEHXCfZw2Zdkcdxx1LSs4qRcRX8fqG1E A==; X-IronPort-AV: E=McAfee;i="6200,9189,10268"; a="277140874" X-IronPort-AV: E=Sophos;i="5.90,136,1643702400"; d="scan'208";a="277140874" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Feb 2022 06:48:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,136,1643702400"; d="scan'208";a="549284728" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga008.jf.intel.com with ESMTP; 25 Feb 2022 06:48:31 -0800 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Fri, 25 Feb 2022 06:48:31 -0800 Received: from fmsmsx605.amr.corp.intel.com (10.18.126.85) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Fri, 25 Feb 2022 06:48:30 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21 via Frontend Transport; Fri, 25 Feb 2022 06:48:30 -0800 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (104.47.74.47) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Fri, 25 Feb 2022 06:48:30 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=C3q73Rm1bkUuWtJ40vhcf/7xMW/5uig0JWT3CMUlG1g5x6OUePb2nuGiBji+iSrKdUZirYCzIVWFg1zFnNoIZNE3JuA1fktdTWoqZxWa7Z+2BqYS75AE3+TKvwtVTGR2t/0xxtUcnHelUtbKuB/HbiqwN1FbBmLVaXMGWmM1FDPcAvgnJr7Wb2vgrjTxCjxm+z7n7fJejeVQxw2CeAo9FwEyhdzIAt/rNl0VSdDa2Ec7KQvHLwyzfnwGJBjsPAGJHJYygZ5Zha7/5pteCC9LoHm/BBRU2yda1KpSkZnVAjMQK4Y9no7SF37asOwDHc9ScVQoXQq7BReKNF3gT3YEag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=i3Q26Se537MLXqA81/GRqL4oqFLjXJGbNR6XOeDoZbM=; b=P8u6C/tsKjld1Vxe6Wc0xu5znJYcX7316f5h5+NcLbp7vNitCSqJUmCRQHF2XeBLbl6fMUGWeBaubfCmJflbgaLZQP91OEG/urj6QDL5Aj9HNi6vVgnGx3ZDTH1Scz99tgsSysA/4pMh4aRad46vhxPqjRpepbGY/m+NOXqkWeeHaVC7HiPB5FzdS/lvnFeb7uDo6+R23MdwdLQYVJKxZgaUhRbCIdQ35ASUZGoQEUxbUHz97FrW5dEThfskNb9tYt6DsaOFPIS6wagg3XPe8jvpWHo9BzMINVkdktYWenD6yDWDWp8qnFXiauCivVFf+pe7DNSVhP9TC0WX1bViHw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by BN8PR11MB3666.namprd11.prod.outlook.com (2603:10b6:408:8c::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5017.21; Fri, 25 Feb 2022 14:48:27 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bd21:6fbe:8308:2ecf]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bd21:6fbe:8308:2ecf%5]) with mapi id 15.20.5017.024; Fri, 25 Feb 2022 14:48:27 +0000 Message-ID: <10077478-eb46-4f43-3f82-47c8a9306e98@intel.com> Date: Fri, 25 Feb 2022 14:48:21 +0000 Content-Language: en-US To: Steve Yang , CC: , , References: <20220224011722.3585748-1-stevex.yang@intel.com> <20220225023947.73045-1-stevex.yang@intel.com> From: Ferruh Yigit Subject: Re: [PATCH v3] net/i40e: fix unintentional integer overflow X-User: ferruhy In-Reply-To: <20220225023947.73045-1-stevex.yang@intel.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DB6P193CA0018.EURP193.PROD.OUTLOOK.COM (2603:10a6:6:29::28) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 42a2d5c5-fd8d-422f-c4dd-08d9f86de1c2 X-MS-TrafficTypeDiagnostic: BN8PR11MB3666:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FptJfidphdS44nBhnKaBjdb8TQOHlpPVkfjRJxmGPV1llWnEEh3VpGJZJtF7DTD6KJAAMisl9o1Qkp0RhagOelICqy+QZ4nkAiLN4T1bI4RESLKlYrhRjqBxsW6UapBsm/QY6cUNZ07uLPsxKOzlidLqIOuU9Idl7ZwI2KynZZKJQ9cYaGoWmjXQQsLUUWs5jAw5ebwzP/oF8Gg0DoQk9+qbOxvaGJ2Pxz8FeKvYDTwrVl+H00OsJ6JOSTcoOkt1R6p9yaC4EJEUDfljsxKEAndJbI4p2pLDx/6qxJItlLAY6q4VJF4zUKhzdz5Jp9kJUlrEZFp5oBocDyn8bx8C9spLWIGQT9vS5CtuG71wC8sBqJCr3Lr4RNwSctd/bpGBiBTzS0BkqqXi64R24Ty1ideMSo3lKX5ukKXJ8uPGoPQVIS0fyHGQ4k4BdQGKoBFJsgmn0sm7Eg4yaAqkb4UryKVCC12Qz+B5v0YZy8ngIxiEn/jwFXeW+ePJRZ9hwl/OF28ZQVwZokZfOp1WOknN8LWptcn6VqvHD/4bu8tRP7ACSa2Wr4B8Q7Lm8WYykEU9rEi2UpmASMbUVe1YOJJqH/cBt0hq27l56TPlNRCCdgjzk48n+eWyHN4LFATsNrZGcBVHloc8PhiEDuhRkhlbiW0bvBxWkXc9VAOjlp5SJcaX7CbhaS21ihDAZDD4KvdJ6ffH+eF/lBCZftyR4uIvvA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5000.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(36756003)(86362001)(4744005)(66556008)(66476007)(5660300002)(508600001)(6486002)(53546011)(8676002)(44832011)(6512007)(6666004)(26005)(31696002)(316002)(8936002)(6506007)(66946007)(4326008)(186003)(31686004)(82960400001)(2616005)(38100700002)(2906002)(83380400001)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?aWpndENmMGpIOVB0aG5EZ0ZmbGVpblIrbW9FMlFIc2psbCs1Z1NKclJENUha?= =?utf-8?B?NXZXQ3pvU2hqTXM5ZXhZRFhNdk5SRE9saENmWWlDMDE5NVhBY3lCalgyblZh?= =?utf-8?B?YzgrNjBOczB2b24yRlEwM2J3UEVYTjJ3bUhQQ0YzM05tU3NRQ3dvQXlaMW5v?= =?utf-8?B?bEdTVVZDNTVUenl2MW9UOEpVT1Vna0czZ0MwQVB2dGpCYmpvU05kam54L0hF?= =?utf-8?B?RXlzSlM3VlVjbUR2WEpETERLdUtFZXFkaGYybUxiODRIWFg1UHZ2WDNKMVVz?= =?utf-8?B?Q1Zrbm53OE9tS0Mra2JUQ0FBRS9DVnA4bFdUcEloREhRUlU1RVBxWUtiQStH?= =?utf-8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WJWSW53bXNl?= =?utf-8?Q?o0GcUv9dYDUtMfAImwhiNjU=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 42a2d5c5-fd8d-422f-c4dd-08d9f86de1c2 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Feb 2022 14:48:27.5833 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 6oqLbA/zCr/mpTGjOmJuu+npBXjAzKSgG4tPI4xmrIY7jlr8mxHRorFuiievdqSM7OA52JhzpHikrWOluygWkw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR11MB3666 X-OriginatorOrg: intel.com X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On 2/25/2022 2:39 AM, Steve Yang wrote: > Cast 1 to type uint64_t to avoid overflow. > > CID 375812 (#1 of 1): > Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN) > overflow_before_widen: Potentially overflowing expression 1 << 2 * i + 1 > with type int (32 bits, signed) is evaluated using 32-bit arithmetic, and > then used in a context that expects an expression of type uint64_t > (64 bits, unsigned). > > Coverity issue: 375812 > Fixes: 5fec01c35c49 ("net/i40e: support Linux VF to configure IRQ link list") > Cc: stable@dpdk.org > > --- > v2: update commit message; > v3: use RTE_BIT64() to set bit; > > Signed-off-by: Steve Yang Reviewed-by: Ferruh Yigit Applied to dpdk-next-net/main, thanks.