public inbox for linux-hyperv@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/16] Update drivers to use ib_copy_validate_udata_in()
@ 2026-03-25 21:26 Jason Gunthorpe
  2026-03-25 21:26 ` [PATCH v2 01/16] RDMA: Consolidate patterns with offsetofend() to ib_copy_validate_udata_in() Jason Gunthorpe
                   ` (15 more replies)
  0 siblings, 16 replies; 19+ messages in thread
From: Jason Gunthorpe @ 2026-03-25 21:26 UTC (permalink / raw)
  To: Abhijit Gangurde, Allen Hubbe,
	Broadcom internal kernel review list, Bernard Metzler, Bryan Tan,
	Cheng Xu, Gal Pressman, Junxian Huang, Kai Shen,
	Konstantin Taranov, Krzysztof Czurylo, Leon Romanovsky,
	linux-hyperv, linux-rdma, Michal Kalderon, Michael Margolin,
	Nelson Escobar, Satish Kharat, Selvin Xavier, Yossi Leybovich,
	Chengchang Tang, Tatyana Nikolova, Vishnu Dasa, Yishai Hadas,
	Zhu Yanjun
  Cc: Long Li, patches

Progress the uAPI work by shifting nearly all drivers to use
ib_copy_validate_udata_in() and its variations.

These helpers are easier to use and enforce a tighter uAPI protocol
for the udata.

v2:
 - Drop EFA patch, rename the field instead
 - Fix the mlx5 mw change, userspace doesn't use the udata struct at all
v1: https://patch.msgid.link/r/0-v1-2b86f54cda42+7d-rdma_udata_req_jgg@nvidia.com

Jason Gunthorpe (16):
  RDMA: Consolidate patterns with offsetofend() to
    ib_copy_validate_udata_in()
  RDMA: Consolidate patterns with offsetof() to
    ib_copy_validate_udata_in()
  RDMA: Consolidate patterns with sizeof() to
    ib_copy_validate_udata_in()
  RDMA: Use ib_copy_validate_udata_in() for implicit full structs
  RDMA/pvrdma: Use ib_copy_validate_udata_in() for srq
  RDMA/mlx5: Use ib_copy_validate_udata_in() for SRQ
  RDMA/mlx5: Use ib_copy_validate_udata_in() for MW
  RDMA/mlx4: Use ib_copy_validate_udata_in()
  RDMA/mlx4: Use ib_copy_validate_udata_in() for QP
  RDMA/hns: Use ib_copy_validate_udata_in()
  RDMA: Use ib_copy_validate_udata_in_cm() for zero comp_mask
  RDMA/mlx5: Pull comp_mask validation into
    ib_copy_validate_udata_in_cm()
  RDMA/hns: Add missing comp_mask check in create_qp
  RDMA/irdma: Add missing comp_mask check in alloc_ucontext
  RDMA: Remove redundant = {} for udata req structs
  RDMA/hns: Remove the duplicate calls to ib_copy_validate_udata_in()

 drivers/infiniband/hw/efa/efa_verbs.c         | 55 ++-----------
 drivers/infiniband/hw/erdma/erdma_verbs.c     |  6 +-
 drivers/infiniband/hw/hns/hns_roce_cq.c       | 16 +---
 drivers/infiniband/hw/hns/hns_roce_main.c     |  6 +-
 drivers/infiniband/hw/hns/hns_roce_qp.c       | 10 +--
 drivers/infiniband/hw/hns/hns_roce_srq.c      | 54 ++++--------
 .../infiniband/hw/ionic/ionic_controlpath.c   |  6 +-
 drivers/infiniband/hw/irdma/verbs.c           | 12 +--
 drivers/infiniband/hw/mana/cq.c               | 11 +--
 drivers/infiniband/hw/mana/qp.c               | 29 +++----
 drivers/infiniband/hw/mana/wq.c               | 12 +--
 drivers/infiniband/hw/mlx4/cq.c               | 10 +--
 drivers/infiniband/hw/mlx4/main.c             |  9 +-
 drivers/infiniband/hw/mlx4/qp.c               | 82 ++++---------------
 drivers/infiniband/hw/mlx4/srq.c              |  5 +-
 drivers/infiniband/hw/mlx5/cq.c               | 14 ++--
 drivers/infiniband/hw/mlx5/main.c             |  2 +-
 drivers/infiniband/hw/mlx5/mr.c               | 15 ++--
 drivers/infiniband/hw/mlx5/qp.c               | 66 ++++-----------
 drivers/infiniband/hw/mlx5/srq.c              | 17 +---
 drivers/infiniband/hw/mthca/mthca_provider.c  | 27 +++---
 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c   | 14 ++--
 drivers/infiniband/hw/qedr/verbs.c            | 42 ++++------
 drivers/infiniband/hw/usnic/usnic_ib_verbs.c  |  2 +-
 drivers/infiniband/hw/vmw_pvrdma/pvrdma_cq.c  |  5 +-
 drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c  |  6 +-
 drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c |  6 +-
 drivers/infiniband/sw/rxe/rxe_verbs.c         | 13 +--
 drivers/infiniband/sw/siw/siw_verbs.c         |  6 +-
 29 files changed, 172 insertions(+), 386 deletions(-)


base-commit: eb15cffa15201bd53d1ac296645aa2bc5f726841
-- 
2.43.0


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

end of thread, other threads:[~2026-03-29 11:59 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-25 21:26 [PATCH v2 00/16] Update drivers to use ib_copy_validate_udata_in() Jason Gunthorpe
2026-03-25 21:26 ` [PATCH v2 01/16] RDMA: Consolidate patterns with offsetofend() to ib_copy_validate_udata_in() Jason Gunthorpe
2026-03-25 21:26 ` [PATCH v2 02/16] RDMA: Consolidate patterns with offsetof() " Jason Gunthorpe
2026-03-25 21:26 ` [PATCH v2 03/16] RDMA: Consolidate patterns with sizeof() " Jason Gunthorpe
2026-03-29 11:59   ` Bernard Metzler
2026-03-25 21:26 ` [PATCH v2 04/16] RDMA: Use ib_copy_validate_udata_in() for implicit full structs Jason Gunthorpe
2026-03-25 21:26 ` [PATCH v2 05/16] RDMA/pvrdma: Use ib_copy_validate_udata_in() for srq Jason Gunthorpe
2026-03-25 21:26 ` [PATCH v2 06/16] RDMA/mlx5: Use ib_copy_validate_udata_in() for SRQ Jason Gunthorpe
2026-03-25 21:26 ` [PATCH v2 07/16] RDMA/mlx5: Use ib_copy_validate_udata_in() for MW Jason Gunthorpe
2026-03-25 21:26 ` [PATCH v2 08/16] RDMA/mlx4: Use ib_copy_validate_udata_in() Jason Gunthorpe
2026-03-25 21:26 ` [PATCH v2 09/16] RDMA/mlx4: Use ib_copy_validate_udata_in() for QP Jason Gunthorpe
2026-03-25 21:26 ` [PATCH v2 10/16] RDMA/hns: Use ib_copy_validate_udata_in() Jason Gunthorpe
2026-03-25 21:26 ` [PATCH v2 11/16] RDMA: Use ib_copy_validate_udata_in_cm() for zero comp_mask Jason Gunthorpe
2026-03-25 21:26 ` [PATCH v2 12/16] RDMA/mlx5: Pull comp_mask validation into ib_copy_validate_udata_in_cm() Jason Gunthorpe
2026-03-25 21:26 ` [PATCH v2 13/16] RDMA/hns: Add missing comp_mask check in create_qp Jason Gunthorpe
2026-03-25 21:27 ` [PATCH v2 14/16] RDMA/irdma: Add missing comp_mask check in alloc_ucontext Jason Gunthorpe
2026-03-25 22:16   ` Jacob Moroni
2026-03-25 21:27 ` [PATCH v2 15/16] RDMA: Remove redundant = {} for udata req structs Jason Gunthorpe
2026-03-25 21:27 ` [PATCH v2 16/16] RDMA/hns: Remove the duplicate calls to ib_copy_validate_udata_in() Jason Gunthorpe

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