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 63EEF460D6; Tue, 21 Jan 2025 18:10:07 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A660E406BA; Tue, 21 Jan 2025 18:08:46 +0100 (CET) Received: from egress-ip42b.ess.de.barracuda.com (egress-ip42b.ess.de.barracuda.com [18.185.115.246]) by mails.dpdk.org (Postfix) with ESMTP id BFBD840667 for ; Tue, 21 Jan 2025 18:08:36 +0100 (CET) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05lp2110.outbound.protection.outlook.com [104.47.17.110]) by mx-outbound22-172.eu-central-1b.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 21 Jan 2025 17:08:36 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=th9yGUY3P8oQYF4qq0sZhUnNSr9DNOQzoaF0sP3qyAt1r4ydrBS5Y14bM1OAulMOheKCRW5SbE+tBKoiVq/Qu6H9I7xYL+5UIFwIRAv1NeIeQpOGqy9DVeg7ZMhwxXD07o0IHp7CEFOY3y9B5diasOoJ8rzihNnP3RBlu0v7b0+vU3hlCCID28lB/4Wl+HW5/87DZmkP0n6RpS6b8saf+GRDdk8qJ/GI3fNQHCdBfIdfH5Uu4rigcDHYlxiBqzs5qmGf369QlUtHyTlkwneVGccZ3Q/Q680HQioizBVrbq60H+fmsKB//rrQRsb4QgVN3wlIj3M7EtO1LeGBTJtRxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=lJxaCw/5VKVmAxtz8bGsEWKB5cwzmeiYjrivuSwRDPM=; b=Y/dIRu1xtV8pLjMAkh68SjP7L2GSQzCjdd1S++/6jBuHlnsc196Qxg1/h7w1QibY5t2jgVw5isUzGxWqfJFj6dKK2+A3uvNmOa4tuPBt6Eh55LYqk+p1ScVzaP3qU5Q5XI9supOfpZv9ANuNZoa5/e0ZFJka3vGnzo8ZD3JbbgnXXT+v6iVxjvHTQKvesm52Vr0AuNzwxwyLb4UZzhi0+0M1bIRCFXQNs55TnKHcFa82S7cQNZfQSTOiNfrH992mn7DoNcP5n8UWPoycSL7qpkN7OWdL42G1tLM3kSIJSE5z7IiUbtKQfqmSo2Q4kAp2V4HjswGiozjtkaBGfMrqbA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 178.72.21.4) smtp.rcpttodomain=dpdk.org smtp.mailfrom=napatech.com; dmarc=fail (p=reject sp=reject pct=100) action=oreject header.from=napatech.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=napatech.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lJxaCw/5VKVmAxtz8bGsEWKB5cwzmeiYjrivuSwRDPM=; b=PGmvrDD3dZtev8jcQyynuEpMTaRA4W4XeCdUe0TOjCeElq8+EY2sonjfkzwf1eSGB+R8fNeupIzMV0/sZfGZTzNn2gJS0JWRguCQs11QZUJDU/7AH9Y7SxLsK/XXjukhseFJE3QOZCOvy5NfZhSMs4LAXV4wQl7UbQ6vqDPlxEM= Received: from AS4P251CA0030.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:5d3::18) by AS4P190MB1951.EURP190.PROD.OUTLOOK.COM (2603:10a6:20b:516::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8356.21; Tue, 21 Jan 2025 17:08:34 +0000 Received: from AM2PEPF0001C70A.eurprd05.prod.outlook.com (2603:10a6:20b:5d3:cafe::75) by AS4P251CA0030.outlook.office365.com (2603:10a6:20b:5d3::18) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8356.21 via Frontend Transport; Tue, 21 Jan 2025 17:08:34 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 178.72.21.4) smtp.mailfrom=napatech.com; dkim=none (message not signed) header.d=none;dmarc=fail action=oreject header.from=napatech.com; Received-SPF: Fail (protection.outlook.com: domain of napatech.com does not designate 178.72.21.4 as permitted sender) receiver=protection.outlook.com; client-ip=178.72.21.4; helo=localhost.localdomain; Received: from localhost.localdomain (178.72.21.4) by AM2PEPF0001C70A.mail.protection.outlook.com (10.167.16.198) with Microsoft SMTP Server id 15.20.8377.8 via Frontend Transport; Tue, 21 Jan 2025 17:08:34 +0000 From: Serhii Iliushyk To: dev@dpdk.org Cc: mko-plv@napatech.com, sil-plv@napatech.com, ckm@napatech.com, stephen@networkplumber.org, Danylo Vodopianov Subject: [PATCH v1 17/31] net/ntnic: fix var overflow Date: Tue, 21 Jan 2025 18:07:55 +0100 Message-ID: <20250121170814.3252171-18-sil-plv@napatech.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20250121170814.3252171-1-sil-plv@napatech.com> References: <20250121170814.3252171-1-sil-plv@napatech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM2PEPF0001C70A:EE_|AS4P190MB1951:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 6fd913f9-f5b5-4568-70ac-08dd3a3e3d54 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|82310400026|376014|36860700013; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?x/LStLS77YcbH97aIE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hEfPXNCmaR?= =?us-ascii?Q?gBADkwjnCMd/wab3P5dXw39Ff8M6X3DcQKRjjj5WGRFcnSLAWib/ZG3sDOGn?= =?us-ascii?Q?Q1pUFHhG+qdDsOe78fs4Sc0UVQ61snO2z12hA3aSfBSBAtdJn728jTitwQEL?= =?us-ascii?Q?wYRVPBYR+5xykWPdJUsfxCpVKzUcVxTw5ibSrAPi5X3CD0XNs9TfNcheGdpV?= =?us-ascii?Q?fjYBIkHa5vwlffLC+iVNKsGAMoBXb4BPwzWwtG4VODv5HVUnv9fkG7cRUDnv?= =?us-ascii?Q?TtBiaOgKP5gRyhOfkVkdhK3fo2C9RNNClpOrC28eRGb78SNPmMk6oIZCKwd/?= =?us-ascii?Q?rp/SrVhmvqZH760s2OaRlZizk2dKPfbLRrFZnqA1bDs0ubuPhliV3CvXC0W4?= =?us-ascii?Q?Zd9IImSYGkLGxG6wewzNgJhNtrG4hBzV84KiZ7fsZ+InVLx5ikNpdL9IWd2Y?= =?us-ascii?Q?Q8c81DnKv0Zlv7wjQGzlSI/8TZgXos9wuLO8xOeLI9OAliEdEtWJWoR/Mv/l?= =?us-ascii?Q?XZH/f2FH+02Dlpp3Q5Hy30G+LZAtNVhPP3oHTpj7ncDUk23o0vAbd6wsGnsX?= =?us-ascii?Q?kITa1M6tOOouv6LhFzoIabd4NyeuryUInRoyaGXpudXaIEdCc5Z0JXO8uLyF?= =?us-ascii?Q?kk+bT1jiyGr19dY=3D?= X-Forefront-Antispam-Report: CIP:178.72.21.4; CTRY:DK; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:localhost.localdomain; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(1800799024)(82310400026)(376014)(36860700013); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: kEsLkDGKsTyixsDHT3vvwgp7nY7Bq4EXbYfZsFGsB6/1qYffDrTclv/lKe3G8VVOFCvRgvSYBoOHt8Gl0lVfh0QTws4jT84tfeuNUpIhSKwhkW5VB9JDwVxa5EFmebsfVwYhs2CN8tLz/Br5f/J/hMxGPbzIep5nPmW+jjTH39FpbGMO6PsGaK4PDt7MA9rIdl26m/agQAGJGwwtGve9KMLfxHXuL15ciqsOTToAT/qjOhc2qd9ytvO/NLWXQu7bPXFb0b/McxXQdob95MmMFUh3bvxFV9moA5/a+j64iB4RryQydSNPvsVMFlkki98JM9GRgjE1HSJ1aHSnYP3/naDjUAQyH/sZaUP/+Dp2PfjS7z6kbK7VtDQ/DAQKIZttXL66fECya8Iov0ZP+kionF6dVvRVHyY24Ua/tDO2pfHTdm7b4GxfEj0cung1Qqb4El+K/JMy8l2JMWFsPofowIntZJRCbSSg2VvN3t1sYKNGW+N8pC9LrCISOp0BJejXXaG5usQVPZf6L3uHrfu/ZKfH3LB5ErfqmdvD7oI28ByIf0mOEioAc2iKCRiuLJy3E9MlAKMCsAgK40CtFR1vSXVNEzsORI0In3a0KpxLGxZivoAlyBmlRiycrcKyh43TPIkyzuJ2QicrWt/3PH5s5g== X-OriginatorOrg: napatech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jan 2025 17:08:34.6555 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6fd913f9-f5b5-4568-70ac-08dd3a3e3d54 X-MS-Exchange-CrossTenant-Id: c4540d0b-728a-4233-9da5-9ea30c7ec3ed X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=c4540d0b-728a-4233-9da5-9ea30c7ec3ed; Ip=[178.72.21.4]; Helo=[localhost.localdomain] X-MS-Exchange-CrossTenant-AuthSource: AM2PEPF0001C70A.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS4P190MB1951 X-BESS-ID: 1737479315-305804-13346-8290-1 X-BESS-VER: 2019.1_20250117.1903 X-BESS-Apparent-Source-IP: 104.47.17.110 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVoYGFgZAVgZQ0MTMNNXYLDXF1D zZKNXc1DDV0CQlzTLR1Cw1Mc3CxNxMqTYWABa2FPdBAAAA X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.261957 [from cloudscan10-25.eu-central-1a.ess.aws.cudaops.com] Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.00 BSF_BESS_OUTBOUND META: BESS Outbound X-BESS-Outbound-Spam-Status: SCORE=0.00 using account:ESS113687 scores of KILL_LEVEL=7.0 tests=BSF_BESS_OUTBOUND X-BESS-BRTS-Status: 1 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Danylo Vodopianov Casting either buf_size and num_descr to uint64_t before performing the multiplication was done. Coverity issue: 446740 Fixes: 6b0047fadf41 ("net/ntnic: add queue setup operations") Signed-off-by: Danylo Vodopianov --- drivers/net/ntnic/ntnic_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ntnic/ntnic_ethdev.c b/drivers/net/ntnic/ntnic_ethdev.c index 28b086c009..6fcbb8fa9b 100644 --- a/drivers/net/ntnic/ntnic_ethdev.c +++ b/drivers/net/ntnic/ntnic_ethdev.c @@ -790,7 +790,7 @@ static int allocate_hw_virtio_queues(struct rte_eth_dev *eth_dev, int vf_num, st NT_LOG(DBG, NTNIC, "***** Configure IOMMU for HW queues on VF %i *****", vf_num); /* Just allocate 1MB to hold all combined descr rings */ - uint64_t tot_alloc_size = 0x100000 + buf_size * num_descr; + uint64_t tot_alloc_size = 0x100000 + (uint64_t)buf_size * (uint64_t)num_descr; void *virt = rte_malloc_socket("VirtQDescr", tot_alloc_size, nt_util_align_size(tot_alloc_size), -- 2.45.0