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 BB5CB42814 for ; Wed, 29 Mar 2023 03:04:54 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B3807410EE; Wed, 29 Mar 2023 03:04:54 +0200 (CEST) Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by mails.dpdk.org (Postfix) with ESMTP id BBD35410EE for ; Wed, 29 Mar 2023 03:04:53 +0200 (CEST) Received: by mail-wm1-f43.google.com with SMTP id bg13-20020a05600c3c8d00b003ef90adc168so834350wmb.5 for ; Tue, 28 Mar 2023 18:04:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680051893; x=1682643893; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=goOp2EWOY/iFeUwZXeuST67l+YLf9jyUfJpR8kdA0F8=; b=WwV0tC71khimR04XjrwigiIgcxkpeKIVQWJU5gTVys96c5w4/B6yq4icYlsthHzTlS lrF8mmm3jBisKqRsGOtlXaq8cpetSrL927oNkfdfVq6nVXj6fkLM0iynyvgluxbO3CzK 8Un1vlGcSuyFQ85ze0+Coq59X9jwuX3sHEV3hV7C33kWRiZP54kYC+Lq/j2SHkSXSJ5e nGE3Y8yl2jpcaGDKfkL/KOZsUmVm78muNPDOYoSPoE7hbydJ8ImIqOS4+/PwCJEo/gnI e3cUuYQ5eELm+sZPkuIb9+lxgZwRcCrY/ZTH0QezdIJip6DxS+D3h5kOwH3C6thCzkJf czKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680051893; x=1682643893; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=goOp2EWOY/iFeUwZXeuST67l+YLf9jyUfJpR8kdA0F8=; b=1YCW7wNyFa1BLsZyoqkjDYOdy+BASeSjUkCb9rL+0x4ufGzzsr30u6gskL+teNHcgl aYTjCpHtfr+hsm7tir7Vh8xqCWJeIxR++4ZQc2w+/HrcNEPLtAQ31nd9UqugqLX55Zza RUDX5cnwp492gKu2zKzkMFYqG9T6bJ/DziHbYCQSS4wFR72tzjlCWzkR71cxLpbdeILE sOIYl7QsZl5aZvPZ+BdQe1hs1yb2yoK6bScECVs0qVePFl7kVQc1hRjTyqXZbhWzSHhN kzKkNxH694ayEtc3XqadrDtsO6qh8UHRgSoHDHCEP+lqBLiKEldMnclKxs6tgLd0BXX2 6Yaw== X-Gm-Message-State: AAQBX9e9APEZGhoIBDeTcugIv0xrvOZY91uOfgFt49o8uXEs8KTyqMUt ip2lOT4RnCoXiq8XwxAffC8= X-Google-Smtp-Source: AKy350Zkcc+kA5vCGtB1FkwcF/7wmFImDxk9XoR2kl7om5QHv2/YRyvxgivZppWG+Zajdmpki4+5Pw== X-Received: by 2002:a05:600c:21cd:b0:3ef:6e1a:5f3a with SMTP id x13-20020a05600c21cd00b003ef6e1a5f3amr7075605wmj.39.1680051893272; Tue, 28 Mar 2023 18:04:53 -0700 (PDT) Received: from localhost ([137.220.119.58]) by smtp.gmail.com with ESMTPSA id k2-20020a5d6e82000000b002c55b0e6ef1sm29114978wrz.4.2023.03.28.18.04.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Mar 2023 18:04:52 -0700 (PDT) From: luca.boccassi@gmail.com 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 20.11.8 Date: Wed, 29 Mar 2023 02:04:38 +0100 Message-Id: <20230329010446.563852-2-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230329010446.563852-1-luca.boccassi@gmail.com> References: <20230322004155.2333903-19-luca.boccassi@gmail.com> <20230329010446.563852-1-luca.boccassi@gmail.com> MIME-Version: 1.0 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 20.11.8 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 03/31/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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/09d45f66377a4973f47af117fccd1a1c4b3f9aa7 Thanks. Luca Boccassi --- >From 09d45f66377a4973f47af117fccd1a1c4b3f9aa7 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 450037aea0..2d6c176029 100644 --- a/drivers/net/mlx5/mlx5_stats.c +++ b/drivers/net/mlx5/mlx5_stats.c @@ -285,10 +285,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 1f4c1081f5..c4217d1eff 100644 --- a/drivers/net/mlx5/mlx5_txpp.c +++ b/drivers/net/mlx5/mlx5_txpp.c @@ -1222,11 +1222,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.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-03-29 01:31:22.610247599 +0100 +++ 0002-net-mlx5-fix-build-with-GCC-12-and-ASan.patch 2023-03-29 01:31:22.466039159 +0100 @@ -1 +1 @@ -From e17840756179410283ef03660578310874432f40 Mon Sep 17 00:00:00 2001 +From 09d45f66377a4973f47af117fccd1a1c4b3f9aa7 Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit e17840756179410283ef03660578310874432f40 ] + @@ -25 +26,0 @@ -Cc: stable@dpdk.org @@ -35 +36 @@ -index f64fa3587b..615e1d073d 100644 +index 450037aea0..2d6c176029 100644 @@ -38 +39 @@ -@@ -288,10 +288,9 @@ mlx5_xstats_get_names(struct rte_eth_dev *dev, +@@ -285,10 +285,9 @@ mlx5_xstats_get_names(struct rte_eth_dev *dev, @@ -51 +52 @@ -index 63d98dbde9..0e1da1d5f5 100644 +index 1f4c1081f5..c4217d1eff 100644 @@ -54 +55 @@ -@@ -1063,11 +1063,9 @@ int mlx5_txpp_xstats_get_names(struct rte_eth_dev *dev __rte_unused, +@@ -1222,11 +1222,9 @@ int mlx5_txpp_xstats_get_names(struct rte_eth_dev *dev __rte_unused,