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 B85BEA0032 for ; Fri, 18 Feb 2022 13:45:06 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B380A40395; Fri, 18 Feb 2022 13:45:06 +0100 (CET) Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com [209.85.208.53]) by mails.dpdk.org (Postfix) with ESMTP id 48BAC40141 for ; Fri, 18 Feb 2022 13:45:05 +0100 (CET) Received: by mail-ed1-f53.google.com with SMTP id z22so15291647edd.1 for ; Fri, 18 Feb 2022 04:45:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BHr50f2uC93eDDQC2FjPtSfWNAz5n0F2WldKK3NVJ4g=; b=Xu9Y4iFQhqnZrYU6cD40LEJT7IbHwxVcVLCdhAJE4nBVSILBUM5Bx1QOtCQYIlWw4f VJmQKLE+ILKHDf3Fy61DNHjREElkJTHSs4G7SF+tMXYWU5tJJQHrXgV3Eu7wyeRgior6 TE2+dg7+Wb27/LIQU0v7TRY/XIBPgOI1hsud9eeWL5QOpbGn0aznqVt/71A+I3GQkPqH iPum294Q02i4xDdAxaskstooI8My1UlobTZNHfsVjnsp3M9i+SDtZJ6PCOGMyXBUxsn/ HcxK+1y4F9gJF2veEuKRhENNXNcd3NXTsFTC3+wKS40E2aqPWciiBRjBrefCiYkS7Mtr IRew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BHr50f2uC93eDDQC2FjPtSfWNAz5n0F2WldKK3NVJ4g=; b=pr1eS/T/eLZZAqUpzBU/AlxOaunr4y10xpNOOeQTW6hYHqTkutAy6iGl7V6OFoyAeV Q/ftvIPn8IXV1SAxVnDkujPRkWQjhPiiWLz4FbFenFoJXZfswwTRFOpFq+tlAVIkif6q FhECnKnjHEJbPIvxQAVLxvURP8L8yg7OY8rofEY/+ETjuxnq4ucEA+oNmp/Tnfc1bm6G ZzL5eG+HPaEdIzYLZ4DyqnqRvR/NXd60MkfQwQj7wvvYDnKlVB3/+ShrY7c744RIV3vB sWwzwn5rL5l/IQB0nkRuItl83a8IjMwBeya8FOBHDpXJEPEPuGh/2NE44XQ95tP+LG37 eQmQ== X-Gm-Message-State: AOAM532Jq/IaMsuy4Mn1WwH3NLXuiZqO3oYF4iRD9ga+O+v00B+QFfga Obv0ZdiJuzqYnWroJsam6UL45/ld0Wz56XTC X-Google-Smtp-Source: ABdhPJxMox3aDYdDjSl7zUvmzsMDbdeNieLnIJc2yoMnFfOxCkEGjqb/SMWJxy3kNvVTgFhKEwbf+A== X-Received: by 2002:a05:6402:3594:b0:40a:eec6:a0c with SMTP id y20-20020a056402359400b0040aeec60a0cmr8112263edc.206.1645188304932; Fri, 18 Feb 2022 04:45:04 -0800 (PST) Received: from localhost ([137.220.125.106]) by smtp.gmail.com with ESMTPSA id l19sm4884326edb.87.2022.02.18.04.45.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Feb 2022 04:45:04 -0800 (PST) From: luca.boccassi@gmail.com To: David Marchand Cc: Olivier Matz , dpdk stable Subject: patch 'test/mbuf: fix mbuf data content check' has been queued to stable release 20.11.5 Date: Fri, 18 Feb 2022 12:39:15 +0000 Message-Id: <20220218123931.1749595-106-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220218123931.1749595-1-luca.boccassi@gmail.com> References: <20220218123931.1749595-1-luca.boccassi@gmail.com> MIME-Version: 1.0 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.5 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/20/22. 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/b8e818df2acd8e7f4ee2e8ca8edfb24bb7f1c7ea Thanks. Luca Boccassi --- >From b8e818df2acd8e7f4ee2e8ca8edfb24bb7f1c7ea Mon Sep 17 00:00:00 2001 From: David Marchand Date: Thu, 3 Feb 2022 10:39:12 +0100 Subject: [PATCH] test/mbuf: fix mbuf data content check [ upstream commit 985571b6b41ec49552b3d91c20060236c7c0fecb ] When allocating a mbuf, its data content is most of the time zero'd but nothing ensures this. This is especially wrong when building with RTE_MALLOC_DEBUG, where data is poisoned to 0x6b on free. This test reserves MBUF_TEST_DATA_LEN2 bytes in the mbuf data segment, and sets this data to 0xcc. Calling strlen(), the test may try to read more than MBUF_TEST_DATA_LEN2 which has been noticed when memory had been poisoned. The mbuf data content is checked right after, so we can simply remove strlen(). Fixes: 7b295dceea07 ("test/mbuf: add unit test cases") Signed-off-by: David Marchand Acked-by: Olivier Matz --- app/test/test_mbuf.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c index 1bfaa029ba..f0dd693e94 100644 --- a/app/test/test_mbuf.c +++ b/app/test/test_mbuf.c @@ -2030,8 +2030,6 @@ test_pktmbuf_read_from_offset(struct rte_mempool *pktmbuf_pool) NULL); if (data_copy == NULL) GOTO_FAIL("%s: Error in reading packet data!\n", __func__); - if (strlen(data_copy) != MBUF_TEST_DATA_LEN2 - 5) - GOTO_FAIL("%s: Incorrect data length!\n", __func__); for (off = 0; off < MBUF_TEST_DATA_LEN2 - 5; off++) { if (data_copy[off] != (char)0xcc) GOTO_FAIL("Data corrupted at offset %u", off); @@ -2053,8 +2051,6 @@ test_pktmbuf_read_from_offset(struct rte_mempool *pktmbuf_pool) data_copy = rte_pktmbuf_read(m, hdr_len, 0, NULL); if (data_copy == NULL) GOTO_FAIL("%s: Error in reading packet data!\n", __func__); - if (strlen(data_copy) != MBUF_TEST_DATA_LEN2) - GOTO_FAIL("%s: Corrupted data content!\n", __func__); for (off = 0; off < MBUF_TEST_DATA_LEN2; off++) { if (data_copy[off] != (char)0xcc) GOTO_FAIL("Data corrupted at offset %u", off); -- 2.30.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-02-18 12:37:41.860460623 +0000 +++ 0106-test-mbuf-fix-mbuf-data-content-check.patch 2022-02-18 12:37:37.838795226 +0000 @@ -1 +1 @@ -From 985571b6b41ec49552b3d91c20060236c7c0fecb Mon Sep 17 00:00:00 2001 +From b8e818df2acd8e7f4ee2e8ca8edfb24bb7f1c7ea Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 985571b6b41ec49552b3d91c20060236c7c0fecb ] + @@ -19 +20,0 @@ -Cc: stable@dpdk.org @@ -28 +29 @@ -index f762befb69..d37aefd2e9 100644 +index 1bfaa029ba..f0dd693e94 100644 @@ -31 +32 @@ -@@ -2042,8 +2042,6 @@ test_pktmbuf_read_from_offset(struct rte_mempool *pktmbuf_pool) +@@ -2030,8 +2030,6 @@ test_pktmbuf_read_from_offset(struct rte_mempool *pktmbuf_pool) @@ -40 +41 @@ -@@ -2065,8 +2063,6 @@ test_pktmbuf_read_from_offset(struct rte_mempool *pktmbuf_pool) +@@ -2053,8 +2051,6 @@ test_pktmbuf_read_from_offset(struct rte_mempool *pktmbuf_pool)