lkml.org 
[lkml]   [2014]   [Dec]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] livepatch: use FTRACE_OPS_FL_IPMODIFY
(2014/12/19 0:49), Josh Poimboeuf wrote:
> On Thu, Dec 18, 2014 at 08:55:21PM +0900, Masami Hiramatsu wrote:
>> (2014/12/17 2:58), Seth Jennings wrote:
>>> changes in v7:
>>> - TODO: set IPMODIFY (not a blocker to moving forward)
>>
>> Why don't you set this?
>> IPMODIFY series are not completely applied yet, but you can already
>> use the flag. All you need is just set it :)
>
> Yeah, I don't see any reason why we can't start using this flag now.
> How about we add this patch to the queue?
>
> -->8--
>
> Subject: 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>

Looks good to me :)

Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>

Thanks!

> ---
> kernel/livepatch/core.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c
> index 0004a71..bdd99975 100644
> --- a/kernel/livepatch/core.c
> +++ b/kernel/livepatch/core.c
> @@ -640,7 +640,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_FL_IPMODIFY;
> func->fops = ops;
> func->state = KLP_DISABLED;
>
>


--
Masami HIRAMATSU
Software Platform Research Dept. Linux Technology Research Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@hitachi.com




\
 
 \ /
  Last update: 2014-12-19 05:01    [W:0.076 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site