Skip to content

Latest commit

 

History

History
19 lines (14 loc) · 654 Bytes

linux-kernel-livepatching.md

File metadata and controls

19 lines (14 loc) · 654 Bytes

Linux Kernel Live Patching Architecture (klp)

Enables security patching of running kernel code without requiring system reboots.

flowchart TD
    Call[Caller invokes vulnerable_function] --> Ftrace[ftrace mcount / fentry stub]
    Ftrace --> KLP{klp active?}
    KLP -->|Yes| New[Redirect to patched_function]
    KLP -->|No| Old[Execute original vulnerable_function]
Loading

1. Consistency Model

Linux livepatching utilizes a per-task consistency model:

  • Threads running during patch transition complete their current syscall before switching to the new version.
  • Sleeping tasks switch execution to patched functions upon waking.