Thread (12 messages) 12 messages, 4 authors, 2012-08-22

Re: [PATCH v3 2/2] powerpc: Uprobes port to powerpc

From: Ananth N Mavinakayanahalli <hidden>
Date: 2012-08-17 05:15:34
Also in: linuxppc-dev

On Thu, Aug 16, 2012 at 05:21:12PM +0200, Oleg Nesterov wrote:

...
quoted
So, the arch agnostic code itself
takes care of this case...
Yes. I forgot about install_breakpoint()->is_swbp_insn() check which
returns -ENOTSUPP, somehow I thought arch_uprobe_analyze_insn() does
this.
quoted
or am I missing something?
No, it is me.
quoted
However, I see that we need a powerpc specific is_swbp_insn()
implementation since we will have to take care of all the trap variants.
Hmm, I am not sure. is_swbp_insn(insn), as it is used in the arch agnostic
code, should only return true if insn == UPROBE_SWBP_INSN (just in case,
this logic needs more fixes but this is offtopic).
I think it does...
If powerpc has another insn(s) which can trigger powerpc's do_int3()
counterpart, they should be rejected by arch_uprobe_analyze_insn().
I think.
The insn that gets passed to arch_uprobe_analyze_insn() is copy_insn()'s
version, which is the file copy of the instruction. We should also take
care of the in-memory copy, in case gdb had inserted a breakpoint at the
same location, right? Updating is_swbp_insn() per-arch where needed will
take care of both the cases, 'cos it gets called before
arch_analyze_uprobe_insn() too.
quoted
I will need to update the patches based on changes being made by Oleg
and Sebastien for the single-step issues.
Perhaps you can do this in a separate change?

We need some (simple) changes in the arch agnostic code first, they
should not break poweppc. These changes are still under discussion.
Once we have "__weak  arch_uprobe_step*" you can reimplement these
hooks and fix the problems with single-stepping.
OK. Agreed.

Ananth
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help