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 75DDCA00C2; 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 1820240143; Thu, 3 Feb 2022 10:47:25 +0100 (CET) Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) by mails.dpdk.org (Postfix) with ESMTP id 22BF240140 for ; Thu, 3 Feb 2022 10:47:23 +0100 (CET) Received: by mail-wm1-f54.google.com with SMTP id l67-20020a1c2546000000b00353951c3f62so859793wml.5 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=0B5N9Hd94lYJc62sym2BoR+YfP91vxiN5U+q2zUc+AIubIY+J3wmzvOz4GlYDx+gho 9ue1NWOxWzUGCZJKS5cvkZoDtBLj1/fRYndTrYAW57bFcbvjIQNnQk22Io3gZ5X08Z3S jfGRKfqiJwIxDWAjt9dwCmrmV+bAuZfYQS+iXPYc3wSAfIB6lUBINQOwmqw2gXamMaSH qazZl7WX4bLiYod6vEyOP0lCDDYrA/XSisPPwYCu0DvZjotrOS4zGWMLgqRueDmfZr8p LVaNvhmD9UYaDlGcacl92kkwFtDht7/l8OjZxEMHF2GMKT67CEj8GKUoyrvpN+Wm9gZZ Xnmw== X-Gm-Message-State: AOAM533wn1uRXIYyVvQQEq73ohDPI/qqEhHRUZr/MvfXFbMQEIv6y0oB WJPBvn+gpmt281segfMbM6Jdeg== 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: 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 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