Re: [PATCH rdma-rc] RDMA/mlx5: Fix DevX umem page size truncation for pages >= 4G
From: Jason Gunthorpe
Date: Wed Nov 04 2026 - 12:51:16 EST
On Wed, Nov 04, 2026 at 12:07:47PM +0200, Leon Romanovsky wrote:
> Isn't this fix enough?
> https://patch.msgid.link/r/1-v1-88303e9e509f+f7-ib_umem_types_jgg@xxxxxxxxxx
> 15fe76e23615 ("RDMA/umem: Fix truncation for block sizes >= 4G")
No, the long AI generated commit message buried what the bug here is:
> > -static unsigned int devx_umem_find_best_pgsize(struct ib_umem *umem,
> > - unsigned long pgsz_bitmap)
> > +static unsigned long devx_umem_find_best_pgsize(struct ib_umem *umem,
> > + unsigned long pgsz_bitmap)
> > {
That 'int' is an integer truncation if the page size is > 4G. The
entire page size path from the core code has to be unsigned long if
the pgsz_bitmap is unsigned long.
Similar root cause of truncate, but different code.
Jason