kho_restore_free(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’œ kho_restore_free(9) πŸ’œ

okay bestie, welcome to the kho_restore_free(9) page β€” it lives in the Kernel API Manual, and honestly? it's a lil post-kexec glow-up moment ✨

🫢 NAME 🫢

kho_restore_free β€” bestie's job is literally restore and free memory after kexec, no cap πŸ’…


🌸 SYNOPSIS 🌸

void kho_restore_free (void *mem );

πŸŽ€ ARGUMENTS πŸŽ€

  • mem β€” a pointer to the memory (living in the new kernel's address space, iykyk) that was allocated by the old kernel. like, the old one did the allocating, you're just here to claim it πŸ’–

✨ DESCRIPTION ✨

so this function is the one you call in the new kernel (yes, post-kexec, exactly) to take ownership of a memory region β€” and then free it β€” where that region was preserved by the old kernel using kho_alloc_preserve. it's giving handoff. it's giving main character energy πŸ”₯

here's the tea on what it actually does, in order:

  1. it first restores the pages from KHO (using their physical address β€” that part matters 🫢)
  2. then it frees the pages back to the new kernel's page allocator

that's it. restore, then free. two steps, both iconic, periodt πŸ‘‘


πŸ¦‹ SEE ALSO πŸ¦‹

ngl that's a whole friend group of functions, and every single one of them is in here πŸ’€ go read them, bestie, they're all linked in spirit 🧚

mwah πŸ’‹ this page came from the Kernel file ./kernel/liveupdate, dated October 2026 β€” and that's the whole footer, slay 🌈⭐

πŸ“¦ where this page comes from