Re: [PATCH 7/7] uprobes/x86: Introduce uprobe_xol_ops and arch_uprobe->ops

2014-04-03 Thread Oleg Nesterov
On 04/02, Jim Keniston wrote: > > On Mon, 2014-03-31 at 21:44 +0200, Oleg Nesterov wrote: > ... > > +/* > > + * Adjust the return address pushed by a call insn executed out of line. > > + */ > > +static int adjust_ret_addr(unsigned long sp, long correction) > > +{ > > + int rasize, ncopied; > > +

Re: [PATCH 7/7] uprobes/x86: Introduce uprobe_xol_ops and arch_uprobe->ops

2014-04-02 Thread Jim Keniston
On Mon, 2014-03-31 at 21:44 +0200, Oleg Nesterov wrote: ... > +/* > + * Adjust the return address pushed by a call insn executed out of line. > + */ > +static int adjust_ret_addr(unsigned long sp, long correction) > +{ > + int rasize, ncopied; > + long ra = 0; > + > + if (is_ia32_task()

Re: [PATCH 7/7] uprobes/x86: Introduce uprobe_xol_ops and arch_uprobe->ops

2014-04-01 Thread Oleg Nesterov
On 03/31, Oleg Nesterov wrote: > > +static struct uprobe_xol_ops defaule_xop_ops = { > + .pre_xol = default_pre_xol_op, > + .post_xol = default_post_xol_op, > +}; ... > + auprobe->ops = &defaule_xop_ops; Cough. At least the name is the same ;) But I obviously meant "default_xol_ops"

Re: [PATCH 7/7] uprobes/x86: Introduce uprobe_xol_ops and arch_uprobe->ops

2014-04-01 Thread Oleg Nesterov
On 04/01, Masami Hiramatsu wrote: > > (2014/04/01 4:44), Oleg Nesterov wrote: > > + > > +static struct uprobe_xol_ops defaule_xop_ops = { > > + .pre_xol = default_pre_xol_op, > > + .post_xol = default_post_xol_op, > > If there is no ops->emulate, I think it should not be defined now. > You can

Re: [PATCH 7/7] uprobes/x86: Introduce uprobe_xol_ops and arch_uprobe->ops

2014-03-31 Thread Masami Hiramatsu
(2014/04/01 4:44), Oleg Nesterov wrote: > Introduce arch_uprobe->ops pointing to the "struct uprobe_xol_ops", > move the current UPROBE_FIX_{RIP*,IP,CALL} code into the default > set of methods and change arch_uprobe_pre/post_xol() accordingly. > > This way we can add the new uprobe_xol_ops's to h