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 40F35428F8 for ; Sun, 9 Apr 2023 17:37:12 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3692140A80; Sun, 9 Apr 2023 17:37:12 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2084.outbound.protection.outlook.com [40.107.223.84]) by mails.dpdk.org (Postfix) with ESMTP id A0DCA40141 for ; Sun, 9 Apr 2023 17:37:10 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cLP2lf0alCNY/oJJHOIPejF9wKe7XQ7GxfTryIG1z9H1yBA+FZ4t2/6ardURmMupYYalm160tD0kNKk9ipc7Z0jgTrZPoQXHrOrND/q5T1qysdm+xejep7R7FUh9vJb46td+Zfj9JVXsO5MABTJiS9ZjZj3ePWHVZx1umKrm4E+3e6DENL0UHl8YJ+EDR95A/sVdDlG4xZNVDb9R2eWs4rpyuRCW5J/IANr7bOG8AiO+FZ5QmQKDxVcNGSCLH+cQJBssgv+xjr5x9U+jl6Qj2W+Dbpc0GlO/LxmOsb87+hnHg8tXEcUc5ZLFmGLrGUH7my5m3f+TW3n+OKKOl/yZkA== 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=BzzkOJuJtNRt8H0Cd8Lh/1aRKMoWWVgZgBM8997QI6c=; b=dNmIIyJUzn9EnT/UQeC5aV2Q091xyHIFZ1bIkhQjrlVUMlIohYVQ9an2NxzJolgbtUtB8e62h539MK/CgGl0KWcGZIfYuVUi/3HdvV+LRfy0cYIaj6oZsQ81oAUVt8kLRS3IdHLSPpVnGom/L0dvtJdIvIBGHYSRroSFSoBUH6fPgZJM+CxZZC37e5T+ASizr5k1LY6brrxoAXdE9vkxxgZ+i4OQfZv/R8QAoDSdg0x6MD45BebiwYy3U1djaKP6bDYRPrz3mURc45/ZGgJe2+bSEuoitnnpX6rPvXCuc/HqE9phxWoGeu7X6zgjDQKduVeEEVrIAS6VSW/+N/oMqA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=redhat.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject 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=BzzkOJuJtNRt8H0Cd8Lh/1aRKMoWWVgZgBM8997QI6c=; b=i/lagJyTb4uwNexnnVG+K7av/cFexRacYK5V8ti9WhW5DUB5STovHFdZ57MaKNxNKtDvXgyVH/0jJS9D77witjCTIdAoJs6VoOByZIOULIxeTLtlYruGkah5B4i7j6tNUiiqZ1O0fzzMqjqA6Hf+8e1tWXg2yRy23vc69HeEpKr8FGHZUxsj/0iacaYb+ef6jPNQJI+SLovjTSqoEWVD/ykUIdoHB0QzHWIhztB4pptsy1nQb2KozVB4H+jmPc1gSIak8Ni3Dn+JOioes2pvxY0SQIQ+fiy0nAgrHA7H82ENJpg34ZPkWO6rl4rSsdTF1IAuQIvV8UihEYLQ8ChoFg== Received: from BN0PR04CA0128.namprd04.prod.outlook.com (2603:10b6:408:ed::13) by MN0PR12MB6104.namprd12.prod.outlook.com (2603:10b6:208:3c8::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6277.36; Sun, 9 Apr 2023 15:37:09 +0000 Received: from BN8NAM11FT013.eop-nam11.prod.protection.outlook.com (2603:10b6:408:ed:cafe::62) by BN0PR04CA0128.outlook.office365.com (2603:10b6:408:ed::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6277.38 via Frontend Transport; Sun, 9 Apr 2023 15:37:09 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by BN8NAM11FT013.mail.protection.outlook.com (10.13.176.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.25 via Frontend Transport; Sun, 9 Apr 2023 15:37:08 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Sun, 9 Apr 2023 08:36:54 -0700 Received: from nvidia.com (10.126.230.37) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Sun, 9 Apr 2023 08:36:53 -0700 From: Xueming Li To: David Marchand CC: Raslan Darawsheh , dpdk stable Subject: patch 'net/mlx5: fix build with GCC 12 and ASan' has been queued to stable release 22.11.2 Date: Sun, 9 Apr 2023 23:25:18 +0800 Message-ID: <20230409152529.5308-131-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230409152529.5308-1-xuemingl@nvidia.com> References: <20230227062349.13764-1-xuemingl@nvidia.com> <20230409152529.5308-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.126.230.37] X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT013:EE_|MN0PR12MB6104:EE_ X-MS-Office365-Filtering-Correlation-Id: 91084d97-229d-4bad-123f-08db391047c8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JJY6IZgAUBs/28xNk/5nTWjXbo8B08y2H5sPKTVIsZ+SwczsjshuDKcFNt4ON2SWxUEfHcIiJ40kXB32ue3CxC48TW3FMA3jHfeLrgpbWPlR9HA5LDymZ/sVuDlkI5av455T7bj2qsOrYQc7hjl1/nXciJOZlRAsN4dPDMS4BO13PYPJsiR961im/JFVWzCPc12cFGRg5TjOCxJawSZvipj7ziPJo0FqwHD1jrYlBHazPU0JzmZ8/VNNdSt71AZCVBtScB/BE8RHGBb6yuEQ/GWP0vsZzHZ7uMJkxi5HYxTgVffhsNJAT83YOXzus9OEjZSc6UpIkWM/l32MVb4Gr+hQ/hRehZ1bXVSKWn1Nps3dzVRrtiVOsn934Jxbhn7FMsS0nyaJ8lVsXh6UQAxt32q63IDmNSnV5ns36jxf4K9NYI933iaxbtYGTIByCOhwvoGtRsN4ByYFlrw4nyOVzbIuz1eGk+9EMIsomA3UP6g+sQvQLRvytNkPmzS7/mO9vylRQUjJ5fEZXkuQXV11Ai1LDE85o9OQw/8CBZ2dE+NC8Pccqnk5XdekdZag7gw8mG8iS5riqFLZfzxizDPKLX3TYScahFPfvA/YD29/rZJ5RyPl0D6RNstCkYh5NGAcv7Ss6XGMBb7tOFQasVe6gKpIcdpRm9pxvIQFwxlhEb7y+jgvmO2Aw55sUZOMWAaMHFKEUAGiUbXLox5IvzUnZMt+YqweXnbXGaCucGWXRn7bNOwC3Btd2+ytuet/iRfDKdBCwdCUGvsZ4WIPMM9UxikNybMcYOwZShQBnscVXLI86o/vvAYMblpLfGSgPtXkNh6yo5hh1vxTY0iVdLotyA== X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230028)(4636009)(39860400002)(136003)(346002)(396003)(376002)(451199021)(36840700001)(40470700004)(46966006)(7696005)(478600001)(86362001)(55016003)(40480700001)(83380400001)(47076005)(36756003)(40460700003)(82740400003)(7636003)(356005)(2616005)(36860700001)(426003)(336012)(6666004)(966005)(2906002)(54906003)(316002)(19627235002)(16526019)(6286002)(186003)(1076003)(53546011)(26005)(8676002)(6916009)(41300700001)(8936002)(5660300002)(82310400005)(4326008)(70586007)(70206006); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Apr 2023 15:37:08.7423 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 91084d97-229d-4bad-123f-08db391047c8 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT013.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB6104 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 Hi, FYI, your patch has been queued to stable release 22.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 04/11/23. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging/commit/644bcdb856d6f2cc6e82ffb5d7e7bf852852b6a1 Thanks. Xueming Li --- >From 644bcdb856d6f2cc6e82ffb5d7e7bf852852b6a1 Mon Sep 17 00:00:00 2001 From: David Marchand Date: Wed, 22 Mar 2023 18:06:27 +0100 Subject: [PATCH] net/mlx5: fix build with GCC 12 and ASan MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Xueming Li [ upstream commit e17840756179410283ef03660578310874432f40 ] Building with gcc 12 and ASan raises this warning: ../drivers/net/mlx5/mlx5_txpp.c: In function ‘mlx5_txpp_xstats_get_names’: ../drivers/net/mlx5/mlx5_txpp.c:1066:25: error: ‘strncpy’ specified bound 64 equals destination size [-Werror=stringop-truncation] 1066 | strncpy(xstats_names[i + n_used].name, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1067 | mlx5_txpp_stat_names[i], | ~~~~~~~~~~~~~~~~~~~~~~~~ 1068 | RTE_ETH_XSTATS_NAME_SIZE); | ~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Prefer strlcpy for xstats. Fixes: 3b025c0ca425 ("net/mlx5: provide send scheduling error statistics") Signed-off-by: David Marchand Acked-by: Raslan Darawsheh --- drivers/net/mlx5/mlx5_stats.c | 3 +-- drivers/net/mlx5/mlx5_txpp.c | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/net/mlx5/mlx5_stats.c b/drivers/net/mlx5/mlx5_stats.c index f64fa3587b..615e1d073d 100644 --- a/drivers/net/mlx5/mlx5_stats.c +++ b/drivers/net/mlx5/mlx5_stats.c @@ -288,10 +288,9 @@ mlx5_xstats_get_names(struct rte_eth_dev *dev, if (n >= mlx5_xstats_n && xstats_names) { for (i = 0; i != mlx5_xstats_n; ++i) { - strncpy(xstats_names[i].name, + strlcpy(xstats_names[i].name, xstats_ctrl->info[i].dpdk_name, RTE_ETH_XSTATS_NAME_SIZE); - xstats_names[i].name[RTE_ETH_XSTATS_NAME_SIZE - 1] = 0; } } mlx5_xstats_n = mlx5_txpp_xstats_get_names(dev, xstats_names, diff --git a/drivers/net/mlx5/mlx5_txpp.c b/drivers/net/mlx5/mlx5_txpp.c index 63d98dbde9..0e1da1d5f5 100644 --- a/drivers/net/mlx5/mlx5_txpp.c +++ b/drivers/net/mlx5/mlx5_txpp.c @@ -1063,11 +1063,9 @@ int mlx5_txpp_xstats_get_names(struct rte_eth_dev *dev __rte_unused, if (n >= n_used + n_txpp && xstats_names) { for (i = 0; i < n_txpp; ++i) { - strncpy(xstats_names[i + n_used].name, + strlcpy(xstats_names[i + n_used].name, mlx5_txpp_stat_names[i], RTE_ETH_XSTATS_NAME_SIZE); - xstats_names[i + n_used].name - [RTE_ETH_XSTATS_NAME_SIZE - 1] = 0; } } return n_used + n_txpp; -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-04-09 21:45:42.091907500 +0800 +++ 0130-net-mlx5-fix-build-with-GCC-12-and-ASan.patch 2023-04-09 21:45:38.799042200 +0800 @@ -1 +1 @@ -From e17840756179410283ef03660578310874432f40 Mon Sep 17 00:00:00 2001 +From 644bcdb856d6f2cc6e82ffb5d7e7bf852852b6a1 Mon Sep 17 00:00:00 2001 @@ -7,0 +8,3 @@ +Cc: Xueming Li + +[ upstream commit e17840756179410283ef03660578310874432f40 ] @@ -25 +27,0 @@ -Cc: stable@dpdk.org