From Gentoo Wiki
kpatch is a GPLv2 licensed dynamic kernel patching tool developed by RedHat.
The Linux kernel must be version 4.0 or higher in order to have LIVEPATCH support.
General setup ---> [*] Configure standard kernel features (expert users) ---> -*- Load all symbols for debugging/ksymoops [*] Include all symbols in kallsyms [*] Enable loadable module support ---> Processor type and features ---> [*] Kernel Live Patching Kernel hacking ---> [*] Tracers ---> [*] Kernel Function Tracer File systems ---> Pseudo filesystems ---> -*- sysfs file system support
USE flags for sys-kernel/kpatch Dynamic kernel patching for Linux
||Enable contrib kpatch services files.|
||Enable subslot rebuilds on Distribution Kernel upgrades|
||Enable a kernel module (.ko file) which provides an interface for the patch modules to register new functions for replacement.|
||Enable a command-line tool which allows a user to manage a collection of patch modules.|
||Enable tools which convert a source diff patch to a patch module.|
||Enable dependencies and/or preparations necessary to run tests (usually controlled by FEATURES=test but can be toggled independently)|
emerge --ask sys-kernel/kpatch