All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Konstantin Taranov <kotaranov@linux.microsoft.com>
Cc: kotaranov@microsoft.com, shirazsaleem@microsoft.com,
	longli@microsoft.com, leon@kernel.org,
	linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH rdma-next v2 1/1] RDMA/mana_ib: UC QP support for UAPI
Date: Thu, 9 Apr 2026 10:38:39 -0300	[thread overview]
Message-ID: <20260409133839.GA1848866@nvidia.com> (raw)
In-Reply-To: <20260325101843.1893866-1-kotaranov@linux.microsoft.com>

On Wed, Mar 25, 2026 at 03:18:43AM -0700, Konstantin Taranov wrote:
> +static int mana_ib_create_uc_qp(struct ib_qp *ibqp, struct ib_pd *ibpd,
> +				struct ib_qp_init_attr *attr, struct ib_udata *udata)
> +{
> +	struct mana_ib_dev *mdev = container_of(ibpd->device, struct mana_ib_dev, ib_dev);
> +	struct mana_ib_qp *qp = container_of(ibqp, struct mana_ib_qp, ibqp);
> +	struct mana_ib_create_uc_qp_resp resp = {};
> +	struct mana_ib_ucontext *mana_ucontext;
> +	struct mana_ib_create_uc_qp ucmd = {};
> +	u64 flags = 0;
> +	u32 doorbell;
> +	int err, i;
> +
> +	if (!udata || udata->inlen < sizeof(ucmd))
> +		return -EINVAL;
> +
> +	mana_ucontext = rdma_udata_to_drv_context(udata, struct mana_ib_ucontext, ibucontext);
> +	doorbell = mana_ucontext->doorbell;
> +
> +	err = ib_copy_from_udata(&ucmd, udata, min(sizeof(ucmd), udata->inlen));
> +	if (err)
> +		return err;

This all needs to be revised to use the new udata helpers

And you need to audit the driver and set
IB_UVERBS_CORE_SUPPORT_ROBUST_UDATA before adding new uAPI changes

Thanks,
Jason

      reply	other threads:[~2026-04-09 13:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-25 10:18 [PATCH rdma-next v2 1/1] RDMA/mana_ib: UC QP support for UAPI Konstantin Taranov
2026-04-09 13:38 ` 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=20260409133839.GA1848866@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=kotaranov@linux.microsoft.com \
    --cc=kotaranov@microsoft.com \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=longli@microsoft.com \
    --cc=shirazsaleem@microsoft.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.