summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLi Bin <huawei.libin@huawei.com>2014-12-19 14:11:17 +0800
committerJiri Kosina <jkosina@suse.cz>2014-12-22 15:40:49 +0100
commitb5bfc51707f1b56b0b733980bb4fcc0562bf02d8 (patch)
tree3b31bf562c78492f3ad304bb053426eb0f9bcbb6 /kernel
parent13d1cf7e702596e0cd8ec62afa6bd49c431f2d0c (diff)
downloadop-kernel-dev-b5bfc51707f1b56b0b733980bb4fcc0562bf02d8.zip
op-kernel-dev-b5bfc51707f1b56b0b733980bb4fcc0562bf02d8.tar.gz
livepatch: move x86 specific ftrace handler code to arch/x86
The execution flow redirection related implemention in the livepatch ftrace handler is depended on the specific architecture. This patch introduces klp_arch_set_pc(like kgdb_arch_set_pc) interface to change the pt_regs. Signed-off-by: Li Bin <huawei.libin@huawei.com> Acked-by: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/livepatch/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c
index f99fe18..07a2db9 100644
--- a/kernel/livepatch/core.c
+++ b/kernel/livepatch/core.c
@@ -272,7 +272,7 @@ static void notrace klp_ftrace_handler(unsigned long ip,
{
struct klp_func *func = ops->private;
- regs->ip = (unsigned long)func->new_func;
+ klp_arch_set_pc(regs, (unsigned long)func->new_func);
}
static int klp_disable_func(struct klp_func *func)
OpenPOWER on IntegriCloud