Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: Leon Romanovsky <leon@kernel.org>
Cc: 0z5a <dezhen.lu@student.uni-tuebingen.de>,
	linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH rdma-rc] RDMA/mlx5: Fix DevX umem page size truncation for pages >= 4G
Date: Wed, 4 Nov 2026 13:40:41 -0400	[thread overview]
Message-ID: <20261104174041.GY3889730@ziepe.ca> (raw)
In-Reply-To: <20261104100747.GD478286@unreal>

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@nvidia.com
> 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

  reply	other threads:[~2026-11-04 17:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-03 14:28 [PATCH rdma-rc] RDMA/mlx5: Fix DevX umem page size truncation for pages >= 4G 0z5a
2026-11-03 14:37 ` sashiko-bot
2026-11-04 10:07 ` Leon Romanovsky
2026-11-04 17:40   ` Jason Gunthorpe [this message]
2026-11-04 17:38 ` Jason Gunthorpe
  -- strict thread matches above, loose matches on Subject: below --
2026-11-03 14:27 0z5a
2026-11-03 14:32 ` sashiko-bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261104174041.GY3889730@ziepe.ca \
    --to=jgg@ziepe.ca \
    --cc=dezhen.lu@student.uni-tuebingen.de \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox