2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-25 13:43:55 +08:00
linux-next/include/uapi/rdma
Jason Gunthorpe 958d2c1ba3 RDMA/bnxt: Fix structure layout for bnxt_re_pd_resp
What is going on here is a bit subtle, in the kernel there is no
problem because the struct is copied using copy_from_user, so it
can safely have an 8 byte alignment, however in userspace it must
be constructed by concatenation with the ib_uverbs_alloc_pd_resp
struct. This is due to the required memory layout to execute the
command.

Since ibv_uverbs_alloc_pd_resp is only 4 bytes long, this causes
misalignment, and the user space will experience an unexpected padding.
Currently it works around this via pointer maths.

Make everything more robust by having the compiler reduce the alignment
of the struct to 4. The userspace has assertions to ensure this
works properly in all situations.

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2018-03-19 11:41:40 -06:00
..
hfi RDMA: Do not used __packed in uapi headers 2018-02-14 16:31:35 -07:00
bnxt_re-abi.h RDMA/bnxt: Fix structure layout for bnxt_re_pd_resp 2018-03-19 11:41:40 -06:00
cxgb3-abi.h License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
cxgb4-abi.h RDMA/cxgb4: Use structs to describe the uABI instead of opencoding 2018-03-15 15:58:04 -06:00
hns-abi.h RDMA/hns: Use structs to describe the uABI instead of opencoding 2018-03-15 15:58:04 -06:00
i40iw-abi.h RDMA/i40iw: Move uapi header to include/uapi 2018-03-15 15:58:03 -06:00
ib_user_cm.h License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
ib_user_ioctl_verbs.h IB/core: Add completion queue (cq) object actions 2017-08-31 08:35:13 -04:00
ib_user_mad.h License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
ib_user_sa.h License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
ib_user_verbs.h RDMA/uverbs: Reduce number of command header flags checks 2018-02-22 22:31:18 -05:00
mlx4-abi.h IB/mlx4: Report TSO capabilities 2018-03-15 15:58:05 -06:00
mlx5-abi.h IB/mlx5: Mmap the HCA's clock info to user-space 2018-01-18 14:49:21 -05:00
mthca-abi.h License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
nes-abi.h License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
ocrdma-abi.h RDMA: Do not used __packed in uapi headers 2018-02-14 16:31:35 -07:00
qedr-abi.h License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
rdma_netlink.h RDMA/nldev: provide detailed PD information 2018-03-08 15:03:03 -05:00
rdma_user_cm.h License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
rdma_user_ioctl.h IB/uverbs: Use __aligned_u64 for uapi headers 2018-02-15 14:59:45 -07:00
rdma_user_rxe.h RDMA/rxe: Use structs to describe the uABI instead of opencoding 2018-03-15 15:58:02 -06:00
vmw_pvrdma-abi.h RDMA/vmw_pvrdma: Remove usage of BIT() from UAPI header 2017-12-27 21:37:26 -07:00