Sourceware Bugzilla – Bug 2185
Support reentrance from post handler on x86_64
Last modified: 2010-08-16 21:46:16 UTC
Currently kprobes on x86_64, in case of reentrance from post handler
disarm's the probe itself to avoid debug stack corruption and system crash.
However I saw this mail form Andi Kleen on discuss x86_64 mailing list on Mon,
16 Jan 2006 01:56:39 +0100
( http://www.x86-64.org/lists/discuss/msg08165.html ) which now
allows nesting of the debug entry point too. So I guess now it should be
possible for us to support reentrancy from post handler on x86_64. (Worth a
try, so opening this bug)
The above patch from Andi also unbreaks recursive kprobes from post handler
which got broken starting from 2.6.15-git12.
Created attachment 931 [details]
disarming kprobe not required since DEBUG_STATCK supports reentrancy
Any testing of this patch is appreciated.
As far as I read below thread, this problem still might exist on x86-64.
Since v2.6.33-rc1 following commit is in the mainline:
Author: Masami Hiramatsu <email@example.com>
Date: Thu Aug 27 13:23:04 2009 -0400
kprobes/x86-64: Allow to reenter probe on post_handler
Allow to reenter probe on the post_handler of another probe on x86-64,
because x86-64 already allows reentering int3.
In that case, reentered probe just increases kp.nmissed and returns.
kernel appears to be fixed