fpstate_realloc(9)
π NAME π
okay bestie, this is fpstate_realloc(9) from the Kernel API Manual β and it is literally here to Reallocate struct fpstate for the requested new features. iconic behavior, no cap β¨
π¦ SYNOPSIS π¦
int fpstate_realloc (u64 xfeatures , unsigned int ksize , unsigned int
usize , struct fpu_guest *guest_fpu );
π ARGUMENTS π
xfeaturesβ a bitmap of xstate features which extend the enabled features of that task. lowkey the feature wishlist πksizeβ the required size for the kernel buffer. kernel-side room service π«Άusizeβ the required size for user space buffers. user-side space, slay πΈguest_fpuβ pointer to a guest FPU container.NULLfor host allocations. yes,NULLis valid here, periodt π
π DESCRIPTION π
okay so real talk β here's the note vs. vmalloc: if the task with a vzalloc-allocated buffer terminates quickly, vfree-induced IPIs may be a concern, but tasks with large states are likely to live longer. that's the whole vibe check, bestie π§
β RETURN β
0 on success, -ENOMEM on allocation error. when it's 0 we celebrate; when it's -ENOMEM we cry a lil π
π SEE ALSO π
- Kernel file
./arch/x86/kernel/fpu/xstate.c check_xtile_data_against_struct(9)__copy_xstate_to_uabi_buf(9)copy_xstate_to_uabi_buf(9)copy_uabi_to_xstate(9)xsaves(9)xrstors(9)fpu_xstate_prctl(9)
go read these too, iykyk π
and that's the page, bestie π this cutie comes from ./arch/x86/kernel/fpu, dated October 2026, and it's literally fpstate_realloc(9) β byeee π
β¨
π¦ 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