Skip to content

Refactor ib_uverbs_write path

Leon Romanovsky linux-rdma 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest14 patches 17 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14RDMA/uverbs: Convert command mask validity check function to be booldrivers/infiniband/core/uverbs_main.c+4 -43 replies
2/14RDMA/uverbs: Update sizeof usersdrivers/infiniband/core/uverbs_main.c+5 -51 reply
3/14RDMA/uverbs: Refactor flags checks and update return valuedrivers/infiniband/core/uverbs_main.c+6 -41 reply
4/14RDMA/uverbs: Fail as early as possible if not enough header data was provideddrivers/infiniband/core/uverbs_main.c+7 -60 replies
5/14RDMA/uverbs: Return not supported error code for unsupported commandsdrivers/infiniband/core/uverbs_main.c+1 -10 replies
6/14RDMA/uverbs: Unify return values of not supported commanddrivers/infiniband/core/uverbs_main.c+4 -120 replies
7/14RDMA/uverbs: Refactor command header processingdrivers/infiniband/core/uverbs_main.c+32 -303 replies
8/14RDMA/uverbs: Properly check command supported maskdrivers/infiniband/core/uverbs_main.c+6 -125 replies
9/14RDMA/uverbs: Move uncontext check before SRCU read lockdrivers/infiniband/core/uverbs_main.c+4 -110 replies
10/14RDMa/uverbs: Copy ex_hdr outside of SRCU read lockdrivers/infiniband/core/uverbs_main.c+6 -70 replies
11/14RDMA/uverbs: Refactor the header validation logicdrivers/infiniband/core/uverbs_main.c+47 -432 replies
12/14RDMA/verbs: Return proper error code for not supported system calldrivers/infiniband/core/verbs.c+23 -230 replies
13/14RDMA/verbs: Check existence of function prior to accessing itdrivers/infiniband/core/core_priv.h drivers/infiniband/core/uverbs_cmd.c+24 -02 replies
14/14RDMA/verbs: Drop uverbs_ex_maskdrivers/infiniband/core/uverbs_main.c drivers/infiniband/hw/mlx4/main.c drivers/infiniband/hw/mlx5/main.c +1 more+1 -350 replies

Reviews trailers per patch

2 of 14 patches have a Reviewed-by or Acked-by.

PatchMatan BarakDennis Dalessandro
1/14R-b R-b
2/14R-b
3/14
4/14
5/14
6/14
7/14
8/14
9/14
10/14
11/14
12/14
13/14
14/14

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH rdma-next 00/14] Refactor ib_uverbs_write path

Hi,

This series comes as an outcome of [1] which was sent to rdma-rc and it should be applied on top of that patch.

During review process of that patch, we realized that the ib_uverbs_write() has number of flaws and this series
tries to fix them:
1. Localize all processing and verification code in specific functions.
2. Fix the command mask insufficient checks.
3. Simplify code to allow drop uverbs_ex_mask and in the future we will drop uverbs_mask too.
4. Fix differences in error codes.

Thanks

[1] https://marc.info/?l=linux-rdma&m=151851719021404&w=2

Leon Romanovsky (14):
RDMA/uverbs: Convert command mask validity check function to be bool RDMA/uverbs: Update sizeof users
RDMA/uverbs: Refactor flags checks and update return value RDMA/uverbs: Fail as early as possible if not enough header data was
provided
RDMA/uverbs: Return not supported error code for unsupported commands RDMA/uverbs: Unify return values of not supported command RDMA/uverbs: Refactor command header processing RDMA/uverbs: Properly check command supported mask RDMA/uverbs: Move uncontext check before SRCU read lock RDMa/uverbs: Copy ex_hdr outside of SRCU read lock RDMA/uverbs: Refactor the header validation logic RDMA/verbs: Return proper error code for not supported system call RDMA/verbs: Check existence of function prior to accessing it RDMA/verbs: Drop uverbs_ex_mask

 drivers/infiniband/core/core_priv.h   |   3 +
 drivers/infiniband/core/uverbs_cmd.c  |  21 ++++
 drivers/infiniband/core/uverbs_main.c | 219 ++++++++++++++++------------------
 drivers/infiniband/core/verbs.c       |  46 +++----
 drivers/infiniband/hw/mlx4/main.c     |  18 ---
 drivers/infiniband/hw/mlx5/main.c     |  15 ---
 include/rdma/ib_verbs.h               |   1 -
 7 files changed, 150 insertions(+), 173 deletions(-)

--
2.16.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html