Linux Kernel Live Patching
summary
Describes a live kernel patching method that replaces whole functions at runtime to avoid reboots, using ftrace fentry for redirection and stop_machine plus stack walking to guarantee no patched function is on any task stack, with generated patch modules and kpatch packaging. Notes a measured overhead up to 30% when using heavy tracing, recommends switching tracing modes, and shows a real fix that restores creation of >65,000 cgroups/containers without reboot. Limitations include no structural feature adds and manual handling for complex data-structure changes via shadow variables.
AI-written summary · about
chapters (14)
- 0:00Intro
- 0:15What is live patching
- 2:15Why live patching
- 5:50FTrace
- 7:57Scheduling
- 9:10Schedule Function
- 10:58Stop Machine
- 13:48Before Patching
- 14:42Security Check
- 15:44Verify Backtrace
- 18:29Generating Live Patching
- 19:38Review
- 21:01Demo
- 26:40QA
related talks
28mHyperscale Kernel Live Patching at Meta
33mHow We Learned to Fix Planes Midflight
24mKLP for Clang LTO Kernel
34mLivepatch Visibility at Scale
33mPreserving IOMMU States During Kexec Reboot
30mYou Might Still Need Patches for Denim
15mKVM Live Upgrade with Properly Handling of Passthrough Devices
16mXkernel: Principled Performance Tunability of Operating System Kernels
