All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@mellanox.com>
To: Leon Romanovsky <leon@kernel.org>
Cc: Doug Ledford <dledford@redhat.com>,
	Yishai Hadas <yishaih@mellanox.com>,
	RDMA mailing list <linux-rdma@vger.kernel.org>,
	Achiad Shochat <achiad@mellanox.com>,
	Saeed Mahameed <saeedm@mellanox.com>,
	linux-netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH mlx5-next] IB/mlx5: Prevent allocating UMEM and UCTX as some general object
Date: Thu, 20 Dec 2018 17:02:12 +0000	[thread overview]
Message-ID: <20181220170205.GD29267@mellanox.com> (raw)
In-Reply-To: <20181220062133.GH13943@mtr-leonro.mtl.com>

On Thu, Dec 20, 2018 at 08:21:33AM +0200, Leon Romanovsky wrote:
> On Wed, Dec 19, 2018 at 07:14:12PM +0000, Jason Gunthorpe wrote:
> > On Wed, Dec 19, 2018 at 04:28:15PM +0200, Leon Romanovsky wrote:
> > > From: Yishai Hadas <yishaih@mellanox.com>
> > >
> > > The driver needs to prevent a user space application to create a
> > > UMEM and UCTX via the general object command.
> > >
> > > The UMEM must go through the kernel UMEM_REG method to prevent the user
> > > from setting physical addresses by himself.  The UCTX is some internal
> > > kernel object and shouldn't be exposed.
> > >
> > > As of not being any more part of the general object the caps bits were
> > > moved to be some log_xxx indication in the general HCA caps, 0 means not
> > > supported.
> > >
> > > The firmware code was adapted as well to match the above.
> >
> > This commit message is a bit wonky.. how about
> >
> > IB/mlx5: Use the correct commands for UMEM and UCTX allocation
> >
> > During testing the command format was changed to close a security
> > hole. Revise the driver to use the command format that will actually
> > be supported in GA firmware.
> >
> > Both the UMEM and UCTX are intended only for use by the kernel and
> > cannot be executed using a general command.
> >
> > Since the UMEM and CTX are not part of the general object the caps
> > bits were moved to be some log_xxx location in the general HCA caps.
> 
> I'm fine with this description too.
> 
> >
> > > Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
> > > Reviewed-by: Achiad Shochat <achiad@mellanox.com>
> > > Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
> >
> > Also add a fixes line please, any kernel with the devx needs this
> > patch to work with GA firmware.
> 
> Fixes: a8b92ca1b0e5 ("IB/mlx5: Introduce DEVX")
> 
> >
> > >  drivers/infiniband/hw/mlx5/devx.c | 34 ++++++++---------
> > >  drivers/infiniband/hw/mlx5/main.c |  3 +-
> > >  include/linux/mlx5/mlx5_ifc.h     | 62 +++++++++++++++++++++--------

  reply	other threads:[~2018-12-20 17:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-19 14:28 [PATCH mlx5-next] IB/mlx5: Prevent allocating UMEM and UCTX as some general object Leon Romanovsky
2018-12-19 19:14 ` Jason Gunthorpe
2018-12-20  6:21   ` Leon Romanovsky
2018-12-20 17:02     ` Jason Gunthorpe [this message]
2018-12-20 17:13       ` Leon Romanovsky
2018-12-20 21:01 ` Jason Gunthorpe
2018-12-21  9:29   ` Achiad Shochat

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=20181220170205.GD29267@mellanox.com \
    --to=jgg@mellanox.com \
    --cc=achiad@mellanox.com \
    --cc=dledford@redhat.com \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=saeedm@mellanox.com \
    --cc=yishaih@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.