Re: [PATCH rdma-next 08/14] RDMA/uverbs: Properly check command supported mask

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 14, 2018 at 04:47:14PM -0700, Jason Gunthorpe wrote:
> On Wed, Feb 14, 2018 at 02:38:38PM +0200, Leon Romanovsky wrote:
> > From: Leon Romanovsky <leonro@xxxxxxxxxxxx>
> >
> > The check based on index is not sufficient because
> >
> >   IB_USER_VERBS_EX_CMD_CREATE_CQ = IB_USER_VERBS_CMD_CREATE_CQ
> >
> > and IB_USER_VERBS_CMD_CREATE_CQ <= IB_USER_VERBS_CMD_OPEN_QP,
> > so if we execute IB_USER_VERBS_EX_CMD_CREATE_CQ this code checks
> > ib_dev->uverbs_cmd_mask not ib_dev->uverbs_ex_cmd_mask.
> >
> > Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxxxx>
> >  drivers/infiniband/core/uverbs_main.c | 18 ++++++------------
> >  1 file changed, 6 insertions(+), 12 deletions(-)
>
> This seems like an RC fix to me, since we are not properly validating
> input commands... ??

I don't think so, it looks harmless to me because all vendors except mlx4/mlx5
have zero in uverbs_ex_cmd_mask and mlx4 have all commands implemented.

Thanks

>
> Jason

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux