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 605C6A00C2 for ; Fri, 11 Feb 2022 08:57:02 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4E689426E0; Fri, 11 Feb 2022 08:57:02 +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 E838A410E5 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-lj1-f198.google.com (mail-lj1-f198.google.com [209.85.208.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-139-QtjtVxW2OnGPyaKpRIHKVQ-1; Fri, 11 Feb 2022 02:56:58 -0500 X-MC-Unique: QtjtVxW2OnGPyaKpRIHKVQ-1 Received: by mail-lj1-f198.google.com with SMTP id y19-20020a2e9793000000b0023f158d6cc0so3775564lji.10 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=otrIkFfyO2Di2a2lljithRUrZ+LC6+QSm5tgAodkiQXOq106FDrIqpgog690+QGMrN mXbO/5/qYlQImNBhyQMd6OzVe2u/rn5+ckZ1TIKq+B55uE/mLYE/mQzySuoKnktDoFvA jPhhh/r7gniLp7Bk9s/OBxQHvejO17fjLaqXrcvln6aXQ+rSEl+25PbypIdonKCloQ+p Mok3Rp91H84K5tlWA4Upxcr/iLo1K+fEvLmNv1aT8QRX7q7wtS/N5SM2IwvbbkU837Fq rMsfsCHTzQKJYz1UfVSIywacgiVH4KgT9QwQLF8M2+Dg1UUFOX1r6Y0vIpi1qVDt09QG uClQ== X-Gm-Message-State: AOAM5334avHjJrxaqOIDSZaAFszvC3CX0guXHqbJWFBQRBiI6JKfgOzs B6kZfrkBRHyv7MkaHCFJ6I9tdVD1T7uH4XV53QyGnAeHIgYbTxp1Nbr5Y8+yy7NRC3qDOs7S6X9 PS9Rj3sNsrbQkksQhgxVAjZ0= X-Received: by 2002:a05:6512:4014:: with SMTP id br20mr371610lfb.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: 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 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