From: Yann Droneaud <ydroneaud-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org>
To: Eli Cohen <eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
Steve Wise <swise-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>,
Roland Dreier <roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Yann Droneaud <ydroneaud-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org>,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Dan Carpenter
<dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Subject: [PATCH for v3.15 0/4] uverbs ABI fixes
Date: Sun, 4 May 2014 23:21:12 +0200 [thread overview]
Message-ID: <cover.1399216475.git.ydroneaud@opteya.com> (raw)
In-Reply-To: 20140502235616.GJ4963@mwanda
Hi,
Please find 4 patches which fix some issues regarding missing explicit
padding at end of structure exchanged between kernel and userspace.
These makes i386 userspace libraries and x86_64 kernel disagree about
the size of the structures.
Additionally, as reported by Dan Carpenter, in one case, stack information
can be leaked by the kernel to userspace due to implicit padding being not
initialized.
Unfortunately, the data structure cannot be fixed alone as it would break
existing applications. So in order to remain compatible with i386 libraries,
providers (hw) functions are modified to use the input length to guess the
expected format of the command in order to check the content of the reserved
field for future usage. Other are modified to not write the padding field in
response to make the kernel able to handle gracefully i386 userspace on x86_64.
For full coherency, patches against the userspace libraries (libcxgb4 and
libmlx5) will be submitted as a followup to update the data structure on
userspace side.
Yann Droneaud (4):
RDMA/mlx5: add missing padding at end of struct mlx5_ib_create_cq
RDMA/mlx5: add missing padding at end of struct mlx5_ib_create_srq
RDMA/cxgb4: add missing padding at end of struct c4iw_create_cq_resp
RDMA/cxgb4: add missing padding at end of struct
c4iw_alloc_ucontext_resp
drivers/infiniband/hw/cxgb4/cq.c | 8 ++++++--
drivers/infiniband/hw/cxgb4/provider.c | 8 ++++++--
drivers/infiniband/hw/cxgb4/user.h | 2 ++
drivers/infiniband/hw/mlx5/cq.c | 13 +++++++++++--
drivers/infiniband/hw/mlx5/srq.c | 18 +++++++++++++++---
drivers/infiniband/hw/mlx5/user.h | 2 ++
6 files changed, 42 insertions(+), 9 deletions(-)
--
1.9.0
--
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
next prev parent reply other threads:[~2014-05-04 21:21 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-14 16:22 [PATCH net-next 0/2] Doorbell drop Avoidance Bug fix for iw_cxgb4 Hariprasad Shenai
[not found] ` <1394814128-8815-1-git-send-email-hariprasad-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
2014-03-14 16:22 ` [PATCH net-next 1/2] cxgb4/iw_cxgb4: Treat CPL_ERR_KEEPALV_NEG_ADVICE as negative advice Hariprasad Shenai
2014-03-15 2:44 ` [PATCH net-next 0/2] Doorbell drop Avoidance Bug fix for iw_cxgb4 David Miller
2014-03-14 16:22 ` [PATCH net-next 2/2] cxgb4/iw_cxgb4: Doorbell Drop Avoidance Bug Fixes Hariprasad Shenai
[not found] ` <1394814128-8815-3-git-send-email-hariprasad-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
2014-03-26 15:49 ` Yann Droneaud
[not found] ` <1395848977.3297.15.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2014-03-26 15:58 ` Steve Wise
2014-03-26 15:58 ` Steve Wise
2014-03-28 8:24 ` [patch] RDMA/cxgb4: info leak in c4iw_alloc_ucontext() Dan Carpenter
2014-03-28 8:24 ` Dan Carpenter
2014-03-28 10:27 ` Yann Droneaud
2014-03-28 10:27 ` Yann Droneaud
[not found] ` <1396002468.3297.63.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2014-03-28 10:58 ` David Laight
2014-03-28 10:58 ` David Laight
2014-05-02 23:56 ` Dan Carpenter
2014-05-02 23:56 ` Dan Carpenter
2014-05-04 21:21 ` Yann Droneaud [this message]
2014-05-04 21:21 ` [PATCH 2/4] RDMA/mlx5: add missing padding at end of struct mlx5_ib_create_srq Yann Droneaud
[not found] ` <cover.1399216475.git.ydroneaud-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org>
2014-05-04 21:21 ` [PATCH 1/4] RDMA/mlx5: add missing padding at end of struct mlx5_ib_create_cq Yann Droneaud
2014-05-04 21:21 ` [PATCH 3/4] RDMA/cxgb4: add missing padding at end of struct c4iw_create_cq_resp Yann Droneaud
2014-05-04 21:21 ` [PATCH 4/4] RDMA/cxgb4: add missing padding at end of struct c4iw_alloc_ucontext_resp Yann Droneaud
[not found] ` <2236129ab4aa1ad1562858f363fb6fef0d6bc93b.1399216475.git.ydroneaud-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org>
2014-05-05 15:06 ` Steve Wise
2014-05-05 16:59 ` Yann Droneaud
[not found] ` <1399309159.2957.19.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2014-05-05 17:01 ` Steve Wise
2014-05-04 21:31 ` [PATCH libcxgb4 0/2] uverbs ABI fixes Yann Droneaud
2014-05-04 21:41 ` [PATCH libmlx5] abi: adds explicit padding on mlx5_create_cq and mlx5_create_srq Yann Droneaud
2014-05-05 9:01 ` [PATCH for v3.15 0/4] uverbs ABI fixes Yann Droneaud
[not found] ` <cover.1399235229.git.ydroneaud-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org>
2014-05-04 21:31 ` [PATCH libcxgb4 1/2] kernel abi: adds explicit padding in struct c4iw_create_cq_resp Yann Droneaud
2014-05-04 21:31 ` [PATCH libcxgb4 2/2] kernel abi: adds explicit padding in struct c4iw_alloc_ucontext_resp Yann Droneaud
2014-05-05 18:14 ` [PATCH libcxgb4 0/2] uverbs ABI fixes Steve Wise
2014-05-04 21:46 ` [patch] RDMA/cxgb4: info leak in c4iw_alloc_ucontext() Yann Droneaud
2014-05-04 21:46 ` 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.1399216475.git.ydroneaud@opteya.com \
--to=ydroneaud-rly5vtjfyj3qt0dzr+alfa@public.gmane.org \
--cc=dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
--cc=eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=swise-ut6Up61K2wZBDgjK7y7TUQ@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.