DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: Bruce Richardson <bruce.richardson@intel.com>,
	Thomas Monjalon <thomas@monjalon.net>,
	 Mohammad Abdul Awal <mohammad.abdul.awal@intel.com>,
	dev <dev@dpdk.org>,  Andrew Rybchenko <arybchenko@solarflare.com>,
	dpdk stable <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH 1/3] ethdev: fix null pointer checking
Date: Wed, 3 Apr 2019 19:32:16 +0200	[thread overview]
Message-ID: <CAJFAV8wJB+th6HCOnBDDv=t_5Lp_w6eVgkCMaCJRt6NRc76xdg@mail.gmail.com> (raw)
Message-ID: <20190403173216.Sr7O-P6dJSv56kyetZeAqw4LZggmatDsF1RAIlNdxsc@z> (raw)
In-Reply-To: <938cd677-9563-b29e-a4ab-3c2d84c519d8@intel.com>

On Wed, Apr 3, 2019 at 6:53 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:

> On 4/3/2019 5:41 PM, Bruce Richardson wrote:
> > On Wed, Apr 03, 2019 at 05:35:22PM +0100, Ferruh Yigit wrote:
> >> On 4/3/2019 5:27 PM, Thomas Monjalon wrote:
> >>> 03/04/2019 18:07, Mohammad Abdul Awal:
> >>>> Null value for parameter name will cause segfault for the strnlen and
> >>>> strcmp functions.
> >>>
> >>> I'm not sure we want such obvious checks for all APIs.  Here I would
> >>> say yes.
> >>
> >> These are internal functions, not APIs.  I am for verifying input for
> >> (all) APIs but not for internal functions, drivers should call them and
> >> they are in our control, if they are passing NULL we can fix them :)
> >>
> > True, but if these are control path or init time code paths rather than
> > data path APIs, I don't see the harm in putting in the checks.
>
> No harm from performance point of view, agree, but also looks unnecessary
> to me.
>

+1
All the more when you see the following patches that adds input checks in
the faulty/too naive drivers.


-- 
David Marchand

  parent reply	other threads:[~2019-04-03 17:32 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-03 16:07 Mohammad Abdul Awal
2019-04-03 16:07 ` Mohammad Abdul Awal
2019-04-03 16:27 ` Thomas Monjalon
2019-04-03 16:27   ` Thomas Monjalon
2019-04-03 16:35   ` Ferruh Yigit
2019-04-03 16:35     ` Ferruh Yigit
2019-04-03 16:41     ` Bruce Richardson
2019-04-03 16:41       ` Bruce Richardson
2019-04-03 16:52       ` Ferruh Yigit
2019-04-03 16:52         ` Ferruh Yigit
2019-04-03 17:32         ` David Marchand [this message]
2019-04-03 17:32           ` David Marchand
2019-04-04  8:33           ` Mohammad Abdul Awal
2019-04-04  8:33             ` Mohammad Abdul Awal
2019-04-03 17:30     ` Awal, Mohammad Abdul
2019-04-03 17:30       ` Awal, Mohammad Abdul
2019-04-03 18:42       ` Thomas Monjalon
2019-04-03 18:42         ` Thomas Monjalon
2019-04-03 18:50 ` Stephen Hemminger
2019-04-03 18:50   ` Stephen Hemminger

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='CAJFAV8wJB+th6HCOnBDDv=t_5Lp_w6eVgkCMaCJRt6NRc76xdg@mail.gmail.com' \
    --to=david.marchand@redhat.com \
    --cc=arybchenko@solarflare.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=mohammad.abdul.awal@intel.com \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    /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).