Re: [PATCH rdma-next 05/21] IB/uverbs: Add validations in attr_get and copy_{to,from} functions

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

 



On Wed, May 09, 2018 at 04:46:40PM +0000, Ruhl, Michael J wrote:
> >-----Original Message-----
> >From: linux-rdma-owner@xxxxxxxxxxxxxxx [mailto:linux-rdma-
> >owner@xxxxxxxxxxxxxxx] On Behalf Of Leon Romanovsky
> >Sent: Thursday, May 3, 2018 9:37 AM
> >To: Doug Ledford <dledford@xxxxxxxxxx>; Jason Gunthorpe
> ><jgg@xxxxxxxxxxxx>
> >Cc: Leon Romanovsky <leonro@xxxxxxxxxxxx>; RDMA mailing list <linux-
> >rdma@xxxxxxxxxxxxxxx>; Matan Barak <matanb@xxxxxxxxxxxx>; Yishai
> >Hadas <yishaih@xxxxxxxxxxxx>
> >Subject: [PATCH rdma-next 05/21] IB/uverbs: Add validations in attr_get and
> >copy_{to,from} functions
> >
> >From: Matan Barak <matanb@xxxxxxxxxxxx>
> >
> >Add validations to make sure the kernel developers used the correct
> >functions. We'll WARN_ON if [s]he doesn't.
> >
> >Signed-off-by: Matan Barak <matanb@xxxxxxxxxxxx>
> >Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxxxx>
> >---
> > drivers/infiniband/core/uverbs_ioctl.c |  1 +
> > include/rdma/uverbs_ioctl.h            | 66
> >++++++++++++++++++++++++++++++++++
> > 2 files changed, 67 insertions(+)
> >

...

> > }
> >
> >+#define uverbs_validate_spec_debug(_method, _idx, _name, _cond) ({\
>
> Since it appears that these macros will be used all the time, is calling them _debug
> appropriate?
>

...

> >+#define uverbs_validate_actual_spec_debug(_method, _idx, _name,
> >_cond) ({\
>
> So we have validate_spec(), and validate_actual_spec().  And debug macros
> of each.  I assume that they are doing two different things.   Are they?
>
> Maybe comes comments or a different naming convention would be better?

In offline discussion, Jason raised the interest to rewrite those
Matan's patches.

BTW, sorry for my slow response, my computer was broken.

Thanks

>
> Mike

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