linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Leon Romanovsky <leon@kernel.org>
Cc: Doug Ledford <dledford@redhat.com>,
	Leon Romanovsky <leonro@nvidia.com>,
	Jiapeng Chong <jiapeng.chong@linux.alibaba.com>,
	linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org,
	Yishai Hadas <yishaih@nvidia.com>,
	"Saleem, Shiraz" <shiraz.saleem@intel.com>
Subject: Re: [PATCH rdma-rc v2] RDMA/core: Sanitize WQ state received from the userspace
Date: Wed, 2 Jun 2021 15:39:39 -0300	[thread overview]
Message-ID: <20210602183939.GA124521@nvidia.com> (raw)
In-Reply-To: <ac41ad6a81b095b1a8ad453dcf62cf8d3c5da779.1621413310.git.leonro@nvidia.com>

On Wed, May 19, 2021 at 11:37:31AM +0300, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@nvidia.com>
> 
> The mlx4 and mlx5 implemented differently the WQ input checks.
> Instead of duplicating mlx4 logic in the mlx5, let's prepare
> the input in the central place.
> 
> The mlx5 implementation didn't check for validity of state input.
> It is not real bug because our FW checked that, but still worth to fix.
> 
> Fixes: f213c0527210 ("IB/uverbs: Add WQ support")
> Reported-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
> ---
> Changelog:
> v2:
>  * Extended commit message
> v1: https://lore.kernel.org/lkml/0433d8013ed3a2ffdd145244651a5edb2afbd75b.1621342527.git.leonro@nvidia.com
>  * Removed IB_WQS_RESET state checks because it is zero and wq states
>    declared as u32, so can't be less than IB_WQS_RESET.
> v0: https://lore.kernel.org/lkml/932f87b48c07278730c3c760b3a707d6a984b524.1621332736.git.leonro@nvidia.com
> ---
>  drivers/infiniband/core/uverbs_cmd.c | 21 +++++++++++++++++++--
>  drivers/infiniband/hw/mlx4/qp.c      |  9 ++-------
>  drivers/infiniband/hw/mlx5/qp.c      |  6 ++----
>  3 files changed, 23 insertions(+), 13 deletions(-)

Applied to for-next, thanks

Jason

      parent reply	other threads:[~2021-06-02 18:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-19  8:37 [PATCH rdma-rc v2] RDMA/core: Sanitize WQ state received from the userspace Leon Romanovsky
2021-06-02  8:19 ` Leon Romanovsky
2021-06-02 18:39 ` Jason Gunthorpe [this message]

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=20210602183939.GA124521@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=dledford@redhat.com \
    --cc=jiapeng.chong@linux.alibaba.com \
    --cc=leon@kernel.org \
    --cc=leonro@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=shiraz.saleem@intel.com \
    --cc=yishaih@nvidia.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).