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 C39DEA0350 for ; Mon, 21 Feb 2022 16:42:19 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BBA134013F; Mon, 21 Feb 2022 16:42:19 +0100 (CET) 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 DF117410F6 for ; Mon, 21 Feb 2022 16:42:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645458138; 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=avq7Hl+ic6U8K/zlWUx0rl60CTuhXpKkXhLYJbLGJfs=; b=Nvz1ofzMjPfOnANDnpp87JJwbZs/NPYdc7caECSPT9Ecj/o0fAp6ikJO/XvJat3oNIfSr3 fEn3q8O6eokysZ6E1H84hgQrRnUtdo77EL8O+M2E/lg3lCthibm87Z2xKkJVQpa8YEcfve jO2ACSRA9d7L+MRwx3c04bj/nKZqYkI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-401-pk4OsXmgOlGHWlr7Zn3vkA-1; Mon, 21 Feb 2022 10:42:13 -0500 X-MC-Unique: pk4OsXmgOlGHWlr7Zn3vkA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7F290801ADB; Mon, 21 Feb 2022 15:42:12 +0000 (UTC) Received: from rh.Home (unknown [10.39.195.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6503F7E2E8; Mon, 21 Feb 2022 15:42:11 +0000 (UTC) From: Kevin Traynor To: David Marchand Cc: Olivier Matz , dpdk stable Subject: patch 'test/mbuf: fix mbuf data content check' has been queued to stable release 21.11.1 Date: Mon, 21 Feb 2022 15:35:45 +0000 Message-Id: <20220221153625.152324-156-ktraynor@redhat.com> In-Reply-To: <20220221153625.152324-1-ktraynor@redhat.com> References: <20220221153625.152324-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" 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.1 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/26/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/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/6e1bc26cdebb761b8152a58e1b566812498e494c Thanks. Kevin --- >From 6e1bc26cdebb761b8152a58e1b566812498e494c 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 f54d1d7c00..2a037a12da 100644 --- a/app/test/test_mbuf.c +++ b/app/test/test_mbuf.c @@ -2032,6 +2032,4 @@ test_pktmbuf_read_from_offset(struct rte_mempool *pktmbuf_pool) 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) @@ -2055,6 +2053,4 @@ test_pktmbuf_read_from_offset(struct rte_mempool *pktmbuf_pool) 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) -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-02-21 15:22:47.942207110 +0000 +++ 0156-test-mbuf-fix-mbuf-data-content-check.patch 2022-02-21 15:22:44.306704610 +0000 @@ -1 +1 @@ -From 985571b6b41ec49552b3d91c20060236c7c0fecb Mon Sep 17 00:00:00 2001 +From 6e1bc26cdebb761b8152a58e1b566812498e494c 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 f54d1d7c00..2a037a12da 100644 @@ -31 +32 @@ -@@ -2043,6 +2043,4 @@ test_pktmbuf_read_from_offset(struct rte_mempool *pktmbuf_pool) +@@ -2032,6 +2032,4 @@ test_pktmbuf_read_from_offset(struct rte_mempool *pktmbuf_pool) @@ -38 +39 @@ -@@ -2066,6 +2064,4 @@ test_pktmbuf_read_from_offset(struct rte_mempool *pktmbuf_pool) +@@ -2055,6 +2053,4 @@ test_pktmbuf_read_from_offset(struct rte_mempool *pktmbuf_pool)