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 721E9A00BE; Fri, 11 Feb 2022 08:57:01 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 628F7410E5; Fri, 11 Feb 2022 08:57:01 +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 C53E040042 for ; Fri, 11 Feb 2022 08:56:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1644566219; 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: in-reply-to:in-reply-to:references:references; bh=IBxTmAmBBwzDi74wf2+Mqhk/Yt1FwpxNwAtUSB5nIco=; b=SJhXa2Vzzbe8w0pKs6F4ZAOHnYpvwByXgdhpwR6CeRBfvgK3B8W6Oes5ugTdC4vy9ehHE4 lWuKMMf8JsUwIyDUxvc8IOA1Py4vjzQnzZUxX6asFKOBZWvlrBGVwfKLCntIrAwlq58TN0 0F1e0kEUaNwA/dIo52N0dahqcVSXyUE= Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-307-Jsg8EC4bOiapiEFaOuXrIg-1; Fri, 11 Feb 2022 02:56:58 -0500 X-MC-Unique: Jsg8EC4bOiapiEFaOuXrIg-1 Received: by mail-lf1-f71.google.com with SMTP id s18-20020a056512315200b0043fddc0a987so1920742lfi.11 for ; Thu, 10 Feb 2022 23:56:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=IBxTmAmBBwzDi74wf2+Mqhk/Yt1FwpxNwAtUSB5nIco=; b=PVzRYd3EditpRZ5NLOFgj/Zq+qmEIotANpibB6AEPmZp8AVN4wBgJqv1CDufkFAZuZ cGXPsZhlEaDr00s4gETGAWkyUuT84BMyIIXFrYPKYc7gSyZIgSvC0B9BZiA9/SVtf2TY W/t16A0bY4Z8WKKDyt32VHP6n+Z/b7lE8Nu7TrCtod7TT+ipsthDfK0G/TDdjgYIXtZu cvgotAPi1gdQ1MspAPpwxpHCb6zQTr5HWkOphWcT++Yyec1IFzhb831mWjyvD5A91clJ SxBd7IDUAaf3f7CI1M9/Y4BLcGn3Zdo3fQ5JSvB3pxVjdGPTHLpjRDbjWUNPzVy7j0VO tRBA== X-Gm-Message-State: AOAM531/WWfFfqcMnt5oJih0zTs++nU1C9Cw8AIknb070vtpkJACC4wI A9/N4W9nQVVub6JTw+QTuUc4UkL6YZmxzYy+xu10mF61hzqbyatbbJb+0hiZFl3vXccN4ZVxNFL eENUf8RZk4ha7TLoT2vE= X-Received: by 2002:a05:6512:4014:: with SMTP id br20mr371611lfb.217.1644566216736; Thu, 10 Feb 2022 23:56:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJxGxlu0MFPqRz01AvPlyePO1vguIQYBk96F9IicZNO56DAoP7zG6m0bZ7dU3SJ8pW9QkRxJkqH93Wg20EBUg1s= X-Received: by 2002:a05:6512:4014:: with SMTP id br20mr371602lfb.217.1644566216540; Thu, 10 Feb 2022 23:56:56 -0800 (PST) MIME-Version: 1.0 References: <20220203093912.25032-1-david.marchand@redhat.com> In-Reply-To: From: David Marchand Date: Fri, 11 Feb 2022 08:56:45 +0100 Message-ID: Subject: Re: [PATCH] test/mbuf: fix mbuf data content check To: David Marchand Cc: dev , Dmitry Kozlyuk , dpdk stable , Reshma Pattan , Olivier Matz Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Thu, Feb 3, 2022 at 10:47 AM Olivier Matz wrote: > > On Thu, Feb 03, 2022 at 10:39:12AM +0100, David Marchand wrote: > > 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") > > Cc: stable@dpdk.org > > > > Signed-off-by: David Marchand > Acked-by: Olivier Matz Applied. -- David Marchand