xfrm: provide message size for XFRM_MSG_MAPPING
Subsystems (3)
PATCH 1/1 xfrm: provide message size for XFRM_MSG_MAPPING
In reply to a message not in the archiveFrom: Ruijie Li <[email protected]>
The compat 64=>32 translation path handles XFRM_MSG_MAPPING, but xfrm_msg_min[] does not provide the native payload size for this message type.
Add the missing XFRM_MSG_MAPPING entry so compat translation can size and translate mapping notifications correctly.
Fixes 5461fc0c8d9f ("xfrm/compat: Add 64=>32-bit messages translator")
Reported-by Yuan Tan <[email protected]>
Reported-by Yifan Wu <[email protected]>
Reported-by Juefei Pu <[email protected]>
Reported-by Xin Liu <[email protected]>
Signed-off-by Ruijie Li <[email protected]>
Signed-off-by Ren Wei <[email protected]>
--- net/xfrm/xfrm_user.c | 1 + 1 file changed, 1 insertion(+)
net/xfrm/xfrm_user.c +1 -0
@@ -3323,6 +3323,7 @@ const int xfrm_msg_min[XFRM_NR_MSGTYPES] = { [XFRM_MSG_GETSADINFO - XFRM_MSG_BASE] = sizeof(u32), [XFRM_MSG_NEWSPDINFO - XFRM_MSG_BASE] = sizeof(u32), [XFRM_MSG_GETSPDINFO - XFRM_MSG_BASE] = sizeof(u32), + [XFRM_MSG_MAPPING - XFRM_MSG_BASE] = XMSGSIZE(xfrm_user_mapping), [XFRM_MSG_SETDEFAULT - XFRM_MSG_BASE] = XMSGSIZE(xfrm_userpolicy_default), [XFRM_MSG_GETDEFAULT - XFRM_MSG_BASE] = XMSGSIZE(xfrm_userpolicy_default), };
Signature · 1 line
2.34.1
Quoted 9 lines · Ren Wei
From: Ruijie Li <[email protected]>
The compat 64=>32 translation path handles
XFRM_MSG_MAPPING, but xfrm_msg_min[] does not provide the native payload size for this message type.Add the missing
XFRM_MSG_MAPPINGentry so compat translation can size and translate mapping notifications correctly.
Quoted 8 lines
Fixes 5461fc0c8d9f ("xfrm/compat: Add 64=>32-bit messages translator")Reported-by Yuan Tan <[email protected]>Reported-by Yifan Wu <[email protected]>Reported-by Juefei Pu <[email protected]>Reported-by Xin Liu <[email protected]>Signed-off-by Ruijie Li <[email protected]>Signed-off-by Ren Wei <[email protected]>
Applied, thanks a lot!