public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net 1/1] xfrm: provide message size for XFRM_MSG_MAPPING
       [not found] <cover.1777354203.git.ruijieli51@gmail.com>
@ 2026-04-28 16:41 ` Ren Wei
  2026-04-30  7:56   ` Steffen Klassert
  0 siblings, 1 reply; 2+ messages in thread
From: Ren Wei @ 2026-04-28 16:41 UTC (permalink / raw)
  To: netdev
  Cc: steffen.klassert, herbert, davem, edumazet, kuba, pabeni, horms,
	0x7f454c46, yuantan098, yifanwucs, tomapufckgml, bird, ruijieli51,
	n05ec

From: Ruijie Li <ruijieli51@gmail.com>

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")
Cc: stable@kernel.org
Reported-by: Yuan Tan <yuantan098@gmail.com>
Reported-by: Yifan Wu <yifanwucs@gmail.com>
Reported-by: Juefei Pu <tomapufckgml@gmail.com>
Reported-by: Xin Liu <bird@lzu.edu.cn>
Signed-off-by: Ruijie Li <ruijieli51@gmail.com>
Signed-off-by: Ren Wei <n05ec@lzu.edu.cn>
---
 net/xfrm/xfrm_user.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
index d56450f61669..38a90e5ee3d9 100644
--- a/net/xfrm/xfrm_user.c
+++ b/net/xfrm/xfrm_user.c
@@ -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),
 };
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net 1/1] xfrm: provide message size for XFRM_MSG_MAPPING
  2026-04-28 16:41 ` [PATCH net 1/1] xfrm: provide message size for XFRM_MSG_MAPPING Ren Wei
@ 2026-04-30  7:56   ` Steffen Klassert
  0 siblings, 0 replies; 2+ messages in thread
From: Steffen Klassert @ 2026-04-30  7:56 UTC (permalink / raw)
  To: Ren Wei
  Cc: netdev, herbert, davem, edumazet, kuba, pabeni, horms, 0x7f454c46,
	yuantan098, yifanwucs, tomapufckgml, bird, ruijieli51

On Wed, Apr 29, 2026 at 12:41:43AM +0800, Ren Wei wrote:
> From: Ruijie Li <ruijieli51@gmail.com>
> 
> 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")
> Cc: stable@kernel.org
> Reported-by: Yuan Tan <yuantan098@gmail.com>
> Reported-by: Yifan Wu <yifanwucs@gmail.com>
> Reported-by: Juefei Pu <tomapufckgml@gmail.com>
> Reported-by: Xin Liu <bird@lzu.edu.cn>
> Signed-off-by: Ruijie Li <ruijieli51@gmail.com>
> Signed-off-by: Ren Wei <n05ec@lzu.edu.cn>

Applied, thanks a lot!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-04-30  7:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <cover.1777354203.git.ruijieli51@gmail.com>
2026-04-28 16:41 ` [PATCH net 1/1] xfrm: provide message size for XFRM_MSG_MAPPING Ren Wei
2026-04-30  7:56   ` Steffen Klassert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox