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: <20250701103844.GB118736@unreal>
Date: Tue, 1 Jul 2025 13:38:44 +0300
From: Leon Romanovsky <leon@...nel.org>
To: Abhijit Gangurde <abhijit.gangurde@....com>
Cc: shannon.nelson@....com, brett.creeley@....com, davem@...emloft.net,
	edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
	corbet@....net, jgg@...pe.ca, andrew+netdev@...n.ch,
	allen.hubbe@....com, nikhil.agarwal@....com,
	linux-rdma@...r.kernel.org, netdev@...r.kernel.org,
	linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
	Andrew Boyer <andrew.boyer@....com>
Subject: Re: [PATCH v3 10/14] RDMA/ionic: Register device ops for control path

On Tue, Jun 24, 2025 at 05:43:11PM +0530, Abhijit Gangurde wrote:
> Implement device supported verb APIs for control path.
> 
> Co-developed-by: Andrew Boyer <andrew.boyer@....com>
> Signed-off-by: Andrew Boyer <andrew.boyer@....com>
> Co-developed-by: Allen Hubbe <allen.hubbe@....com>
> Signed-off-by: Allen Hubbe <allen.hubbe@....com>
> Signed-off-by: Abhijit Gangurde <abhijit.gangurde@....com>
> ---
> v2->v3
>   - Registered main ib ops at once
>   - Removed uverbs_cmd_mask
>   - Removed uverbs_cmd_mask
>   - Used rdma_user_mmap_* APIs for mappings
>   - Removed rw locks around xarrays
>   - Fixed sparse checks
> 
>  drivers/infiniband/hw/ionic/ionic_admin.c     |  101 +
>  .../infiniband/hw/ionic/ionic_controlpath.c   | 2530 +++++++++++++++++
>  drivers/infiniband/hw/ionic/ionic_fw.h        |  717 +++++
>  drivers/infiniband/hw/ionic/ionic_ibdev.c     |   44 +
>  drivers/infiniband/hw/ionic/ionic_ibdev.h     |  249 +-
>  drivers/infiniband/hw/ionic/ionic_pgtbl.c     |   19 +
>  include/uapi/rdma/ionic-abi.h                 |  115 +
>  7 files changed, 3767 insertions(+), 8 deletions(-)
>  create mode 100644 include/uapi/rdma/ionic-abi.h

<...>

> +static void ionic_flush_qs(struct ionic_ibdev *dev)
> +{
> +	struct ionic_qp *qp, *qp_tmp;
> +	struct ionic_cq *cq, *cq_tmp;
> +	LIST_HEAD(flush_list);
> +	unsigned long index;
> +
> +	/* Flush qp send and recv */
> +	rcu_read_lock();
> +	xa_for_each(&dev->qp_tbl, index, qp) {
> +		kref_get(&qp->qp_kref);
> +		list_add_tail(&qp->ibkill_flush_ent, &flush_list);
> +	}
> +	rcu_read_unlock();

Same question as for CQ. What does RCU lock protect here?

> +
> +	list_for_each_entry_safe(qp, qp_tmp, &flush_list, ibkill_flush_ent) {
> +		ionic_flush_qp(dev, qp);
> +		kref_put(&qp->qp_kref, ionic_qp_complete);
> +		list_del(&qp->ibkill_flush_ent);
> +	}

<...>

> +err_buf:
> +err_hdr:

Please don't use empty goto labels.

> +	return rc;
> +}

<...>

> +#define IONIC_ABI_VERSION	4

For us it is 1.

Thanks

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ