Skip to content

Update drivers to use ib_copy_validate_udata_in()

Jason Gunthorpe linux-hyperv linux-patches linux-rdma 2 versions – Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest16 patches 3 repliesApplied
  2. v116 patches 7 repliesSuperseded

Changes in v2 from the cover letter

- 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/[email protected]

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/16RDMA: Consolidate patterns with offsetofend() to ib_copy_validate_udata_in()drivers/infiniband/hw/efa/efa_verbs.c drivers/infiniband/hw/irdma/verbs.c drivers/infiniband/hw/mlx4/qp.c +1 more+26 -1200 replies
2/16RDMA: Consolidate patterns with offsetof() to ib_copy_validate_udata_in()drivers/infiniband/hw/mana/cq.c drivers/infiniband/hw/mlx5/cq.c+5 -140 replies
3/16RDMA: Consolidate patterns with sizeof() to ib_copy_validate_udata_in()drivers/infiniband/hw/mana/qp.c drivers/infiniband/hw/mana/wq.c drivers/infiniband/hw/mlx4/main.c +3 more+17 -471 reply
4/16RDMA: Use ib_copy_validate_udata_in() for implicit full structsdrivers/infiniband/hw/erdma/erdma_verbs.c drivers/infiniband/hw/ionic/ionic_controlpath.c drivers/infiniband/hw/mthca/mthca_provider.c +5 more+45 -520 replies
5/16RDMA/pvrdma: Use ib_copy_validate_udata_in() for srqdrivers/infiniband/hw/vmw_pvrdma/pvrdma_cq.c+2 -30 replies
6/16RDMA/mlx5: Use ib_copy_validate_udata_in() for SRQdrivers/infiniband/hw/mlx5/srq.c+3 -120 replies
7/16RDMA/mlx5: Use ib_copy_validate_udata_in() for MWdrivers/infiniband/hw/mlx5/mr.c+6 -90 replies
8/16RDMA/mlx4: Use ib_copy_validate_udata_in()drivers/infiniband/hw/mlx4/cq.c drivers/infiniband/hw/mlx4/qp.c drivers/infiniband/hw/mlx4/srq.c+10 -130 replies
9/16RDMA/mlx4: Use ib_copy_validate_udata_in() for QPdrivers/infiniband/hw/mlx4/qp.c+3 -220 replies
10/16RDMA/hns: Use ib_copy_validate_udata_in()drivers/infiniband/hw/hns/hns_roce_cq.c drivers/infiniband/hw/hns/hns_roce_main.c drivers/infiniband/hw/hns/hns_roce_qp.c +1 more+8 -450 replies
11/16RDMA: Use ib_copy_validate_udata_in_cm() for zero comp_maskdrivers/infiniband/hw/efa/efa_verbs.c drivers/infiniband/hw/mlx4/main.c drivers/infiniband/hw/mlx4/qp.c +1 more+13 -170 replies
12/16RDMA/mlx5: Pull comp_mask validation into ib_copy_validate_udata_in_cm()drivers/infiniband/hw/mlx5/qp.c+8 -90 replies
13/16RDMA/hns: Add missing comp_mask check in create_qpdrivers/infiniband/hw/hns/hns_roce_qp.c+3 -10 replies
14/16RDMA/irdma: Add missing comp_mask check in alloc_ucontextdrivers/infiniband/hw/irdma/verbs.c+3 -11 reply
15/16RDMA: Remove redundant = {} for udata req structsdrivers/infiniband/hw/efa/efa_verbs.c drivers/infiniband/hw/hns/hns_roce_main.c drivers/infiniband/hw/hns/hns_roce_srq.c +10 more+21 -190 replies
16/16RDMA/hns: Remove the duplicate calls to ib_copy_validate_udata_in()drivers/infiniband/hw/hns/hns_roce_srq.c+16 -190 replies

Reviews trailers per patch

4 of 16 patches have a Reviewed-by or Acked-by.

PatchLong LiJacob MoroniBernard Metzler
1/16
2/16R-b
3/16R-b R-b
4/16
5/16
6/16
7/16
8/16
9/16
10/16
11/16
12/16
13/16
14/16R-b
15/16R-b
16/16

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [PATCH v2 00/16] Update drivers to use ib_copy_validate_udata_in()

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/[email protected]

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

Signature · 1 line
2.43.0