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 5742842850 for ; Thu, 30 Mar 2023 10:36:13 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 53E55410D3; Thu, 30 Mar 2023 10:36:13 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 23E0040685 for ; Thu, 30 Mar 2023 10:36:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680165370; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bGOLjgdHLuIbHdAE2Blo/5+u4ZAOblwfyupsnz9gHHk=; b=Dd974w7Qw3t4nO/Jg/k4cGvoRITFoMXAnrw4s9kbuoaiXPdlOqwmnsrhf/KjwCtzFVfOoy WPzw/fAzGCAK8YE0BfUcRNojPNeqJhReqbu2BaI4vv+tc1tnJiy2SldEpUSASNuhJ5HW+5 RL7MBExLB7IsJuz56b/IuscK7RJ86M4= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-265-HDDpGF9EPPKU04NWMaNmZw-1; Thu, 30 Mar 2023 04:36:06 -0400 X-MC-Unique: HDDpGF9EPPKU04NWMaNmZw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 20176101A550; Thu, 30 Mar 2023 08:36:06 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.192.23]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7A36740521FD; Thu, 30 Mar 2023 08:36:05 +0000 (UTC) From: Kevin Traynor 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 21.11.4 Date: Thu, 30 Mar 2023 09:35:54 +0100 Message-Id: <20230330083600.473876-2-ktraynor@redhat.com> In-Reply-To: <20230330083600.473876-1-ktraynor@redhat.com> References: <20230330083600.473876-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 21.11.4 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/02/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://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/9950bb97caf0b3daad6282d678c9d3ce7df98518 Thanks. Kevin --- >From 9950bb97caf0b3daad6282d678c9d3ce7df98518 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 [ 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 @@ -289,8 +289,7 @@ 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; } } diff --git a/drivers/net/mlx5/mlx5_txpp.c b/drivers/net/mlx5/mlx5_txpp.c index af77e91e4c..83d17997d1 100644 --- a/drivers/net/mlx5/mlx5_txpp.c +++ b/drivers/net/mlx5/mlx5_txpp.c @@ -1065,9 +1065,7 @@ 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; } } -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-03-30 09:30:45.343886598 +0100 +++ 0003-net-mlx5-fix-build-with-GCC-12-and-ASan.patch 2023-03-30 09:30:45.242229240 +0100 @@ -1 +1 @@ -From e17840756179410283ef03660578310874432f40 Mon Sep 17 00:00:00 2001 +From 9950bb97caf0b3daad6282d678c9d3ce7df98518 Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit e17840756179410283ef03660578310874432f40 ] + @@ -25 +26,0 @@ -Cc: stable@dpdk.org @@ -49 +50 @@ -index 63d98dbde9..0e1da1d5f5 100644 +index af77e91e4c..83d17997d1 100644 @@ -52 +53 @@ -@@ -1064,9 +1064,7 @@ int mlx5_txpp_xstats_get_names(struct rte_eth_dev *dev __rte_unused, +@@ -1065,9 +1065,7 @@ int mlx5_txpp_xstats_get_names(struct rte_eth_dev *dev __rte_unused,