STRUCT KLP_CALLBACKS(9)
π struct klp_callbacks(9)
okay bestie, welcome to the struct klp_callbacks(9) page from the Kernel API Manual β¨ β this is the callback structure for pre/post live-(un)patch, and we're gonna make it make sense, fr fr.
β¨ NAME
struct klp_callbacksβ pre/post live-(un)patch callback structure. that's the whole name, iconic and exact π
π SYNOPSIS
struct klp_callbacks {
klp_pre_patch_t pre_patch;
klp_post_patch_t post_patch;
klp_pre_unpatch_t pre_unpatch;
klp_post_unpatch_t post_unpatch;
bool post_unpatch_enabled;
};
π«Ά MEMBERS
pre_patchβ executed before code patching. yep, before the patch moment πpost_patchβ executed after code patching. after the patch, bestie πΈpre_unpatchβ executed before code unpatching. before the unpatch era π¦post_unpatchβ executed after code unpatching. after the unpatch, periodt πpost_unpatch_enabledβ flag indicating if post-unpatch callback should run. it's the littleboolvibe check for that callback β
π DESCRIPTION
okay so all callbacks are optional β every single one. Only the pre-patch callback, if provided, will be unconditionally executed. that's the main character of this struct, no cap.
If the parent klp_object fails to patch for any reason, including a non-zero error status returned from the pre-patch callback, no further callbacks will be executed. like, full stop, bestie π
π₯ SEE ALSO
- Kernel file
./tools/include/linux/livepatch_external.hβ go read it, iykyk π
mwah π source: ./tools/include/linux Β· date: October 2026 Β· page: struct klp_callbacks(9) β catch you in the kernel, bestie π«Ά
π¦ 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