From: Josh Poimboeuf Date: Mon, 22 Dec 2014 12:39:54 +0000 (+0100) Subject: livepatch: use FTRACE_OPS_FL_IPMODIFY X-Git-Tag: firefly_0821_release~176^2~2373^2~11 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=33e8612f64d4973ae3617a01224ec02b7b879597;p=firefly-linux-kernel-4.4.55.git 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 Reviewed-by: Petr Mladek Acked-by: Masami Hiramatsu Signed-off-by: Jiri Kosina --- diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c index 07a2db9d01e6..6f6387912da7 100644 --- a/kernel/livepatch/core.c +++ b/kernel/livepatch/core.c @@ -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;