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 D41B2A00C3 for ; Thu, 3 Feb 2022 10:47:25 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C4AF04068A; Thu, 3 Feb 2022 10:47:25 +0100 (CET) Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) by mails.dpdk.org (Postfix) with ESMTP id 2D40F40143 for ; Thu, 3 Feb 2022 10:47:23 +0100 (CET) Received: by mail-wm1-f52.google.com with SMTP id 83so305408wmc.1 for ; Thu, 03 Feb 2022 01:47:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=ZDsP3o0Swvtx2WaKdPbPW0igc+RJJItbECAbaMJP3UU=; b=FnO6sxaof1j40orelWpFtGz6DJov5RsF2gsxpis7uwLSy8juCp28hfd7Q1Wi84GMNk VrmCXvWzYP3TZlyB+wXT8GakGpjTw5i2yU1DT9hHRugagiOBz93JEkGoz5J06HjT08Fs ZXYke0UcCr1ohZpwAMASnbQkQ1mS/fI39LWa4sxc7mQ1nNp8RelDYNoVEQwqC+qzh0Du fHTrUIo4+dqKQIMgilIdvEXukUD9pm0KvJWVp6Vtfr9dEaCBFFXBoMuKmLW+pW5WdKJ2 nRB2+EiWvKx3cma1VTMsMxxr8F9nrhRu1Jb/Xj6mya8ypYK3RYzuIXEFqDOXqWJBo0Nr +9hQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=ZDsP3o0Swvtx2WaKdPbPW0igc+RJJItbECAbaMJP3UU=; b=Q8HJH4+B4A0FUAb5q5668EEXfeLkCEyDBXbVBa1EGqVMsufcupXLiDYvLsydWaQCy4 ahGvqwI7MxkYpLPGCSbdwhPMX4NqDPGi7mxznPr2dsc3pkrXA8C+KRcseahZ/kVx5vTm WMKQ6fUhqbpCg3sfnBQyCd8a8v/68gax12Ly688IS0AC+/PiTnff2697gAOalzVgTzE4 CqGe/vAVXD+7JYL9UcChx3MdqNK8OY012SVk1QaiAR4KEPshHLOZ0WUpLCglhkU8Qk7P uEQNswb1SddVzlB6s19h4gKP7sfkqQLyRrbEb0Kj8qsqbqkJg0Pa12+H1AafyYkBH2VT K6yQ== X-Gm-Message-State: AOAM532WcLc5bYEPqyngC7TZ9eGx9FUCtDM2d1fM8bWkq6Y0/YiCAt4y 9zFZPxBLrBl32ROS+lXZdi9JXQ== X-Google-Smtp-Source: ABdhPJy843+oMTR9M+wVrTkaizR2v0RfGAidR9jtiGSan1tK/bd1KUrvIwTDLdDCwpTczNiVwS1SbQ== X-Received: by 2002:a05:600c:4e4a:: with SMTP id e10mr9789845wmq.113.1643881642870; Thu, 03 Feb 2022 01:47:22 -0800 (PST) Received: from 6wind.com ([2a01:e0a:5ac:6460:c065:401d:87eb:9b25]) by smtp.gmail.com with ESMTPSA id l20sm851131wmi.12.2022.02.03.01.47.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Feb 2022 01:47:22 -0800 (PST) Date: Thu, 3 Feb 2022 10:47:21 +0100 From: Olivier Matz To: David Marchand Cc: dev@dpdk.org, dkozlyuk@nvidia.com, stable@dpdk.org, Reshma Pattan Subject: Re: [PATCH] test/mbuf: fix mbuf data content check Message-ID: References: <20220203093912.25032-1-david.marchand@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220203093912.25032-1-david.marchand@redhat.com> 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 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