Linux-RDMA Archive on lore.kernel.org
 help / color / Atom feed
From: Adit Ranadive <aditr@vmware.com>
To: Jason Gunthorpe <jgg@ziepe.ca>
Cc: "dledford@redhat.com" <dledford@redhat.com>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	Bryan Tan <bryantan@vmware.com>,
	Pv-drivers <Pv-drivers@vmware.com>
Subject: Re: [PATCH for-next v1] RDMA/vmw_pvrdma: Use resource ids from physical device if available
Date: Sat, 12 Oct 2019 07:03:55 +0000
Message-ID: <8F02F753-B71A-4F73-83D8-D6224D6C4F6B@vmware.com> (raw)
In-Reply-To: <20191008181544.GA2880@ziepe.ca>

On 10/8/19, 11:15 AM, "Jason Gunthorpe" <jgg@ziepe.ca> wrote:
> 
> On Thu, Sep 19, 2019 at 08:24:56PM +0000, Adit Ranadive wrote:
> 
> >  
> > +	if (!qp->is_kernel) {
> > +		if (ucmd.flags == PVRDMA_USER_QP_CREATE_USE_RESP) {
> 
> Why does this flag exist? Don't old userspaces pass in a 0 length?
> Just use the length to signal new userspace?

I did have that in an earlier version but we decided it to make it more
explicit. It would be easier to add another flag later on if required
than to check the length (which might be same).

> 
> > +			qp_resp.qpn = qp->ibqp.qp_num;
> > +			qp_resp.qp_handle = qp->qp_handle;
> > +			qp_resp.qpn_valid = PVRDMA_USER_QP_CREATE_USE_RESP;
> > +
> > +			if (ib_copy_to_udata(udata, &qp_resp,
> > +					     sizeof(qp_resp))) {
> 
> This should limit the copy size to the length of the user buffer

Probably should be min(sizeof(qp_resp), udata->outlen)?


  reply index

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-19 20:24 Adit Ranadive
2019-10-08 18:15 ` Jason Gunthorpe
2019-10-12  7:03   ` Adit Ranadive [this message]
2019-10-15 17:06     ` Jason Gunthorpe
2019-10-15 17:16       ` Adit Ranadive

Reply instructions:

You may reply publically 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=8F02F753-B71A-4F73-83D8-D6224D6C4F6B@vmware.com \
    --to=aditr@vmware.com \
    --cc=Pv-drivers@vmware.com \
    --cc=bryantan@vmware.com \
    --cc=dledford@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=linux-rdma@vger.kernel.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

Linux-RDMA Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-rdma/0 linux-rdma/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-rdma linux-rdma/ https://lore.kernel.org/linux-rdma \
		linux-rdma@vger.kernel.org
	public-inbox-index linux-rdma

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-rdma


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git