Re: [PATCH v1 6/9] uretprobes: Return probe exit, invoke handlers

2013-04-13 Thread Oleg Nesterov
On 04/13, Srikar Dronamraju wrote: > > > > Oh yes, this should be documented more explicitly in the changelog of > > > this patch or 7/9 (which tries to document the limitations but should > > > be more clear). > > > > > > Currently we do not support longjmp() and we assume that the probed > > >

Re: [PATCH v1 6/9] uretprobes: Return probe exit, invoke handlers

2013-04-13 Thread Srikar Dronamraju
* Oleg Nesterov [2013-04-09 22:13:02]: > On 04/09, Oleg Nesterov wrote: > > > > > Should we a check here before using top most ri. > > > What if the application had done a longjmp and the trampoline he hit > > > corresponds to something thats below in the stack? > > > > > > Not sure if this what

Re: [PATCH v1 6/9] uretprobes: Return probe exit, invoke handlers

2013-04-13 Thread Srikar Dronamraju
* Oleg Nesterov o...@redhat.com [2013-04-09 22:13:02]: On 04/09, Oleg Nesterov wrote: Should we a check here before using top most ri. What if the application had done a longjmp and the trampoline he hit corresponds to something thats below in the stack? Not sure if this what

Re: [PATCH v1 6/9] uretprobes: Return probe exit, invoke handlers

2013-04-13 Thread Oleg Nesterov
On 04/13, Srikar Dronamraju wrote: Oh yes, this should be documented more explicitly in the changelog of this patch or 7/9 (which tries to document the limitations but should be more clear). Currently we do not support longjmp() and we assume that the probed function should do

Re: [PATCH v1 6/9] uretprobes: Return probe exit, invoke handlers

2013-04-09 Thread Oleg Nesterov
On 04/09, Oleg Nesterov wrote: > > > Should we a check here before using top most ri. > > What if the application had done a longjmp and the trampoline he hit > > corresponds to something thats below in the stack? > > > > Not sure if this what you meant by leaking return instances in your next > >

Re: [PATCH v1 6/9] uretprobes: Return probe exit, invoke handlers

2013-04-09 Thread Oleg Nesterov
On 04/07, Srikar Dronamraju wrote: > > > +static void > > +handler_uretprobe_chain(struct return_instance *ri, struct pt_regs *regs) > > > +{ > > + struct uprobe *uprobe = ri->uprobe; > > + struct uprobe_consumer *uc; > > + > > + down_read(>register_rwsem); > > + for (uc =

Re: [PATCH v1 6/9] uretprobes: Return probe exit, invoke handlers

2013-04-09 Thread Oleg Nesterov
On 04/07, Srikar Dronamraju wrote: +static void +handler_uretprobe_chain(struct return_instance *ri, struct pt_regs *regs) +{ + struct uprobe *uprobe = ri-uprobe; + struct uprobe_consumer *uc; + + down_read(uprobe-register_rwsem); + for (uc = uprobe-consumers; uc; uc =

Re: [PATCH v1 6/9] uretprobes: Return probe exit, invoke handlers

2013-04-09 Thread Oleg Nesterov
On 04/09, Oleg Nesterov wrote: Should we a check here before using top most ri. What if the application had done a longjmp and the trampoline he hit corresponds to something thats below in the stack? Not sure if this what you meant by leaking return instances in your next patch. Oh

Re: [PATCH v1 6/9] uretprobes: Return probe exit, invoke handlers

2013-04-07 Thread Srikar Dronamraju
* Anton Arapov [2013-04-03 18:00:36]: > Uretprobe handlers are invoked when the trampoline is hit, on completion the > trampoline is replaced with the saved return address and the uretprobe > instance > deleted. > > v1 changes: > * pass bp_vaddr to ret_handler() > * simplify handle_uretprobe()

Re: [PATCH v1 6/9] uretprobes: Return probe exit, invoke handlers

2013-04-07 Thread Srikar Dronamraju
* Anton Arapov an...@redhat.com [2013-04-03 18:00:36]: Uretprobe handlers are invoked when the trampoline is hit, on completion the trampoline is replaced with the saved return address and the uretprobe instance deleted. v1 changes: * pass bp_vaddr to ret_handler() * simplify

[PATCH v1 6/9] uretprobes: Return probe exit, invoke handlers

2013-04-03 Thread Anton Arapov
Uretprobe handlers are invoked when the trampoline is hit, on completion the trampoline is replaced with the saved return address and the uretprobe instance deleted. v1 changes: * pass bp_vaddr to ret_handler() * simplify handle_uretprobe() RFCv6 changes: * rework handle_uretprobe() RFCv5

[PATCH v1 6/9] uretprobes: Return probe exit, invoke handlers

2013-04-03 Thread Anton Arapov
Uretprobe handlers are invoked when the trampoline is hit, on completion the trampoline is replaced with the saved return address and the uretprobe instance deleted. v1 changes: * pass bp_vaddr to ret_handler() * simplify handle_uretprobe() RFCv6 changes: * rework handle_uretprobe() RFCv5