Skip to content

create_flow/destroy_flow fixes for v3.13

Yann Droneaud linux-rdma 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest10 patches 6 repliesIn review
  2. v39 patches 2 repliesSuperseded
  3. v28 patches 0 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v17 patches3 repliesSuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10IB/uverbs: move cast from u64 to void __user pointer to it's own variabledrivers/infiniband/core/uverbs_cmd.c+104 -540 replies
2/10IB/core: const'ify inbuf in struct ib_udatadrivers/infiniband/core/uverbs.h include/rdma/ib_verbs.h+2 -20 replies
3/10IB/uverbs: remove implicit cast in INIT_UDATA()drivers/infiniband/core/uverbs.h drivers/infiniband/core/uverbs_main.c+14 -110 replies
4/10IB/uverbs: set outbuf to NULL when no core response space is provideddrivers/infiniband/core/uverbs_main.c+1 -10 replies
5/10IB/uverbs: check reserved field in extended command headerdrivers/infiniband/core/uverbs_main.c+3 -00 replies
6/10IB/uverbs: check comp_mask in destroy_flowdrivers/infiniband/core/uverbs_cmd.c+3 -00 replies
7/10IB/uverbs: check reserved fields in create_flowdrivers/infiniband/core/uverbs_cmd.c+7 -00 replies
8/10IB/uverbs: set error code when fail to consume all flow_spec itemsdrivers/infiniband/core/uverbs_cmd.c+1 -00 replies
9/10IB/uverbs: check access to userspace response buffer in extended commanddrivers/infiniband/core/uverbs_main.c+5 -00 replies
10/10IB/uverbs: check input length in flow steering uverbsdrivers/infiniband/core/uverbs_cmd.c+6 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCHv4 for-3.13 00/10] create_flow/destroy_flow fixes for v3.13

Hi Roland,

Please find the fourth revision of a patchset against create_flow/destroy_flow and associated extended command scheme.

These are fixes that *must* be applied before making the new uverbs widely available in v3.13:

- patches 1, 2 and 3 address a warning reported by sparse.
- patch 4 handle an uncommon type of extended command.
- patch 5, 6 and 7 ensure that commands will be extensible:
- one patch add a missing check of comp_mask;
- the other patches add checks on reserved fields.
- patch 8 fix an error path which was not setting the error code.
- patch 9 ensure the response buffer of an extended command is a valid memory region for userspace. Doing the check earlier, on the *full* response buffer, might be safer.
- patch 10 prevent out of bound access and underflow.

Please review, test and apply for v3.13.

Changes from patchset v3 [1]:

- add a patch to hold 'response' pointer to remove the redundant cast introduced by patch to remove implicit cast from INIT_UDATA()
- rework some commit messages to address review made by Roland.

Changes from patchset v2 [2]:

- add a patch to check the input length in extended uverbs, create_flow and destroy_flow.

Changes from patchset v1 [3]:

- add patch to verify early response buffer using access_ok(), just like vfs_read().

Regards.

[1] [PATCHv3 for-3.13 0/9] create_flow/destroy_flow fixes for v3.13

    http://marc.info/?i=cover.1386798254.git.ydroneaud-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org

[2] [PATCH v2 for v3.13 0/8] create_flow/destroy_flow fixes for v3.13

    http://marc.info/?i=cover.1385981934.git.ydroneaud-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org

[3] [PATCH for v3.13 0/7] create_flow/destroy_flow fixes for v3.13

    http://marc.info/?i=cover.1385501822.git.ydroneaud-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org

Yann Droneaud (10):
IB/uverbs: move cast from u64 to void __user pointer to it's own
variable
IB/core: const'ify inbuf in struct ib_udata
IB/uverbs: remove implicit cast in INIT_UDATA()
IB/uverbs: set outbuf to NULL when no core response space is provided IB/uverbs: check reserved field in extended command header IB/uverbs: check comp_mask in destroy_flow
IB/uverbs: check reserved fields in create_flow
IB/uverbs: set error code when fail to consume all flow_spec items IB/uverbs: check access to userspace response buffer in extended
command
IB/uverbs: check input length in flow steering uverbs

 drivers/infiniband/core/uverbs.h      |  12 +--
 drivers/infiniband/core/uverbs_cmd.c  | 175 +++++++++++++++++++++++-----------
 drivers/infiniband/core/uverbs_main.c |  21 +++-
 include/rdma/ib_verbs.h               |   2 +-
 4 files changed, 144 insertions(+), 66 deletions(-)
Signature · 6 lines
1.8.4.2

--
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