DPDK patches and discussions
 help / color / mirror / Atom feed
From: Olivier Matz <olivier.matz@6wind.com>
To: David Marchand <david.marchand@redhat.com>
Cc: dev@dpdk.org, dkozlyuk@nvidia.com, stable@dpdk.org,
	Reshma Pattan <reshma.pattan@intel.com>
Subject: Re: [PATCH] test/mbuf: fix mbuf data content check
Date: Thu, 3 Feb 2022 10:47:21 +0100	[thread overview]
Message-ID: <YfukqQNLoR73D3yz@platinum> (raw)
In-Reply-To: <20220203093912.25032-1-david.marchand@redhat.com>

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 <david.marchand@redhat.com>

Acked-by: Olivier Matz <olivier.matz@6wind.com>

  reply	other threads:[~2022-02-03  9:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-03  9:39 David Marchand
2022-02-03  9:47 ` Olivier Matz [this message]
2022-02-11  7:56   ` David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YfukqQNLoR73D3yz@platinum \
    --to=olivier.matz@6wind.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=dkozlyuk@nvidia.com \
    --cc=reshma.pattan@intel.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).