kvfree_sensitive(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ NAME πŸŽ€

kvfree_sensitive (section 9) β€” free a data object containing sensitive information. okay bestie, welcome to the Kernel API Manual page for the β€œplease actually clear the sensitive stuff” free-er. πŸ’…

✨ SYNOPSIS ✨

void kvfree_sensitive (const void *addr , size_t len );

🌸 ARGUMENTS 🌸

  • addr β€” address of the data object to be freed. that’s the thing you’re releasing, bestie. 🫢
  • len β€” length of the data object. how many bytes, literally.

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here’s the vibe: this uses the special memzero_explicit function to clear the content of a kvmalloc'ed object containing sensitive data. the whole point is to make sure that the compiler won’t optimize out the data clearing. no cap, that’s the important bit β€” the wipe has to survive the compiler’s whole β€œI’m helping” era. 😭πŸ”₯

sensitive data is giving main character energy β€” this is the special clear, not just a casual free. πŸ’–

πŸ‘‘ SEE ALSO πŸ‘‘

the kernel besties in this group chat: Kernel file ./mm/slub.c enum slab_flags(9), kmem_cache_alloc_node(9), kmem_cache_free(9), ksize(9), kfree(9), kvfree(9), kvfree_atomic(9), kmem_cache_alloc_bulk(9). 🌈


mwah πŸ’‹ this little page lives in ./mm and is stamped October 2026 β€” periodt. πŸŽ€βœ¨

πŸ“¦ where this page comes from