Subject: Re: [PATCH v2 iproute2-next 2/3] rdma: Add an option to set privileged QKEY parameter

From: Petr Machata <[email-masked]>
Date: Tue, 24 Oct 2023 17:34:46 +0200

Patrisious Haddad <[email-masked]> writes:

> Enrich rdmatool with an option to enable or disable privileged QKEY.
> When enabled, non-privileged users will be allowed to specify a
> controlled QKEY.
>
> By default this parameter is disabled in order to comply with IB spec.
> According to the IB specification rel-1.6, section 3.5.3:
> "QKEYs with the most significant bit set are considered controlled
> QKEYs, and a HCA does not allow a consumer to arbitrarily specify a
> controlled QKEY."
>
> This allows old applications which existed before the kernel commit:
> 0cadb4db79e1 ("RDMA/uverbs: Restrict usage of privileged QKEYs")
> they can use privileged QKEYs without being a privileged user to now
> be able to work again without being privileged granted they turn on this
> parameter.
>
> rdma tool command examples and output.
>
> $ rdma system show
> netns shared privileged-qkey off copy-on-fork on
>
> $ rdma system set privileged-qkey on
>
> $ rdma system show
> netns shared privileged-qkey on copy-on-fork on
>
> Signed-off-by: Patrisious Haddad <[email-masked]>
> Reviewed-by: Michael Guralnik <[email-masked]>

Again, I'm not familiar with the subject matter, but mechanically this
looks OK to me.

Reviewed-by: Petr Machata <[email-masked]>