Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
* [PATCH 0/3] Fix typing issues in the umem code
@ 2026-06-01 16:52 Jason Gunthorpe
  2026-06-01 16:52 ` [PATCH 1/3] RDMA/umem: Fix truncation for block sizes >= 4G Jason Gunthorpe
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Jason Gunthorpe @ 2026-06-01 16:52 UTC (permalink / raw)
  To: Leon Romanovsky, linux-rdma; +Cc: patches, Shiraz Saleem, stable

The types are tricky here as we have a mixture of u64, dma_addr_t and
unsigned long used purposefully for different things:
 - The on-the-wire IOVA address of the MR is u64
 - The dma address is dma_addr_t which can be u32 or u64
 - unsigned long is used for pgsize, mostly because a bunch of bit math
   helper functions are used and they are obnoxious to use u64

Fix various silent truncations, issues on 32 bit compiles and
understandability.

Jason Gunthorpe (3):
  RDMA/umem: Fix truncation for block sizes >= 4G
  RDMA/umem: Be careful about boundary conditions in
    ib_umem_find_best_pgsz()
  RDMA/umem: Make ib_umem_is_contiguous() safe on 32 bit

 drivers/infiniband/core/iter.c |  4 ++--
 drivers/infiniband/core/umem.c | 18 ++++++++++++------
 include/rdma/ib_umem.h         | 15 +++++----------
 3 files changed, 19 insertions(+), 18 deletions(-)


base-commit: d6ab440240a04b8737ee4c7bb21af9182e451733
-- 
2.43.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-06-03 12:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-01 16:52 [PATCH 0/3] Fix typing issues in the umem code Jason Gunthorpe
2026-06-01 16:52 ` [PATCH 1/3] RDMA/umem: Fix truncation for block sizes >= 4G Jason Gunthorpe
2026-06-01 16:52 ` [PATCH 2/3] RDMA/umem: Be careful about boundary conditions in ib_umem_find_best_pgsz() Jason Gunthorpe
2026-06-01 16:52 ` [PATCH 3/3] RDMA/umem: Make ib_umem_is_contiguous() safe on 32 bit Jason Gunthorpe
2026-06-03 12:41 ` [PATCH 0/3] Fix typing issues in the umem code Jason Gunthorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox