Skip to content

uverbs ABI fixes

Yann Droneaud kernel-janitors linux-rdma netdev 1 version Applied

Status from this message: Applied. Thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 of 4 patches 5 repliesApplied

3 of 4 patches are in this archive. The cover letter announces 4.

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/4RDMA/mlx5: add missing padding at end of struct mlx5_ib_create_cqdrivers/infiniband/hw/mlx5/cq.c drivers/infiniband/hw/mlx5/user.h+12 -20 replies
3/4RDMA/cxgb4: add missing padding at end of struct c4iw_create_cq_respdrivers/infiniband/hw/cxgb4/cq.c drivers/infiniband/hw/cxgb4/user.h+2 -20 replies
4/4RDMA/cxgb4: add missing padding at end of struct c4iw_alloc_ucontext_respdrivers/infiniband/hw/cxgb4/provider.c drivers/infiniband/hw/cxgb4/user.h+3 -23 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH for v3.15 0/4] uverbs ABI fixes

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(-)
Signature · 6 lines
1.9.0

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