Re: [PATCH rdma-next 1/1] RDMA/mana_ib: Adopt robust udata
From: Konstantin Taranov
Date: Fri Jul 10 2026 - 05:07:29 EST
> On Tue, Jun 23, 2026 at 04:44:43AM -0700, Konstantin Taranov wrote:
>
> > +struct mana_ib_uctx_req {
> > + __aligned_u64 client_caps1;
> > + __aligned_u64 client_caps2;
> > + __aligned_u64 client_caps3;
> > + __aligned_u64 client_caps4;
> > + __aligned_u64 comp_mask;
> > +};
>
> I think Jacob has it right, This is looking pretty gross.
>
Jason, I sent a response to Jacob earlier. I am not sure you saw it.
The problem of enforcing robust udata on alloc user context is that it blocks
any future additions to the request. Since it is the first IOCTL there is no way
to negotiate the request format. And that is why I wanted to reserve some fields now.
> If you want such a complex protocol then use the new ioctl format and
> declare sensible driver specific attributes. Nobody has converted
> alloc_ucontext yet, but that is usually not hard to do.
I have a question. If I add now ib_is_udata_in_empty() to alloc user context, would I be able to
adopt new ioctl format and extend the udata for alloc user context?
Konstantin
>
> Then you can use the existing mandatory/optional schemes to pass whatever
> is appropriate with full easy compat.
>
> So maybe split this part out, the rst of the udata fiddling looks OK
>
> Jason