Messages in this thread |  | | | Date | Tue, 31 Jul 2012 19:38:54 +0200 | | From | Oleg Nesterov <> | | Subject | Re: [PATCH] uprobes: don't enable/disable signle step if the user did it |
| |
On 07/31, Srikar Dronamraju wrote: > > * Oleg Nesterov <oleg@redhat.com> [2012-07-30 16:16:38]: > > > So I think we need arch_uprobe_*able_step(struct uprobe_task *utask). > > Ignoring all problems except the one this patch tries to fix, x86 > > can simply do: > > > > arch_uprobe_enble_step(utask, struct arch_uprobe *auprobe) > > { > > utask->clear_tf = > > !(regs->flags & X86_EFLAGS_TF) && > > (auprobe->insn != "popf"); > > regs->flags |= X86_EFLAGS_TF; > > } > > > > arch_uprobe_disable_step(utask) > > { > > if (utask->clear_tf) > > regs->flags &= ~X86_EFLAGS_TF; > > } > > > > We were using something similar to this approach. [though we were still > using TIF_SINGLESTEP flag].
(and afaics the code was wrong)
> However this was all changed based on > feedback from Roland and Peter. > > Here is the pointer to the discussion. > > https://lkml.org/lkml/2011/1/27/283
Looking at this discussion now, I am not sure that Roland was against the per-arch uprobe_enable_step() implementation.
And when I read you message I do not understand your opinion ;)
And just in case, the pseudo code above is only for illustration, note also "Ignoring all problems except the one".
In any case I agree, this needs more discussion. Personally I think it doesn't make sense to try to teach user_enable_single_step() to work correctly with ptrace and uprobes at the same time, I can be wrong of-course.
Oleg.
|  |