2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-16 01:04:08 +08:00

livepatch: use FTRACE_OPS_FL_IPMODIFY

Use the FTRACE_OPS_FL_IPMODIFY flag to prevent conflicts with other
ftrace users who also modify regs->ip.

Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Reviewed-by: Petr Mladek <pmladek@suse.cz>
Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
Josh Poimboeuf 2014-12-22 13:39:54 +01:00 committed by Jiri Kosina
parent b5bfc51707
commit 33e8612f64

View File

@ -641,7 +641,8 @@ static int klp_init_func(struct klp_object *obj, struct klp_func *func)
ops->private = func;
ops->func = klp_ftrace_handler;
ops->flags = FTRACE_OPS_FL_SAVE_REGS | FTRACE_OPS_FL_DYNAMIC;
ops->flags = FTRACE_OPS_FL_SAVE_REGS | FTRACE_OPS_FL_DYNAMIC |
FTRACE_OPS_FL_IPMODIFY;
func->fops = ops;
func->state = KLP_DISABLED;