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

2015-01-15 Thread Jiri Kosina
On Thu, 15 Jan 2015, Masami Hiramatsu wrote: > Hmm, if this binary doesn't support IPMODIFY, it should return -ENOTSUPP. Good poing, will send v3. > And also, IMHO, we'd better reject registering ftrace_ops with IPMODIFY > in this situation before updating hash table. That would happen

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

2015-01-15 Thread Jiri Kosina
On Thu, 15 Jan 2015, Masami Hiramatsu wrote: Hmm, if this binary doesn't support IPMODIFY, it should return -ENOTSUPP. Good poing, will send v3. And also, IMHO, we'd better reject registering ftrace_ops with IPMODIFY in this situation before updating hash table. That would happen

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

2015-01-14 Thread Masami Hiramatsu
(2015/01/14 17:47), 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. > > For example changing regs->ip on x86_64 in cases

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

2015-01-14 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

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

2015-01-14 Thread Masami Hiramatsu
(2015/01/14 17:47), 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. For example changing regs-ip on x86_64 in cases when

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

2015-01-14 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