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 EF08EA0A0A for ; Tue, 1 Jun 2021 09:31:17 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 88A4E40040; Tue, 1 Jun 2021 09:11:52 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2050.outbound.protection.outlook.com [40.107.220.50]) by mails.dpdk.org (Postfix) with ESMTP id 2985540040; Tue, 1 Jun 2021 09:11:51 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EdwJ7pfwB0pFtI5yzIFfu3R8dEjmq4ZEcwMnSNqbEt8Zzz1fM6sXyBq/hO7j4fJ4lxcX1QklAK5AvXD2Wvvs3fteg+LeR0ugPhiA9NuamMamnNGURcKctsfbXH4N45iaECduOvNKNFaExzPKxmftYkMmLrLEbMWADWfNMUFuF6OAh7LUHnENYHiHo4gCpNBVmX3gJMZYLWqMqV5p2levuds41o9ws0cX9knDUL2/FS0SMSnoZfEqGmOZBtfqAcBHhKEGFlzIiCHnKTtFjDdrG/tgIzpLG3ySWV1LKkhpq7GbS9WIZqH4fkc2B0k77+Lth2RK36QTB46pee9A7L6dIg== 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-SenderADCheck; bh=GE02dWS9h7KTU0kvmBj9oM55lhbpjPqv+jxwABV8XwM=; b=d0+Lg86+kaTxm5ix/RGrHqy9rLJqFImuUs1uPxldrlqbJYusaT/fEnKodctTQLPy+GECA81++vGs/LDhN46hendeSwEEDYvu54JyoD277jSIL5HfyrgK1eq5vVFBCGCnvBXWzmJMaQx3fAr5goAa9zs9BPv4+s2tc0XcmXkKnEYGOtDIYXpW2ovPCUiwV9JklefUCXMGwyYpxaSsWpn1CZRtpXy1UrKzD/TqNGA7+1XBwqLIZq5fCI1HJJtWAwMjo8z/3LkPJuHZsHtlQNudwe9SIrMgwcevtSvH7c6XnAXvI7qnL+eMj9X5UYuYPlPAmtdSIaI5FvNhkA7rVrARhg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GE02dWS9h7KTU0kvmBj9oM55lhbpjPqv+jxwABV8XwM=; b=fSBNZZMpGXytAIBkm+iRoJd/r42/IbB9VKbR0UB3KYjCTh8aSzu+KgmXi28baRou4CR/Yb4Cubx4p32KPBhVTXDHPRjuwD/qNimpqpJPRUh3ARF5bc9veMvSW3nzbv6/OQoNPyhMCNPcR7zeMpWoziNxxvJanGTmkG/xPVIg/bMDVmZHjEOu6Y4Dn/FlYLaIsjFfhlPlQXEtBSEWr2xZ8gCeI8Te7rHZQlE/sH7IubNwg8WWMSEHvPT7g+aeolqSHQ8Ec4IAiPVBknicaFvczxZU7EQa22F5CLgJDFnaZySE3JsLPVA3wgZg5tC4z86wq5TkpP4uITMz5NpnWK3f0Q== Received: from BN6PR13CA0011.namprd13.prod.outlook.com (2603:10b6:404:10a::21) by DM5PR12MB1819.namprd12.prod.outlook.com (2603:10b6:3:113::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4173.20; Tue, 1 Jun 2021 07:11:49 +0000 Received: from BN8NAM11FT025.eop-nam11.prod.protection.outlook.com (2603:10b6:404:10a:cafe::4b) by BN6PR13CA0011.outlook.office365.com (2603:10b6:404:10a::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4195.10 via Frontend Transport; Tue, 1 Jun 2021 07:11:49 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by BN8NAM11FT025.mail.protection.outlook.com (10.13.177.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4150.30 via Frontend Transport; Tue, 1 Jun 2021 07:11:49 +0000 Received: from nvidia.com (172.20.145.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 1 Jun 2021 07:11:47 +0000 From: Michael Baum To: CC: Matan Azrad , Raslan Darawsheh , Viacheslav Ovsiienko , Date: Tue, 1 Jun 2021 10:11:19 +0300 Message-ID: <20210601071122.1612432-1-michaelba@nvidia.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL107.nvidia.com (172.20.187.13) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 807d3e4a-2e92-42db-788c-08d924cc8660 X-MS-TrafficTypeDiagnostic: DM5PR12MB1819: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4941; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JQTB7dcCA2mBcnyi7SyKz/DmG4YaJPU7NIPi4CIFMqHXJtquiAAT5P/JrGmVwQXysOiv3CvAX6EEsrP419BmNDTiH3c1PcOTg/Eid1fghJcJVwMNLhvvsbwrrItpTUrnl1gmIgfaOiV+56ShV2ZZkdUZ5STpvB1NCrfOJ43nk81x0Dyop+bDYEjcsA0vQv8ru5gqzdq5x83JNK1Ywi99gfj7biYYQi/U4PI1FoFqyVtK6DJfJ4Zk97279G7hKCtpUBZC50IYY/kMI8vMrVp/VO5IV/cd5NmQMHlrhlKbiMmd17yjd7+NtCaB66t2pIpg4Z1MYiMeuZ/yfiITZnSHv8fNkxYTQiUJ15LicMyLEcKv84nk9GUnGHGeOAFmesRfWtY54yZpR+Z1P13pN2R/MlciDo5jEOI06ibBm/JP9Nw2b9gvh1qVvceYP8tb4KjRmXGPRpuOtJvvVONwR2honaEnOhzVmlPtFcpgTlFoIMhSbsMZ+PNj1dZ0MD7ighj+OnFPeIJy+4EfBQl36mGxeJbWtB4uyd0YPMBaufHZhLT2GPsCjXnvsjJxsZ4C17kz0RuT2HCIqtuiZI65ofOekaCq7gavvcDnK4i2dTe6LVLhy53f52wQCNiswaYwOhzrIP9o/d9bgIenC+vgmWp5tPcSr7aI6CN326amyCfKUsA= X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(376002)(39860400002)(346002)(396003)(136003)(36840700001)(46966006)(7696005)(2906002)(316002)(54906003)(36906005)(8676002)(2616005)(55016002)(6286002)(26005)(6666004)(450100002)(47076005)(7636003)(82740400003)(36756003)(6916009)(8936002)(4326008)(86362001)(36860700001)(478600001)(186003)(16526019)(426003)(336012)(83380400001)(5660300002)(82310400003)(356005)(70206006)(1076003)(70586007); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2021 07:11:49.4254 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 807d3e4a-2e92-42db-788c-08d924cc8660 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT025.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1819 Subject: [dpdk-stable] [PATCH 1/4] regex/mlx5: fix size of setup constants 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 Sender: "stable" The constant representing the size of the metadata is defined as a unsigned int variable with 32-bit. Similarly the constant representing the maximal output is also defined as a unsigned int variable with 32-bit. There is potentially overflowing expression when those constants are evaluated using 32-bit arithmetic, and then used in a context that expects an expression of type size_t (64 bits, unsigned). Change the size of the above constants to 64-bit. Fixes: 30d604bb1504 ("regex/mlx5: fix type of setup constants") Cc: stable@dpdk.org Signed-off-by: Michael Baum --- drivers/regex/mlx5/mlx5_regex_fastpath.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/regex/mlx5/mlx5_regex_fastpath.c b/drivers/regex/mlx5/mlx5_regex_fastpath.c index b57e7d7794..3ef5e6c1eb 100644 --- a/drivers/regex/mlx5/mlx5_regex_fastpath.c +++ b/drivers/regex/mlx5/mlx5_regex_fastpath.c @@ -25,8 +25,8 @@ #include "mlx5_regex.h" #define MLX5_REGEX_MAX_WQE_INDEX 0xffff -#define MLX5_REGEX_METADATA_SIZE UINT32_C(64) -#define MLX5_REGEX_MAX_OUTPUT RTE_BIT32(11) +#define MLX5_REGEX_METADATA_SIZE UINT64_C(64) +#define MLX5_REGEX_MAX_OUTPUT RTE_BIT64(11) #define MLX5_REGEX_WQE_CTRL_OFFSET 12 #define MLX5_REGEX_WQE_METADATA_OFFSET 16 #define MLX5_REGEX_WQE_GATHER_OFFSET 32 -- 2.25.1