Re: [PATCH 1/2 v3] ftrace: don't allow IPMODIFY without proper compiler support

2015-01-16 Thread Steven Rostedt
On Fri, 16 Jan 2015 17:41:58 +0100 (CET) Jiri Kosina wrote: > On Fri, 16 Jan 2015, Steven Rostedt wrote: > > > Instead, make live kernel patching fail to load if fentry isn't > > supported. IOW, instead of ftrace_ipmodify_supported, have a > > live_kernel_patching_supported that could be based

Re: [PATCH 1/2 v3] ftrace: don't allow IPMODIFY without proper compiler support

2015-01-16 Thread Jiri Kosina
On Fri, 16 Jan 2015, Steven Rostedt wrote: > Instead, make live kernel patching fail to load if fentry isn't > supported. IOW, instead of ftrace_ipmodify_supported, have a > live_kernel_patching_supported that could be based on fentry being used > or not. I can live with that, we are handling

Re: [PATCH 1/2 v3] ftrace: don't allow IPMODIFY without proper compiler support

2015-01-16 Thread Steven Rostedt
On Thu, 15 Jan 2015 10:50:07 +0100 (CET) Jiri Kosina wrote: > Using IPMODIFY needs to be allowed only with compilers which are > guaranteed to generate function prologues compatible with function > redirection through changing instruction pointer in saved regs. That's actually not true. Sorry

[PATCH 1/2 v3] ftrace: don't allow IPMODIFY without proper compiler support

2015-01-15 Thread Jiri Kosina
Using IPMODIFY needs to be allowed only with compilers which are guaranteed to generate function prologues compatible with function redirection through changing instruction pointer in saved regs. For example changing regs->ip on x86_64 in cases when gcc is using mcount (and not fentry) is not a