kexec_add_buffer(9)
π kexec_add_buffer(9) π
okay so bestie, this page is from the Kernel API Manual, and it's literally about putting a buffer into a kexec segment. lowkey iconic kernel business. no cap.
πΈ NAME πΈ
kexec_add_buffer β place a buffer in a kexec segment. that's the whole vibe.
β¨ SYNOPSIS β¨
int kexec_add_buffer (struct kexec_buf *kbuf );
π«Ά ARGUMENTS π«Ά
kbufβ buffer contents and memory parameters. it's giving "everything you need to describe the buffer and where it goes" energy.
π¦ DESCRIPTION π¦
so here's the tea: this function assumes that kexec_lock is held. like, it's not out here grabbing the lock itself, bestie. that's on you. π₯
on successful return, kbuf->mem will have the physical address of the buffer in memory. so after it slays, you can peek at kbuf->mem and that's where the buffer physically lives. periodt.
π RETURN π
0on success β ate, no notes. π- negative
errnoon error β it's giving "something went wrong" and you should check that errno. π
π SEE ALSO π
- Kernel file
./kernel/kexec_file.c kexec_walk_resources(9)kexec_locate_mem_hole(9)
this little manual page is from ./kernel, dated October 2026 β mwah, stay hydrated and hold your locks correctly πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms