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 100F2460D6; Tue, 21 Jan 2025 18:10:57 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D608140B8D; Tue, 21 Jan 2025 18:08:58 +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 01CBA4067D for ; Tue, 21 Jan 2025 18:08:41 +0100 (CET) Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02lp2235.outbound.protection.outlook.com [104.47.11.235]) by mx-outbound40-251.eu-central-1c.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 21 Jan 2025 17:08:41 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=HV0I6Wyn7qQw9sOXa7s9odSGNZ8PNLzIJXtg21ZoMddxdTURcTkXWKJEKNyOy/Xjt8f9GliyzoxF4Wa9NbexxutMzUqrWHIcoj+8CJte5K9eVWZLXvccVk57dAwa6PBAv50n2LcodmVHf4klZWrw3R05FKd1CbXdMcjiF5I3VgLltrSIegVfzka53lLaPxZhtjf4zVQZsqJOPuRrYKLa/UqoFbSXRZHwUwrHXJoaNStGF+RsSOhxaJeu0BUb4kq1pmmoJSZMcCUy0pEPR1DmP/tNQ52+ejtPmxDGDp6RBnObj/ESgCwTPC+o8NyahpxCaIga5M35R8dmIW38hNIIbQ== 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=SgofYlzoLgGjgXP5If3GlUn4xoxaQGlmGOHhXgYNHow=; b=wEr/Heg+YtLxihxDKqqcAcksjPTc8ZaSBTDuzgTX7s6Vh/sg3o91oCCsZxJUyh0pI6XaKA1d7wVDxrm0U0zpkPaOSlrwsVzuaalmv6KS34AtEkAQwPPSd9q6TqHhuPAkMkfn1qC1H5YtC7iafzrhq08LrkrQbY+KCaZCY2uV8XqslUrPgvGPqxe2A6P1Mzue1vFTgOEBZRbgGQOvEwssoxeBkj7EQA0DVfhQe+1+EPxk0VKkufhsespRweky/GS/2IEeI/9v4fIT5yeQwL/j+VhwuFhJNxSKXWamqziuoqu+YBwOvbgy+bs08po0/I7O9M0ZsNZjQ2zPXQxvPf1uMQ== 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=SgofYlzoLgGjgXP5If3GlUn4xoxaQGlmGOHhXgYNHow=; b=WE33ADq8+cA8+ZnvZQ9+FcFiT8PeVPLzWhlwGxcWvaqsu4CPrkZm5WV9a6K+wixndfy+/1s2eKY2g0lZRy9Xq8H07sK1tuvpHMwxPnYWixOy35CGR6+tPb9w5ApuQXq8lveNHDbYFQtSBH+yfCp7AN502HzEXFNNNjL5Kqyy+mo= Received: from AS4P251CA0029.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:5d3::19) by GV1P190MB2226.EURP190.PROD.OUTLOOK.COM (2603:10a6:150:20e::5) 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:38 +0000 Received: from AM2PEPF0001C70A.eurprd05.prod.outlook.com (2603:10a6:20b:5d3:cafe::5c) by AS4P251CA0029.outlook.office365.com (2603:10a6:20b:5d3::19) 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:38 +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:37 +0000 From: Serhii Iliushyk To: dev@dpdk.org Cc: mko-plv@napatech.com, sil-plv@napatech.com, ckm@napatech.com, stephen@networkplumber.org, Oleksandr Kolomeiets Subject: [PATCH v1 22/31] net/ntnic: remove extra address-of operator Date: Tue, 21 Jan 2025 18:08:00 +0100 Message-ID: <20250121170814.3252171-23-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_|GV1P190MB2226:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 6714f65e-0908-4f20-950f-08dd3a3e3f3f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|376014|36860700013|1800799024; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?o0kkh1vAetsdLk2W5f3C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-ascii?Q?XFTwKSC2Jm+dR7Tv8/gCypv5tgpUbwPwYaN7WPJAUVJRC6a9Smyk7bLHiF2D?= =?us-ascii?Q?WWHDwLtoCryBeAZRM0GsZhG0gmZNy0fQ6MTmCqL5NpCP/SqbBFBCY02zxL1L?= =?us-ascii?Q?/HCK9TTmJ3wnKJY7P5dWuvryUTM4lj3drOATg/+1KzGs1H8tQC014JGCBNaD?= =?us-ascii?Q?vCcK5Q9TnIqJLvzfOwvT0N9raEprkTGqGNnAhrxo7xLGGCHLNsWatsHSdBcs?= =?us-ascii?Q?O1kvhdvP/W2q4o84ePkGbGSbUnqyy/YmBoFPl4pIQDasCpyQV5pGTa9067yA?= =?us-ascii?Q?3r4uWehZUFD4cmLdDU2f/lc6Of5YfNXxF3PaM88E147SnoC7Q+Y0DrpaKgm/?= =?us-ascii?Q?mXL1SvvG8+TchOfzjsN9yqtOa6GIAoqLX7D7YFS0oQA84EpQ7keRFySvEnHp?= =?us-ascii?Q?NhOApkmIh8os1njOMeMmGpRCBZLB3mHK7r3zlyZhhsQ0T/KD2QR4EFYEvJeU?= =?us-ascii?Q?EYage48PjpGUZWW1P4kHw0bJuylkFuGNvQ9MJ77cUuhw+0ho5AEDrEZINCPk?= =?us-ascii?Q?PkWYDPzdx5jWgJNUezwtSbUU08mmLRZ9PE/9k2EWwQbnPi5RTt7AsfEOWKpJ?= =?us-ascii?Q?zyKsjXGeVGh+bis=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)(36860700013)(1800799024); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: TUf/9x4vlxngx1nUE92EFR8zG+zIwIg0hkUXecNlNbxngbRWlnkg5xFfc+NTeCBhJ5W/taUmpachz/Md40NyxksDLoEMZnNhMGqIhMuhaXSOlPewB4z7t8bmyTygPmGVJOYpTJR0gfKMO+mViDCaA98BOTytpGqaVaOWMX6RzKp/DHJEI6lvove8dYUA7qd/CnYTqVoAUfoq2KpM0meUcuY1iSlzO1BPYWlK73I448M2apuTYudwie8FBwWk4YeuEGbFlKPxtkkRrlXUKXDX/fo7FnCenJu89AJNYCiMZgJKunI+E67tYzLRBIirIKCcer5MgGO3K9RKml7Q9BgzTbyJa+HH7J56Qxd4I8esvZR5e2O92lxkoCzWWNgs6F0BB9QTqMNMqTT/OhEyw+Ip4c+EmREk0BJRWsCaDMvTEBP0keRWnEedvQM8/V9eTDkKw5rhFDeTyZFuS4vJieX6mUBGNu32t8DQlzU6l5UO4Etz52Avd2o9i6sDxLfa9MWcH4wWcFQjs5YVTFJmePrJToM1lgZyki8KnVfApb6uW7OHdzVmZoRbniOWUWu/J7ucc6aiYRB1+c+/crVsz1nYF8hjGjBX4+meDIxMbfpjHJWppiRnzSGdb80saU49phGd6PjfaC4obN4/HeUSFT+wmw== X-OriginatorOrg: napatech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jan 2025 17:08:37.8743 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6714f65e-0908-4f20-950f-08dd3a3e3f3f 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: GV1P190MB2226 X-BESS-ID: 1737479321-310491-13357-7759-1 X-BESS-VER: 2019.1_20250117.1903 X-BESS-Apparent-Source-IP: 104.47.11.235 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVoYmRoZAVgZQ0DzJ3MgwLcXMws AsKdU82Sgt1SItxcIkyTTZKMXC1MxUqTYWAP9UdNBBAAAA X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.261957 [from cloudscan10-245.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: Oleksandr Kolomeiets Macro DO_COMPARE_INDEXS expects pointer to array. If condition is true, one of array's elements get overwritten. Misinterpreting pointer to pointer as pointer to array may result in out-of-bounds access. Coverity issue: 448966, 448970, 448971, 448972 Fixes: 6e8b7f11205f ("net/ntnic: add categorizer (CAT) FPGA module") Signed-off-by: Oleksandr Kolomeiets --- drivers/net/ntnic/include/hw_mod_backend.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ntnic/include/hw_mod_backend.h b/drivers/net/ntnic/include/hw_mod_backend.h index 40002f3343..7bb39e37eb 100644 --- a/drivers/net/ntnic/include/hw_mod_backend.h +++ b/drivers/net/ntnic/include/hw_mod_backend.h @@ -111,7 +111,7 @@ enum { #define DO_COMPARE_INDEXS(be_module_reg, type, idx, cmp_idx) \ do { \ - typeof(be_module_reg) *temp_be_module = &(be_module_reg); \ + typeof(be_module_reg) temp_be_module = (be_module_reg); \ typeof(idx) tmp_idx = (idx); \ typeof(cmp_idx) tmp_cmp_idx = (cmp_idx); \ if ((unsigned int)(tmp_idx) != (unsigned int)(tmp_cmp_idx)) \ -- 2.45.0