Re: [PATCH rdma-next 2/5] RDMA/mlx5: Check that supplied blue flame index doesn't overflow

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

 



On Thu, Jun 28, 2018 at 09:18:23AM -0600, Jason Gunthorpe wrote:
> On Thu, Jun 28, 2018 at 07:47:00AM +0300, Leon Romanovsky wrote:
>
> > > Why would that be needed? bfregn can remain int inside the function
> > > and since it is already prooven to be positive the implicit cast to
> > > unsigned will not truncate, while the user controlled u32 will be
> > > passed without mangling to the bounding check.
> >
> > Because explicit is always better than implicit, and it is wrong to
> > leave in the code place which relies on that.
>
> Well, the entire bug here is implicit casting of a u32 to an int, so,
> please fix that somehow in v2..

I'm working on it.
Can we progress with other patches in the meantime?

Thanks

>
> Jason
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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