lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200421071619.GG121146@unreal>
Date:   Tue, 21 Apr 2020 10:16:19 +0300
From:   Leon Romanovsky <leon@...nel.org>
To:     "Saleem, Shiraz" <shiraz.saleem@...el.com>
Cc:     "Kirsher, Jeffrey T" <jeffrey.t.kirsher@...el.com>,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        "jgg@...pe.ca" <jgg@...pe.ca>,
        "Ismail, Mustafa" <mustafa.ismail@...el.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
        "nhorman@...hat.com" <nhorman@...hat.com>,
        "sassmann@...hat.com" <sassmann@...hat.com>
Subject: Re: [RFC PATCH v5 09/16] RDMA/irdma: Implement device supported verb
 APIs

On Tue, Apr 21, 2020 at 12:29:43AM +0000, Saleem, Shiraz wrote:
> > Subject: Re: [RFC PATCH v5 09/16] RDMA/irdma: Implement device supported
> > verb APIs
> >
> > On Fri, Apr 17, 2020 at 10:12:44AM -0700, Jeff Kirsher wrote:
> > > From: Mustafa Ismail <mustafa.ismail@...el.com>
> > >
> > > Implement device supported verb APIs. The supported APIs vary based on
> > > the underlying transport the ibdev is registered as (i.e. iWARP or
> > > RoCEv2).
> > >
> > > Signed-off-by: Mustafa Ismail <mustafa.ismail@...el.com>
> > > Signed-off-by: Shiraz Saleem <shiraz.saleem@...el.com>
> > > ---
> > >  drivers/infiniband/hw/irdma/verbs.c     | 4555 +++++++++++++++++++++++
> > >  drivers/infiniband/hw/irdma/verbs.h     |  213 ++
> > >  include/uapi/rdma/ib_user_ioctl_verbs.h |    1 +
> > >  3 files changed, 4769 insertions(+)
> > >  create mode 100644 drivers/infiniband/hw/irdma/verbs.c
> > >  create mode 100644 drivers/infiniband/hw/irdma/verbs.h
> >
> > <...>
> >
> > > +static int irdma_destroy_qp(struct ib_qp *ibqp, struct ib_udata
> > > +*udata) {
> > > +	struct irdma_qp *iwqp = to_iwqp(ibqp);
> > > +
> > > +	iwqp->destroyed = 1;
> > > +	if (iwqp->ibqp_state >= IB_QPS_INIT && iwqp->ibqp_state <
> > IB_QPS_RTS)
> > > +		irdma_next_iw_state(iwqp, IRDMA_QP_STATE_ERROR, 0, 0, 0);
> > > +
> > > +	if (!iwqp->user_mode) {
> > > +		if (iwqp->iwscq) {
> > > +			irdma_clean_cqes(iwqp, iwqp->iwscq);
> > > +			if (iwqp->iwrcq != iwqp->iwscq)
> > > +				irdma_clean_cqes(iwqp, iwqp->iwrcq);
> > > +		}
> > > +	}
> > > +
> > > +	irdma_remove_push_mmap_entries(iwqp);
> > > +	irdma_free_lsmm_rsrc(iwqp);
> > > +	irdma_rem_ref(&iwqp->ibqp);
> >
> > No, please ensure that call to destroy_qp is kfree QP without any need in reference
> > counting. We need this to move QP allocation to be IB/core responsibility. I hope
> > that all other verbs objects (with MR as
> > exception) follow the same pattern: create->kzalloc->destroy>kfree.
>
> Yes. I did see the other verb objects allocation move to IB core
> responsibility but not QP. Since we are headed in that direction,
> I do think it's a reasonable expectation to make destroy QP
> synchronous in providers. We ll look to change it in next rev.

Thanks

>
> Thank you Leon for taking the time to review and provide
> feedback.
>
> Shiraz

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ