DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Vemula, Hari KumarX" <hari.kumarx.vemula@intel.com>
To: David Marchand <david.marchand@redhat.com>,
	"Burakov, Anatoly" <anatoly.burakov@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"Pattan, Reshma" <reshma.pattan@intel.com>,
	 "Yigit, Ferruh" <ferruh.yigit@intel.com>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] eal: fix core number validation
Date: Wed, 2 Jan 2019 12:47:52 +0000	[thread overview]
Message-ID: <78C602C4FFDA4546A5AE2C3263E35C870A2FB77E@BGSMSX101.gar.corp.intel.com> (raw)
In-Reply-To: <CAJFAV8yt_m=G=paKxCrAU3HkCScY4fRm1oigqn=cgw-2q-4kKQ@mail.gmail.com>


Hi,

From: David Marchand [mailto:david.marchand@redhat.com]
Sent: Friday, December 21, 2018 2:58 PM
To: Burakov, Anatoly <anatoly.burakov@intel.com>; Vemula, Hari KumarX <hari.kumarx.vemula@intel.com>
Cc: dev@dpdk.org; Pattan, Reshma <reshma.pattan@intel.com>; Yigit, Ferruh <ferruh.yigit@intel.com>; stable@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] eal: fix core number validation


On Fri, Dec 21, 2018 at 10:19 AM Burakov, Anatoly <anatoly.burakov@intel.com<mailto:anatoly.burakov@intel.com>> wrote:
On 21-Dec-18 8:27 AM, David Marchand wrote:
> Since you have identified a potential crash, can you give an example of
> such a crash ?
> Besides, we have tests that check arguments, so an update of the test would
> be nice.

I believe these lcore numbers are used to index the lcore list later,
which would cause out-of-bounds access, which may or may not cause a
crash, depending on how lucky you get.

Sure, that and the fact that my testpmd was doing nothing with them :-).
Anyway, the unit tests missed this case, so we need an update.
And the more I look at those string parsing, the more I think that the service cores parsing has the same issue (copy/paste yay ;-)).

DPDK EAL doesn’t have eal parameter valid/invalid core number check.
For example, if we use following command to launch dpdk testpmd sample, it will return segmentation fault directly:
./x86_64-native-linuxapp-gcc/app/testpmd -l 9999999 -n 4 –-i
EAL: Detected 48 lcore(s)
EAL: Detected 2 NUMA nodes
Segmentation fault (core dumped)

  UT is present for -l command line option to validate core number, but there is no check for higher core list number like above.

--
Hari.


--
David Marchand
--------------------------------------------------------------
Intel Research and Development Ireland Limited
Registered in Ireland
Registered Office: Collinstown Industrial Park, Leixlip, County Kildare
Registered Number: 308263


This e-mail and any attachments may contain confidential material for the sole
use of the intended recipient(s). Any review or distribution by others is
strictly prohibited. If you are not the intended recipient, please contact the
sender and delete all copies.

  reply	other threads:[~2019-01-02 12:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-20 10:00 Hari Kumar Vemula
2018-12-21  8:27 ` David Marchand
2018-12-21  9:19   ` Burakov, Anatoly
2018-12-21  9:28     ` David Marchand
2019-01-02 12:47       ` Vemula, Hari KumarX [this message]
2019-01-02 14:23 ` 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=78C602C4FFDA4546A5AE2C3263E35C870A2FB77E@BGSMSX101.gar.corp.intel.com \
    --to=hari.kumarx.vemula@intel.com \
    --cc=anatoly.burakov@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.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).