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 F2107460D6; Tue, 21 Jan 2025 18:11:52 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7DD7040E0F; Tue, 21 Jan 2025 18:09:07 +0100 (CET) Received: from egress-ip11b.ess.de.barracuda.com (egress-ip11b.ess.de.barracuda.com [18.185.115.215]) by mails.dpdk.org (Postfix) with ESMTP id 3DDB7402E9 for ; Tue, 21 Jan 2025 18:08:32 +0100 (CET) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05lp2171.outbound.protection.outlook.com [104.47.17.171]) 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:31 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=H4H2SXABQwALURX+a1q4MwQ09IGDEuwmdKksQl/nerHGOs10liMOETsGF3zKaoCsQIEDG1hCKPFGEqHdMdKj6FD6SqGkftk0pNsUGlxhfjQekl4eCtksIySyYhSNzLud9FtmArKMvqZcpC3LRUJx1lbPiAa94WkA8AXKypeaExtFMrd4ZfVqAUs67WfBntsF4RAywZspBogd/zscWHdqXxJdi8dT5bscRwAD1i8TZDm33pZsWDBrSosHySsItWzHAvOfuXAwr+x1sn/x8DF3AvIkxXvGwiboCfaVHw4cLk5o1UGW54BSIhJswXMiWtNrpBgH2kuVn/YbaX+KnLROZA== 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=h/BQ0YEzrJw4P0V7zVbt1jLjLyZINQ5awRiuF+vSqMM=; b=bNrsDUZqpJgZUPbBXZwqJnmQ+zeTC905cqnSzJjKPpC2RYP2EA+ZjO/ORGLClLdCDelIIXFtopfZbHeJgg7f+4DZi8d+kD2JHb5aq4wYnGWYsXxzxYOxW2FSjvFgXz2GV7mzp2UYsOW1BjmtmaqsIrLRqCGXtga/ANsX6SbuPqNJicLpCOP9O3iGbSNNkxG1qrY18fGDocp6V/1drg9VTcnX+uCA+INOSpcKH6c4LVElFQOk5a9+8QqR2X7jma9ihMVuUiee2TAF9W8Fcm0ZHmAYaQMX/6RgAYvXd1G6buzca/v3JJXMZPr3Sga5mynPvKGOnUHndI7zhbLp4X4L7A== 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=h/BQ0YEzrJw4P0V7zVbt1jLjLyZINQ5awRiuF+vSqMM=; b=DPvuFbKkuMFyvoVUNRDDF+9PSfETvrxjqNlQfPNEX26Mr1QcXpOqoQbiclD8YTlKTGzqH42KepjyMCN0+RvdMN48CRGmiUWtY0zjW2DbCwfRNqnNDEUVahtW24f5sMxMYsbEOaLXnklmSZUiMLnaciNr+3Z6TGnS5anH/ywqosc= Received: from AS4P251CA0019.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:5d3::7) by DB9P190MB1274.EURP190.PROD.OUTLOOK.COM (2603:10a6:10:228::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8356.22; Tue, 21 Jan 2025 17:08:29 +0000 Received: from AM2PEPF0001C70A.eurprd05.prod.outlook.com (2603:10a6:20b:5d3:cafe::8f) by AS4P251CA0019.outlook.office365.com (2603:10a6:20b:5d3::7) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8356.22 via Frontend Transport; Tue, 21 Jan 2025 17:08:29 +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:29 +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 10/31] net/ntnic: fix potentially overflow Date: Tue, 21 Jan 2025 18:07:48 +0100 Message-ID: <20250121170814.3252171-11-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_|DB9P190MB1274:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: cefdfcd7-dd60-468e-1f20-08dd3a3e3a38 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|376014|1800799024|36860700013; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?KQlBVJuUmLEowQTVDAb9jm7EZVLkTJG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q?EzAHti2kSbnmrSI2Buj9yfQb7MLQp7WcnWLKlimpxKvGgxGDFZHPbAixo2HX?= =?us-ascii?Q?3eBInFDpTIkNCZG9XH7hR7TCnSzPcrGRdfjzVBPT8UZ31h7Ls9R2nHUXACo+?= =?us-ascii?Q?nXp9ZMDUuC3kHzBkv5AeBcEBZK1we7SIjYCdOUTrGNNA3fd2P2a467ARPs0O?= =?us-ascii?Q?B2w8ZVaBXAju95nvfCFk0KrVW0MJ5hiSn2fQlrNVITqHUDvepqfaknADpxPt?= =?us-ascii?Q?pAwNHHJAF5/Tgyb0bSbCWzdcwCmHZUYiCqKF0/AFLzZB/K1QR71Y6BPuGjUT?= =?us-ascii?Q?BjoOwlbVCDdI0qT5njGIt4X+tQzTI1USmDBIhvJrnjkp5Nhf37pDk8IUmS/z?= =?us-ascii?Q?BZqkew8HFc1Zj3ic44crmzYt2JDt2mcIjXs6gwcq6gLomhoOrq3Ju5823W7W?= =?us-ascii?Q?k3dBoVjzmhBGcLKUPiAOgLmsk3nHaYD4Z0hu2rr5pVLLVxX/r25V0828o7ZR?= =?us-ascii?Q?EP5AfFGSHS8585sIg1hHAm89zf48GtH6Njucbq6rIfHpHnpZ4DfHVr6S/jAj?= =?us-ascii?Q?5B6Cx/wZ/YVw1vv466ta8fLrP7I83nqAq1S16u57dcs2A+qZPQ8KAQ=3D=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)(82310400026)(376014)(1800799024)(36860700013); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: HWzl0rLN1yHiG5G0lDtb63MbYpgqdyCmG1PbTdxv1ojSFl4bNeXfKylZOCxmR3fSG4OhfqUsPUW20GzPctBJZpiLBqY7sa39zjerGtk/FvRPabE7UghX+rm/9D3pkdWWOkmL4zZwrGMSNYyRq+tc0vi2NXh1jMjR0kPoJtM1zuShIICw44MQX4XbTjbON3A3wASPDzWLDcq/SkIuW7wCwCT+OtG8pbVN2lqS2os7ubrfZCzdt9K9RklIEPvqJGTCgki7e4dkTVx5l8QLyRukvhrSMcS3ZyUvIw6adEgl1/xz+KIXOhH9hZmA8CHWlN7B47dhpDVgMy75P12N4Jleu2z9Ok2XTxaDtq/1qSGmgpdx0yNTONmz1QjosfZcRZwENOmIC7moxX4SURShZCoGpDEP6BEs49dUYE49eE0cseKumc+T4qt+OTVICw0CT7ftXiRSD/BjMem8nBhVDYP61u1+m9+2jIVw8Yo69pePQGg9NZ+SZTGsweq7Ln1OcTY7b7XnEY2Td1TL7eV9B17Iy3k+g7eMggVTto7ToflgNDR7WYEv8d5kpwr4NS3wZEZUvyfIW4PHY7kryqbaT2gxB+0C0mvpiZ+eBkchD73/B19qO8hmpyc8qPh5H1DKoe9Tmicdp7CeYiUey2Wvw/xCqg== X-OriginatorOrg: napatech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jan 2025 17:08:29.4368 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cefdfcd7-dd60-468e-1f20-08dd3a3e3a38 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: DB9P190MB1274 X-BESS-ID: 1737479311-305804-13352-8283-1 X-BESS-VER: 2019.1_20250117.1903 X-BESS-Apparent-Source-IP: 104.47.17.171 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVoaGBmZAVgZQ0NzU0iQpOSXJKM kgNcXCKDEZBA3MDFPTLBJTDBLNlWpjAVBFCxpBAAAA X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.261957 [from cloudscan21-179.eu-central-1b.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 Issue with potentially overflow was fixed. CID 448944: Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN) Coverity issue: 448944 Fixes: 339ca124e659 ("net/ntnic: add flow action modify field") Signed-off-by: Danylo Vodopianov --- .../nthw/flow_api/profile_inline/flow_api_profile_inline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_profile_inline.c b/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_profile_inline.c index 535047d246..a68c3ea702 100644 --- a/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_profile_inline.c +++ b/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_profile_inline.c @@ -1632,7 +1632,7 @@ static int interpret_flow_actions(const struct flow_eth_dev *dev, return -1; } - modify_field_use_flag = 1 + modify_field_use_flag = (uint64_t)1 << fd->modify_field[fd->modify_field_count].select; if (modify_field_use_flag & modify_field_use_flags) { -- 2.45.0