diff options
| author | Arnd Bergmann <arnd@arndb.de> | 2025-12-08 14:33:05 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-01-08 10:16:49 +0100 |
| commit | 263255a62cea53699aa52cd033fcf765513f815f (patch) | |
| tree | 6670f345ccbb9a58f1109139038f10ff66968e8a /include | |
| parent | 787515ccb2292f82eb0876993129154629a49651 (diff) | |
| download | linux-263255a62cea53699aa52cd033fcf765513f815f.tar.gz linux-263255a62cea53699aa52cd033fcf765513f815f.tar.bz2 linux-263255a62cea53699aa52cd033fcf765513f815f.zip | |
RDMA/ucma: Fix rdma_ucm_query_ib_service_resp struct padding
[ Upstream commit 2dc675f614850b80deab7cf6d12902636ed8a7f4 ]
On a few 32-bit architectures, the newly added ib_user_service_rec
structure is not 64-bit aligned the way it is on most regular ones.
Add explicit padding into the rdma_ucm_query_ib_service_resp and
rdma_ucm_resolve_ib_service structures that embed it, so that the layout
is compatible across all of them.
This is an ABI change on i386, aligning it with x86_64 and the other
64-bit architectures to avoid having to use a compat ioctl handler.
Fixes: 810f874eda8e ("RDMA/ucma: Support query resolved service records")
Link: https://patch.msgid.link/r/20251208133311.313977-1-arnd@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/uapi/rdma/rdma_user_cm.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/uapi/rdma/rdma_user_cm.h b/include/uapi/rdma/rdma_user_cm.h index 5ded174687ee..838f8d460256 100644 --- a/include/uapi/rdma/rdma_user_cm.h +++ b/include/uapi/rdma/rdma_user_cm.h @@ -192,6 +192,7 @@ struct rdma_ucm_query_path_resp { struct rdma_ucm_query_ib_service_resp { __u32 num_service_recs; + __u32 reserved; struct ib_user_service_rec recs[]; }; @@ -354,7 +355,7 @@ enum { #define RDMA_USER_CM_IB_SERVICE_NAME_SIZE 64 struct rdma_ucm_ib_service { - __u64 service_id; + __aligned_u64 service_id; __u8 service_name[RDMA_USER_CM_IB_SERVICE_NAME_SIZE]; __u32 flags; __u32 reserved; @@ -362,6 +363,7 @@ struct rdma_ucm_ib_service { struct rdma_ucm_resolve_ib_service { __u32 id; + __u32 reserved; struct rdma_ucm_ib_service ibs; }; |
