Re: [RFC PATCH v4 4/6] uretprobes: return probe entry, prepare uretprobe

2013-03-05 Thread Anton Arapov
On Mon, Mar 04, 2013 at 05:47:53PM +0100, Oleg Nesterov wrote: > On 03/04, Anton Arapov wrote: > > > > @@ -1085,6 +1093,7 @@ static int xol_add_vma(struct xol_area *area) > > { > > struct mm_struct *mm = current->mm; > > int ret = -EALREADY; > > + uprobe_opcode_t insn = UPROBE_SWBP_INSN;

Re: [RFC PATCH v4 4/6] uretprobes: return probe entry, prepare uretprobe

2013-03-04 Thread Oleg Nesterov
On 03/04, Anton Arapov wrote: > > @@ -1085,6 +1093,7 @@ static int xol_add_vma(struct xol_area *area) > { > struct mm_struct *mm = current->mm; > int ret = -EALREADY; > + uprobe_opcode_t insn = UPROBE_SWBP_INSN; > > down_write(&mm->mmap_sem); > if (mm->uprobes_state.xol

[RFC PATCH v4 4/6] uretprobes: return probe entry, prepare uretprobe

2013-03-04 Thread Anton Arapov
When a uprobe with return consumer is hit, prepare_uretprobe function is invoked. It creates return_instance, hijacks return address and replaces it with the trampoline. N.B. it might be a good idea to introduce get_uprobe() to reflect put_uprobe() later, but it is not a subject of this patchse