public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Petr Mladek <pmladek@suse.cz>
To: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
	Seth Jennings <sjenning@redhat.com>,
	Jiri Kosina <jkosina@suse.cz>, Vojtech Pavlik <vojtech@suse.cz>,
	Steven Rostedt <rostedt@goodmis.org>,
	Miroslav Benes <mbenes@suse.cz>,
	Christoph Hellwig <hch@infradead.org>,
	Greg KH <gregkh@linuxfoundation.org>,
	Andy Lutomirski <luto@amacapital.net>,
	live-patching@vger.kernel.org, x86@kernel.org, kpatch@redhat.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] livepatch: use FTRACE_OPS_FL_IPMODIFY
Date: Fri, 19 Dec 2014 10:43:35 +0100	[thread overview]
Message-ID: <20141219094335.GA9571@pathway.suse.cz> (raw)
In-Reply-To: <20141218154935.GA6887@treble.redhat.com>

On Thu 2014-12-18 09:49:35, 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>

It makes sense. The flag is available even in 3.19.

Reviewed-by: Petr Mladek <pmladek@suse.cz>

> ---
>  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;
>  
> -- 
> 2.1.0
> 

  parent reply	other threads:[~2014-12-19  9:43 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-16 17:58 [PATCHv7 0/3] Kernel Live Patching Seth Jennings
2014-12-16 17:58 ` [PATCHv7 1/3] kernel: add TAINT_LIVEPATCH Seth Jennings
2014-12-17 14:06   ` Miroslav Benes
2014-12-17 15:15   ` Petr Mladek
2014-12-18 11:44   ` Masami Hiramatsu
2014-12-18 15:52     ` Jiri Kosina
2014-12-19  3:36       ` Masami Hiramatsu
2014-12-16 17:58 ` [PATCHv7 2/3] kernel: add support for live patching Seth Jennings
2014-12-16 18:46   ` Balbir Singh
2014-12-16 19:41     ` Seth Jennings
2014-12-17 14:09   ` Miroslav Benes
2014-12-18 13:36   ` Petr Mladek
2014-12-19  5:37   ` [kpatch] [PATCH] livepatch v7: move x86 specific ftrace handler code to arch/x86 Li Bin
2014-12-19  6:12     ` Li Bin
2014-12-19  6:11   ` Li Bin
2014-12-19  7:31     ` Jiri Kosina
2014-12-19 14:23     ` Josh Poimboeuf
2014-12-19  7:39   ` [PATCHv7 2/3] kernel: add support for live patching Jiri Kosina
2014-12-16 17:58 ` [PATCHv7 3/3] samples: add sample live patching module Seth Jennings
2014-12-17 14:06   ` Miroslav Benes
2014-12-17 15:23   ` Petr Mladek
2014-12-16 18:15 ` [PATCHv7 0/3] Kernel Live Patching Balbir Singh
2014-12-16 19:05   ` Seth Jennings
2014-12-17  3:42     ` Balbir Singh
2014-12-16 20:14   ` Jiri Kosina
2014-12-17  3:43     ` Balbir Singh
2014-12-17  6:46       ` Jiri Kosina
2014-12-17  7:52         ` Balbir Singh
2014-12-17 12:40           ` Vojtech Pavlik
2014-12-17 16:21 ` Josh Poimboeuf
2014-12-18 15:56   ` Josh Poimboeuf
2014-12-18 11:55 ` Masami Hiramatsu
2014-12-18 15:49   ` [PATCH] livepatch: use FTRACE_OPS_FL_IPMODIFY Josh Poimboeuf
2014-12-19  3:34     ` Masami Hiramatsu
2014-12-19  9:43     ` Petr Mladek [this message]
2014-12-22 17:34       ` Petr Mladek
2014-12-22 17:41         ` Josh Poimboeuf
2014-12-22 19:44 ` [PATCHv7 0/3] Kernel Live Patching Jiri Kosina

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141219094335.GA9571@pathway.suse.cz \
    --to=pmladek@suse.cz \
    --cc=gregkh@linuxfoundation.org \
    --cc=hch@infradead.org \
    --cc=jkosina@suse.cz \
    --cc=jpoimboe@redhat.com \
    --cc=kpatch@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=live-patching@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=mbenes@suse.cz \
    --cc=rostedt@goodmis.org \
    --cc=sjenning@redhat.com \
    --cc=vojtech@suse.cz \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox