I am trying to understand a new concept I got to know recently as the Linux 4.0 makes it way to the mainline - "Live Patching".
Supposedly this is a new feature enhancement of the Linux kernel. It was first developed independently by Red Hat and Open SUSE about a year ago.
I know, any feature developments/bug fixes are generally implemented in the Linux kernel via patches, i.e., you apply the patch for the concerned Linux kernel version, Re-Compile the Kernel Source and install it via usual methods of
$make;sudo make install.
The interesting part of the supposedly "live patching" mechanism is that, you won't have to re-compile and install a new kernel version?. I Mean, your GRUB won't show an entry to a newer kernel version right?, because you didn't make install one.
Now, this is some serious concept to digest for me. How is it possible even?, How would it be implemented?.
Red Hat and Open SUSE use the Kpatch and kGraft respectively to implement it.
I would like to try out a simple kernel module, and use one of Kpatch or kGraft to implement it. But I have an Ubuntu 14.04 system, any alternative for Ubuntu?
The closest that I came to understanding this new concept is, you would need to write and compile the patch in a new framework (like ftrace). So, you would have the API/ABI from the user-space just redirected from the "faulty" kernel module to the newer API/ABI implementation that you just installed using this patch (how would one "just" install a patch which is built in a special framework?). Am I right here?
If anyone who is a Linux kernel expert knows about this, I would love to hear from you what this "live patching" is all about and how would one go about creating a live patch and then, how would the user of the system, install this patch and verify it's functionality (test it)?
Along with understanding this concept, I would like to know how to program such a "live patch"?. And what all environment would I need to do so too?