Messages in this thread | | | Subject | Re: [PATCH 5/6] ftrace/x86: Add separate function to save regs | From | Steven Rostedt <> | Date | Wed, 11 Jul 2012 12:28:10 -0400 |
| |
On Wed, 2012-07-11 at 12:22 -0400, Steven Rostedt wrote: > On Tue, 2012-07-03 at 17:29 +0900, Masami Hiramatsu wrote: > > > > > > > + /* Restore flags */ > > > + pushq EFLAGS(%rsp) > > > + popfq > > > + > > > + MCOUNT_RESTORE_FRAME > > > > Here, if MCOUNT_RESTORE_FRAME has skip too, I think you don't > > need to restore flags before restoring other registers, like > > below; > > > > MCOUNT_RESTORE_FRAME 8 > > popfq > > > > And also, this will prevent to modify flags before return by > > addq in MCOUNT_RESTORE_FRAME. > > Ah, because the addq will modify flags :-/ > > Grumble, I guess I should implement this, even though it will make it a > little more complex. I thought it was better to restore flags > explicitly, but that's not the case. >
I know why I did this. Do you want kprobes to be able to modify flags? If so, then I need to add, before the restore:
movq EFLAGS(%rsp), %rax movq %rax, SS(%rsp)
-- Steve
| |