security_xfrm_policy_clone(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… security_xfrm_policy_clone β€” Kernel API Manual, but make it group chat

okay so this is from the Kernel API Manual, section 9, and it's about cloning the LSM state of an xfrm policy β€” sounds intimidating, is actually tiny. no cap. πŸ¦‹


πŸŽ€ NAME

security_xfrm_policy_clone β€” clone xfrm policy LSM state ✨


✨ SYNOPSIS

int security_xfrm_policy_clone (struct xfrm_sec_ctx *old_ctx , struct
       xfrm_sec_ctx **new_ctxp );

🫢 ARGUMENTS

  • old_ctx β€” the xfrm security context you already have, aka the source vibe 🧚 it's a struct xfrm_sec_ctx *.
  • new_ctxp β€” the target xfrm security context, a struct xfrm_sec_ctx ** β€” note the double star bestie, you're handing over a pointer to a pointer so the shiny new thing can land in there πŸ’«

πŸ’– DESCRIPTION

So basically: this allocates a security structure in new_ctxp, and that fresh structure contains all the information from the old_ctx structure. that's the whole plot. no plot twists. 🌸

it's giving "copy the vibe, keep the facts." πŸ’…


πŸ”₯ RETURN

returns 0 if the operation was successful. that's it, that's the return value πŸŽ€


🌈 SEE ALSO

so there is a lot here, and by a lot I mean the entire LSM universe showed up to the party πŸ‘‘ β€” starting with the kernel file ./security/security.c:

like I said. the whole guest list. ate. πŸ’€πŸ”₯


fr fr bestie, that SEE ALSO list is longer than my screen time report β€” but every single one is there, iykyk πŸ™ˆ

and that's the page! brought to you by the fine folks in ./security, dated October 2026 β€” security_xfrm_policy_clone(9), Kernel API Manual, signing off πŸ«ΆπŸŽ€βœ¨

πŸ“¦ where this page comes from