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