DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Cc: dev@dpdk.org, david.marchand@6wind.com
Subject: Re: [dpdk-dev] [PATCH v5] eal: out-of-bounds write
Date: Mon, 20 Jun 2016 11:14:41 +0200	[thread overview]
Message-ID: <3354397.Tgjzuq1405@xps13> (raw)
In-Reply-To: <1466088738-16990-1-git-send-email-slawomirx.mrozowicz@intel.com>

2016-06-16 16:52, Slawomir Mrozowicz:
> Overrunning array mcfg->memseg of 256 44-byte elements
> at element index 257 using index j.
> Fixed by add condition with message information.
> 
> Fixes: af75078fece3 ("first public release")
> Coverity ID 13282

Please use this formatting:
Coverity issue: 13282

> Signed-off-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
> ---
> v5:
> - update message
> v4:
> - remove check condition from loop
> v3:
> - add check condition inside and outside the loop
> v2:
> - add message information

The changelog is OK.
Please use --in-reply-to when making a new revision to keep them
in the same thread.

> --- a/lib/librte_eal/linuxapp/eal/eal_memory.c
> +++ b/lib/librte_eal/linuxapp/eal/eal_memory.c
> @@ -1301,6 +1301,14 @@ rte_eal_hugepage_init(void)
>  			break;
>  		}
>  

No newline needed here. The check is directly related to the
previous loop.

> +	if (j >= RTE_MAX_MEMSEG) {

It is out of the scope of this patch but I REALLY HATE this variable j.
Considering a more meaningful rename would be a nice patch.

> +		RTE_LOG(ERR, EAL,
> +			"All memory segments exhausted by IVSHMEM. "

There is no evidence that it is related to IVSHMEM.
"Not enough memory segments." would be more appropriate.

> +			"Try recompiling with larger RTE_MAX_MEMSEG "
> +			"then current %d\n", RTE_MAX_MEMSEG);

then -> than

  reply	other threads:[~2016-06-20  9:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-16 14:52 Slawomir Mrozowicz
2016-06-20  9:14 ` Thomas Monjalon [this message]
2016-06-20  9:38   ` Sergio Gonzalez Monroy
2016-06-20 10:09     ` Thomas Monjalon
2016-06-20 11:29       ` Sergio Gonzalez Monroy
2016-07-21 12:01         ` Mrozowicz, SlawomirX
2016-07-21 12:54           ` Thomas Monjalon

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=3354397.Tgjzuq1405@xps13 \
    --to=thomas.monjalon@6wind.com \
    --cc=david.marchand@6wind.com \
    --cc=dev@dpdk.org \
    --cc=slawomirx.mrozowicz@intel.com \
    /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).