Livepatch in Userspace Based on Uprobe
summary
Builds relocatable patch objects by compiling twice with -ffunction-sections and -fdata-sections, correlating sections by symbol and including modified functions plus referenced sections into a relocatable patch; loads those patches per-process via code injection and ptrace-style steps; uses user-space tracing u-probe to replace instruction bytes with a soft interrupt 0xcc that routes to kernel handlers; maintains a per-thread count table to find safe switch moments and supports both atomic and staged consistency models. Prototype named upatch and demos on libc/nginx.
AI-written summary · about
chapters (13)
- 0:00Start
- 1:13Livepatch in Userspace Based on Uprobe
- 2:38ELF and binary relocations
- 20:56Differences for user-space
- 23:06Code injection is necessary - ptrace + proc
- 24:29Limited consistency model
- 28:37Hijack the compiler-Build the patch
- 31:09Recognize the target process - Load the patch
- 31:40Stack trace - Consistency model
- 33:30Stack trace - Code injection
- 35:33Per-task - Apply the patch
- 37:01Count once, update it in real-time - Apply the patch
- 38:55Pre-link for the Livepatch
related talks
39mLet's meet the kernel livepatch feature
18mKernel Live Patching: Mitigating CVEs With Zero Downtime
47mAdaptive Kernel Live Patching: An Open Collaborative Effort...
16mPatchlings: Enabling A/B-Equivalent OTA Updates for Deeply Embedded...
41mKernel Live Patching at Scale
29mNon-Intrusive Vulnerability Localization and Hotpatching for Industrial Control Systems
05mProject Lightning Talk: Project Copacetic
30mFrom an OSS-Fuzz Report to LKML Patch Submission: A Hands-on Journey
