mirror of
https://github.com/torvalds/linux.git
synced 2024-11-21 19:46:16 +00:00
2860cd8a23
When CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS is available, the ftrace call will be able to set the ip of the calling function. This will improve the performance of live kernel patching where it does not need all the regs to be stored just to change the instruction pointer. If all archs that support live kernel patching also support HAVE_DYNAMIC_FTRACE_WITH_ARGS, then the architecture specific function klp_arch_set_pc() could be made generic. It is possible that an arch can support HAVE_DYNAMIC_FTRACE_WITH_ARGS but not HAVE_DYNAMIC_FTRACE_WITH_REGS and then have access to live patching. Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Jiri Kosina <jikos@kernel.org> Cc: live-patching@vger.kernel.org Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Miroslav Benes <mbenes@suse.cz> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
21 lines
654 B
Plaintext
21 lines
654 B
Plaintext
# SPDX-License-Identifier: GPL-2.0-only
|
|
config HAVE_LIVEPATCH
|
|
bool
|
|
help
|
|
Arch supports kernel live patching
|
|
|
|
config LIVEPATCH
|
|
bool "Kernel Live Patching"
|
|
depends on DYNAMIC_FTRACE_WITH_REGS || DYNAMIC_FTRACE_WITH_ARGS
|
|
depends on MODULES
|
|
depends on SYSFS
|
|
depends on KALLSYMS_ALL
|
|
depends on HAVE_LIVEPATCH
|
|
depends on !TRIM_UNUSED_KSYMS
|
|
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.
|