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 8B850A034C for ; Fri, 25 Feb 2022 18:18:13 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 86FBD41151; Fri, 25 Feb 2022 18:18:13 +0100 (CET) Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) by mails.dpdk.org (Postfix) with ESMTP id C1E384114A for ; Fri, 25 Feb 2022 18:18:12 +0100 (CET) Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id D47833FCAB for ; Fri, 25 Feb 2022 17:18:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1645809490; bh=fBPzcvReGVoo4iUTRkUKrNpYYJaUbhwweQTGOKX468g=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=QUpLqOUdkKe7N04VCQxgkD69odLEgX/zqvYISjm1rbScaoybWZsWUGZfsY/sgqEQp 1HPDTkaFB9pYGeaJMc05Ov1K/OJxPmXQ4njdVIO/8d8XPfpLfvFj1oiPTGExwFh/47 0pkFYtDq9xFnw+22eFYt/hGOaTF2gDaw2anywClgY2aW2b+kkSxuOZlQRmVuwDEQTE 4yUDkwH72iTle3v/DYwgYkqcZnK3KMji9jb1wx/IVLT0//JwNCWnj0GOHIcR4itMeR IHxuK3Et//8kiAozWA5G1IaZd6UKAx84bR0uBoQk9J+FTG4fATTihwln/Hp/WqzGZE gCUWAF7xRsqoA== Received: by mail-wm1-f71.google.com with SMTP id ay7-20020a05600c1e0700b003813d7a7d03so792571wmb.1 for ; Fri, 25 Feb 2022 09:18:10 -0800 (PST) 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=fBPzcvReGVoo4iUTRkUKrNpYYJaUbhwweQTGOKX468g=; b=31XvHwqM0iN005e99VhHr/MPMXDKfVsMW5Jiy8bmVcGp8GEQiZZluWf3LrcceUgPjb V83H4NtUo6sHaxyE0IKBe19uDxsMqPjc4D3cwPMxIcW5M7LX/5jWpRTLS1xmB7xA7VLN g2enDhkfyW1da2FgXZSdmBCAKRvC9e3Rot2qPkMWsBXTgUNgl2QYhAT0uOltYR2qbSb+ 25P6V1GpnWBk9OXMfX1yyzZdwhAPLX804jKwew+f0MvyJte+xBpBxveqdCtgkRH8MELj 7xH16Or2XIqPpngXdgxzSzG51l7bwPzIQPtnKfNpN+dw/BFAc6vFudT5VV7YA22V3pl0 u6cA== X-Gm-Message-State: AOAM5310ycO3ROeCeNcnn4EHs1TTwxJA6viEcDXo/z56GzPkJwSYc297 Ck0zAJ2KkMTddhcaADozvRT/UfZmWr06Sx7kuKPgCRNVEDVdk3aZSZnYNfV5CXXs2aNEB+G7x7Z xFT5cTMKKgMapCzNv4LHpsytL X-Received: by 2002:a05:600c:4108:b0:380:dd99:8a74 with SMTP id j8-20020a05600c410800b00380dd998a74mr3539904wmi.91.1645809489583; Fri, 25 Feb 2022 09:18:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJxisCJcSDfuWhzDfPnfwsdr9gZ8WvQ1FCObal896JWsXsKbVsjagqippnCfBNuPIShnZ/tSNA== X-Received: by 2002:a05:600c:4108:b0:380:dd99:8a74 with SMTP id j8-20020a05600c410800b00380dd998a74mr3539894wmi.91.1645809489346; Fri, 25 Feb 2022 09:18:09 -0800 (PST) Received: from Keschdeichel.fritz.box (068-133-067-156.ip-addr.inexio.net. [156.67.133.68]) by smtp.gmail.com with ESMTPSA id s11-20020a5d69cb000000b001ef5b49d68esm3039655wrw.37.2022.02.25.09.18.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Feb 2022 09:18:09 -0800 (PST) From: christian.ehrhardt@canonical.com To: David Marchand Cc: Olivier Matz , dpdk stable Subject: patch 'test/mbuf: fix mbuf data content check' has been queued to stable release 19.11.12 Date: Fri, 25 Feb 2022 18:15:41 +0100 Message-Id: <20220225171550.3499040-48-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.35.0 In-Reply-To: <20220225171550.3499040-1-christian.ehrhardt@canonical.com> References: <20220225171550.3499040-1-christian.ehrhardt@canonical.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 19.11.12 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/27/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/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/0a8fdfb70e5c3bc49ce52b02cf94bbd367b304bd Thanks. Christian Ehrhardt --- >From 0a8fdfb70e5c3bc49ce52b02cf94bbd367b304bd 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 0208c31196..f231d37ffd 100644 --- a/app/test/test_mbuf.c +++ b/app/test/test_mbuf.c @@ -2011,8 +2011,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); @@ -2034,8 +2032,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.35.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-02-25 16:58:46.088848652 +0100 +++ 0048-test-mbuf-fix-mbuf-data-content-check.patch 2022-02-25 16:58:44.292990460 +0100 @@ -1 +1 @@ -From 985571b6b41ec49552b3d91c20060236c7c0fecb Mon Sep 17 00:00:00 2001 +From 0a8fdfb70e5c3bc49ce52b02cf94bbd367b304bd 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 0208c31196..f231d37ffd 100644 @@ -31 +32 @@ -@@ -2042,8 +2042,6 @@ test_pktmbuf_read_from_offset(struct rte_mempool *pktmbuf_pool) +@@ -2011,8 +2011,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) +@@ -2034,8 +2032,6 @@ test_pktmbuf_read_from_offset(struct rte_mempool *pktmbuf_pool)