Messages in this thread | | | Date | Sat, 13 Apr 2013 18:10:51 +0200 | From | Oleg Nesterov <> | Subject | Re: [PATCH v1 6/9] uretprobes: Return probe exit, invoke handlers |
| |
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 the regular return. We should certainly try to improve > > > this, but I really think that this should go into the next series. > > > > > > Because this is nontrivial, needs more discussion, and I'm afraid should > > > be per-arch. Even on x86 (which can check the stack) this is not simple, > > > in general we can't know how to check that (to simplify) the first frame > > > is already invalid. Just for example, we could check regs->sp and detect > > > that longjmp() was called but sigaltstack() can easily fool this logic. > > > > > Yes, its perfectly fine to keep this logic for the next patchset.
OK, great.
> Can you tell me why sigaltstack() can fool us if we rely on regs->sp.
Because we can't simply compare resg->sp and ret_instance->sp and decide if we should ignore this ri or not, the task can hit retprobe, then take a signal, switch to altstack and hit another rp. I'll write another email (hopefully patches) later.
> Acked-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Thanks Srikar.
OK. Everything is acked, I'll send git-pull-request.
Oleg.
| |