All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yann Droneaud <ydroneaud-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org>
To: Roland Dreier <roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org>,
	Roland Dreier <roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Yann Droneaud <ydroneaud-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org>
Subject: [PATCHv4 for-3.13 00/10] create_flow/destroy_flow fixes for v3.13
Date: Tue, 17 Dec 2013 10:58:49 +0100	[thread overview]
Message-ID: <cover.1387273677.git.ydroneaud@opteya.com> (raw)

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

-- 
1.8.4.2

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

             reply	other threads:[~2013-12-17  9:58 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-17  9:58 Yann Droneaud [this message]
     [not found] ` <cover.1387273677.git.ydroneaud-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org>
2013-12-17  9:58   ` [PATCHv4 for-3.13 01/10] IB/uverbs: move cast from u64 to void __user pointer to it's own variable Yann Droneaud
2013-12-17  9:58   ` [PATCHv4 for-3.13 02/10] IB/core: const'ify inbuf in struct ib_udata Yann Droneaud
2013-12-17  9:58   ` [PATCHv4 for-3.13 03/10] IB/uverbs: remove implicit cast in INIT_UDATA() Yann Droneaud
2013-12-17  9:58   ` [PATCHv4 for-3.13 04/10] IB/uverbs: set outbuf to NULL when no core response space is provided Yann Droneaud
2013-12-17  9:58   ` [PATCHv4 for-3.13 05/10] IB/uverbs: check reserved field in extended command header Yann Droneaud
2013-12-17  9:58   ` [PATCHv4 for-3.13 06/10] IB/uverbs: check comp_mask in destroy_flow Yann Droneaud
2013-12-17  9:58   ` [PATCHv4 for-3.13 07/10] IB/uverbs: check reserved fields in create_flow Yann Droneaud
2013-12-17  9:58   ` [PATCHv4 for-3.13 08/10] IB/uverbs: set error code when fail to consume all flow_spec items Yann Droneaud
2013-12-17  9:58   ` [PATCHv4 for-3.13 09/10] IB/uverbs: check access to userspace response buffer in extended command Yann Droneaud
2013-12-17  9:58   ` [PATCHv4 for-3.13 10/10] IB/uverbs: check input length in flow steering uverbs Yann Droneaud
2013-12-17 10:35   ` [PATCHv4 for-3.13 00/10] create_flow/destroy_flow fixes for v3.13 Or Gerlitz
     [not found]     ` <CAJZOPZKKg73s6Y+=KD6c8vdDXG0CmkL_gErv=KE-U0jPTSWEjg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-12-19 13:21       ` Yann Droneaud
     [not found]         ` <1387459287.11925.52.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2013-12-19 13:25           ` Or Gerlitz
2013-12-19 17:08           ` Roland Dreier
     [not found]             ` <CAL1RGDUfC38aKqDv7rOnbi3m7PMPC8ze+1kymgrWwNvYHU7e2Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-12-19 18:29               ` Yann Droneaud
     [not found]                 ` <1387477777.11925.85.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2013-12-19 22:57                   ` Yann Droneaud

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1387273677.git.ydroneaud@opteya.com \
    --to=ydroneaud-rly5vtjfyj3qt0dzr+alfa@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org \
    --cc=roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.