STRUCT KLP_PATCH(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct klp_patch(9) ✨

okay so bestie, welcome to the glow-up era of struct klp_patch β€” it's the patch structure for live patching, and it's literally the main character of this whole header file πŸ’…


🌸 SYNOPSIS 🌸

struct klp_patch {
    struct module *mod;
    struct klp_object *objs;
    struct klp_state *states;
    bool replace;
    struct list_head list;
    struct kobject kobj;
    struct list_head obj_list;
    bool enabled;
    bool forced;
    struct work_struct free_work;
    struct completion finish;
 };

πŸŽ€ Members πŸŽ€

Here's the whole cast, no skips, no cuts 🫢

  • mod β€” reference to the live patch module
  • objs β€” object entries for kernel objects to be patched
  • states β€” system states that can get modified
  • replace β€” replace all actively used patches
  • list β€” list node for global list of actively used patches
  • kobj β€” kobject for sysfs resources
  • obj_list β€” dynamic list of the object entries
  • enabled β€” the patch is enabled (but operation may be incomplete)
  • forced β€” was involved in a forced transition
  • free_work β€” patch cleanup from workqueue-context
  • finish β€” for waiting till it is safe to remove the patch module
ngl bestie, peep that enabled one β€” enabled does not mean "all done", it means "operation may be incomplete". do not get it twisted 😭

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./include/linux/livepatch.h plus these absolute icons: struct klp_func(9), struct klp_object(9), struct klp_state(9) β€” go read them, iykyk πŸ’–


and that's the whole vibe check, bestie β€” go patch something iconic πŸ‘‘

sign-off szn: this one lives in ./include/linux, dated October 2026 πŸŽ€ periodt.

πŸ“¦ where this page comes from