mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 15:27:29 +00:00
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>
This commit is contained in:
parent
13d1cf7e70
commit
b5bfc51707
2 changed files with 6 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue