mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-30 16:07:39 +00:00
b700e7f03d
This commit introduces code for the live patching core. It implements an ftrace-based mechanism and kernel interface for doing live patching of kernel and kernel module functions. It represents the greatest common functionality set between kpatch and kgraft and can accept patches built using either method. This first version does not implement any consistency mechanism that ensures that old and new code do not run together. In practice, ~90% of CVEs are safe to apply in this way, since they simply add a conditional check. However, any function change that can not execute safely with the old version of the function can _not_ be safely applied in this version. [ jkosina@suse.cz: due to the number of contributions that got folded into this original patch from Seth Jennings, add SUSE's copyright as well, as discussed via e-mail ] Signed-off-by: Seth Jennings <sjenning@redhat.com> Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Reviewed-by: Miroslav Benes <mbenes@suse.cz> Reviewed-by: Petr Mladek <pmladek@suse.cz> Reviewed-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Signed-off-by: Miroslav Benes <mbenes@suse.cz> Signed-off-by: Petr Mladek <pmladek@suse.cz> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
18 lines
583 B
Text
18 lines
583 B
Text
config ARCH_HAVE_LIVE_PATCHING
|
|
boolean
|
|
help
|
|
Arch supports kernel live patching
|
|
|
|
config LIVE_PATCHING
|
|
boolean "Kernel Live Patching"
|
|
depends on DYNAMIC_FTRACE_WITH_REGS
|
|
depends on MODULES
|
|
depends on SYSFS
|
|
depends on KALLSYMS_ALL
|
|
depends on ARCH_HAVE_LIVE_PATCHING
|
|
help
|
|
Say Y here if you want to support kernel live patching.
|
|
This option has no runtime impact until a kernel "patch"
|
|
module uses the interface provided by this option to register
|
|
a patch, causing calls to patched functions to be redirected
|
|
to new function code contained in the patch module.
|