summaryrefslogtreecommitdiffstats
path: root/include/uapi/rdma/rdma_user_cm.h
diff options
context:
space:
mode:
authorJason Gunthorpe2018-03-20 21:19:47 +0100
committerJason Gunthorpe2018-03-27 22:25:08 +0200
commit611cb92b082ad16b2fe1258e51d5aca7de540dfb (patch)
tree641fe2e35df9c9441bcf8b324bc179f1b219e86c /include/uapi/rdma/rdma_user_cm.h
parentRDMA: Remove minor pahole differences between 32/64 (diff)
downloadkernel-qcow2-linux-611cb92b082ad16b2fe1258e51d5aca7de540dfb.tar.gz
kernel-qcow2-linux-611cb92b082ad16b2fe1258e51d5aca7de540dfb.tar.xz
kernel-qcow2-linux-611cb92b082ad16b2fe1258e51d5aca7de540dfb.zip
RDMA/ucma: Fix uABI structure layouts for 32/64 compat
The rdma_ucm_event_resp is a different length on 32 and 64 bit compiles. The kernel requires it to be the expected length or longer so 32 bit builds running on a 64 bit kernel will not work. Retain full compat by having all kernels accept a struct with or without the trailing reserved field. Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'include/uapi/rdma/rdma_user_cm.h')
-rw-r--r--include/uapi/rdma/rdma_user_cm.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/uapi/rdma/rdma_user_cm.h b/include/uapi/rdma/rdma_user_cm.h
index c83ef0026079..65399c837762 100644
--- a/include/uapi/rdma/rdma_user_cm.h
+++ b/include/uapi/rdma/rdma_user_cm.h
@@ -270,10 +270,15 @@ struct rdma_ucm_event_resp {
__u32 id;
__u32 event;
__u32 status;
+ /*
+ * NOTE: This union is not aligned to 8 bytes so none of the union
+ * members may contain a u64 or anything with higher alignment than 4.
+ */
union {
struct rdma_ucm_conn_param conn;
struct rdma_ucm_ud_param ud;
} param;
+ __u32 reserved;
};
/* Option levels */