All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Parav Pandit <parav@mellanox.com>,
	netdev@vger.kernel.org, Leon Romanovsky <leon@kernel.org>,
	Eli Cohen <eli@mellanox.com>, Doug Ledford <dledford@redhat.com>,
	Jason Gunthorpe <jgg@ziepe.ca>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	"kernel-janitors@vger.kernel.org"
	<kernel-janitors@vger.kernel.org>
Subject: Re: [PATCH] IB/mlx5: add checking for "vf" from do_setvfinfo()
Date: Wed, 24 Apr 2019 17:36:16 -0700	[thread overview]
Message-ID: <20190424173616.03e69af2@cakuba.netronome.com> (raw)
In-Reply-To: <20190424140820.GB14798@kadam>

On Wed, 24 Apr 2019 17:08:20 +0300, Dan Carpenter wrote:
> To me making "vf" a u32 throughout seems like a good idea but it's an
> extensive patch and I'm not really able to test it at all.  But maybe
> there is a better place to check for negatives.  Or maybe we are already
> checking for negatives and I haven't seen it.  (I don't know this code
> very well at all).

Could we please add the checks in the core?

We already have the infra in place for calculating dump sizes - i.e.

int num_vfs = dev_num_vf(dev->dev.parent);

We just need to validate the set params.


Callback parameters should really be validated by the core to the extent
possible, unfortunately driver authors have little incentive to improve
that once an API is implemented, realistically we all need to support
old kernels wouldn't do the checking..

WARNING: multiple messages have this Message-ID (diff)
From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Parav Pandit <parav@mellanox.com>,
	netdev@vger.kernel.org, Leon Romanovsky <leon@kernel.org>,
	Eli Cohen <eli@mellanox.com>, Doug Ledford <dledford@redhat.com>,
	Jason Gunthorpe <jgg@ziepe.ca>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	"kernel-janitors@vger.kernel.org"
	<kernel-janitors@vger.kernel.org>
Subject: Re: [PATCH] IB/mlx5: add checking for "vf" from do_setvfinfo()
Date: Thu, 25 Apr 2019 00:36:16 +0000	[thread overview]
Message-ID: <20190424173616.03e69af2@cakuba.netronome.com> (raw)
In-Reply-To: <20190424140820.GB14798@kadam>

On Wed, 24 Apr 2019 17:08:20 +0300, Dan Carpenter wrote:
> To me making "vf" a u32 throughout seems like a good idea but it's an
> extensive patch and I'm not really able to test it at all.  But maybe
> there is a better place to check for negatives.  Or maybe we are already
> checking for negatives and I haven't seen it.  (I don't know this code
> very well at all).

Could we please add the checks in the core?

We already have the infra in place for calculating dump sizes - i.e.

int num_vfs = dev_num_vf(dev->dev.parent);

We just need to validate the set params.


Callback parameters should really be validated by the core to the extent
possible, unfortunately driver authors have little incentive to improve
that once an API is implemented, realistically we all need to support
old kernels wouldn't do the checking..

  parent reply	other threads:[~2019-04-25  0:36 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-12 17:55 [PATCH] IB/mlx5: add checking for "vf" from do_setvfinfo() Dan Carpenter
2019-04-12 20:25 ` Parav Pandit
2019-04-15  9:32 ` Dan Carpenter
2019-04-15  9:46 ` Dan Carpenter
2019-04-15 20:04 ` Parav Pandit
2019-04-16  8:21 ` Dan Carpenter
2019-04-16 22:54 ` Parav Pandit
2019-04-22  8:08 ` Dan Carpenter
2019-04-22 15:09 ` Parav Pandit
2019-04-23 15:49 ` Dan Carpenter
2019-04-23 22:32 ` Parav Pandit
2019-04-24 14:08   ` Dan Carpenter
2019-04-24 14:08     ` Dan Carpenter
2019-04-24 14:24     ` Jason Gunthorpe
2019-04-24 14:24       ` Jason Gunthorpe
2019-04-24 22:12       ` Parav Pandit
2019-04-25  0:36     ` Jakub Kicinski [this message]
2019-04-25  0:36       ` Jakub Kicinski
2019-04-25  6:15     ` Parav Pandit
2019-09-24  9:21       ` Dan Carpenter
2019-09-24  9:21         ` Dan Carpenter
2019-09-25 17:14         ` Parav Pandit

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=20190424173616.03e69af2@cakuba.netronome.com \
    --to=jakub.kicinski@netronome.com \
    --cc=dan.carpenter@oracle.com \
    --cc=dledford@redhat.com \
    --cc=eli@mellanox.com \
    --cc=jgg@ziepe.ca \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=parav@mellanox.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.