Skip to content

xfrm: start adding netlink extack support

Sabrina Dubroca netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6xfrm: propagate extack to all netlink doit handlersnet/xfrm/xfrm_user.c+34 -220 replies
2/6xfrm: add extack support to verify_newpolicy_infonet/xfrm/xfrm_user.c+18 -70 replies
3/6xfrm: add extack to verify_policy_dirnet/xfrm/xfrm_user.c+5 -40 replies
4/6xfrm: add extack to verify_policy_typenet/xfrm/xfrm_user.c+17 -110 replies
5/6xfrm: add extack to validate_tmplnet/xfrm/xfrm_user.c+20 -90 replies
6/6xfrm: add extack to verify_sec_ctx_lennet/xfrm/xfrm_user.c+9 -70 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH ipsec-next 0/6] xfrm: start adding netlink extack support

XFRM states and policies are complex objects, and there are many reasons why the kernel can reject userspace's request to create one. This series makes it a bit clearer by providing extended ack messages for policy creation.

A few other operations that reuse the same helper functions are also getting partial extack support in this series. More patches will follow to complete extack support, in particular for state creation.

Note: The policy->share attribute seems to be entirely ignored in the kernel outside of checking its value in verify_newpolicy_info(). There are some (very) old comments in copy_from_user_policy and copy_to_user_policy suggesting that it should at least be copied to/from userspace. I don't know what it was intended for.

Sabrina Dubroca (6):
xfrm: propagate extack to all netlink doit handlers
xfrm: add extack support to verify_newpolicy_info
xfrm: add extack to verify_policy_dir
xfrm: add extack to verify_policy_type
xfrm: add extack to validate_tmpl
xfrm: add extack to verify_sec_ctx_len

 net/xfrm/xfrm_user.c | 163 +++++++++++++++++++++++++++----------------
 1 file changed, 103 insertions(+), 60 deletions(-)
Signature · 1 line
2.37.2