Messages in this thread | | | Subject | Re: [RFC][PATCH 06/13 v2] ftrace/x86: Add save_regs for i386 function calls | From | Steven Rostedt <> | Date | Fri, 15 Jun 2012 07:29:46 -0400 |
| |
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
| |