nla_memdup(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… nla_memdup β€” from the Kernel API Manual (section 9, bestie) πŸŽ€

okay so real talk, this is a page straight out of the Kernel API Manual, and it's tiny but it's mighty. it's nla_memdup(9), and yes, the header literally says nla_memdup(9) twice because the kernel has main character energy and refuses to be subtle πŸ’€


✨ NAME ✨

nla_memdup β€” duplicate attribute memory (kmemdup) 🫢

like, it copies a netlink attribute's memory. that's the whole vibe. kmemdup is right there in the parentheses, iykyk.


🌸 SYNOPSIS 🌸

void * nla_memdup (const struct nlattr *src , gfp_t gfp );

look at that signature. it's giving "give me an attribute and a flag and I'll hand you back a void *" πŸ’–


πŸ¦‹ ARGUMENTS πŸ¦‹

  • src β€” the netlink attribute you wanna duplicate from. your source material. the original, the blueprint, the moment.
  • gfp β€” the GFP mask. that's the allocation-flags situation, it's how the kernel knows how to get the memory for you. respect the mask fr fr πŸ™

πŸ‘‘ SEE ALSO πŸ‘‘

okay this section is literally the whole netlink cinematic universe. like, not me scrolling through a hundred siblings and cousins of nla_memdup 😭 every single one of these is a real page, no cap:

πŸ’€ bestie that's a lot of friends. nla_memdup is lowkey the social butterfly of ./include/net/netlink.h.

and that's the whole page! it lives out in ./include/net, dated October 2026 β€” so yeah, from the future, slay ⭐ πŸ’œ

πŸ“¦ where this page comes from