Re: [PATCH rdma-next v3] RDMA/mana_ib: Adopt robust udata
From: Konstantin Taranov
Date: Wed Jul 15 2026 - 04:25:18 EST
>
> > diff --git a/include/uapi/rdma/mana-abi.h
> > b/include/uapi/rdma/mana-abi.h index a75bf32b8..8336bf51b 100644
> > --- a/include/uapi/rdma/mana-abi.h
> > +++ b/include/uapi/rdma/mana-abi.h
> > @@ -25,7 +25,7 @@ enum mana_ib_create_cq_flags {
> >
> > struct mana_ib_create_cq {
> > __aligned_u64 buf_addr;
> > - __u16 flags;
> > + __u16 comp_mask;
>
> This change is unrelated to the patch.
It is related. It was done for this change:
- err = ib_copy_validate_udata_in(udata, ucmd, buf_addr);
+ err = ib_copy_validate_udata_in_cm(udata, ucmd, buf_addr,
+ MANA_IB_CREATE_RNIC_CQ);
The helper ib_copy_validate_udata_in_cm() expects that field to be named comp_mask.
This helper was used to ensure that the kernel processes only known flags.
So if we add another flag, the old kernel should fail it. ib_copy_validate_udata_in() was not checking the
supported flags.
My understanding that enforcing strict checks is a requirement for the robust udata.
I have also updated the rdma-core PR that renames flags to comp_mask.
Konstantin
>
> Thanks
>
> > __u16 reserved0;
> > __u32 reserved1;
> > };
> > --
> > 2.43.0
> >