lkml.org 
[lkml]   [2012]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC][PATCH 06/13 v2] ftrace/x86: Add save_regs for i386 function calls
From
Date
On Fri, 2012-06-15 at 15:03 +0900, Masami Hiramatsu wrote:
> (2012/06/13 7:43), Steven Rostedt wrote:

> > +GLOBAL(ftrace_regs_call)
> > + call ftrace_stub
> > +
> > + addl $4,%esp /* Skip pt_regs */
> > + popl %eax
> > + movl %eax, 14*4(%esp) /* Restore return address */
> > + popl %ebx
> > + popl %ecx
> > + popl %edx
> > + popl %esi
> > + popl %edi
> > + popl %ebp
> > + popl %eax
> > + popl %ds
> > + popl %es
> > + popl %fs
> > + popl %gs
> > + addl $8, %esp
> > +ftrace_exit:
> > + addl $4, %esp /* Skip eflags */
>
> Hmm, why don't you recover eflags, as x86-64 has done?
> IMHO, it should be recovered if ftrace-based kprobe is
> a transparent acceleration.

As I copied this mostly from your patch I probably was thinking that it
saved it already ;-)

That is, we originally debated the usefulness of restoring eflags at the
start of the function call, as function calls give no guarantees to
them. I modified this patch to not restore flags. But later, I agreed
that I would keep kprobes the way it was, even though flags are pretty
meaningless here (unless you are going to have the kprobe modify the
enabling of interrupts), and decided to add back the flags. I simply
forgot to restore back to your original patch.

Will fix,

Thanks,

-- Steve






\
 
 \ /
  Last update: 2012-06-15 14:02    [W:0.194 / U:0.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site