freebsd-skq/sys/cddl/dev
markj 57c4e2d807 Fix a tracepoint lookup race in fasttrap_pid_probe().
fasttrap hooks the userspace breakpoint handler; the hook looks up the
breakpoint address in a hash table of tracepoints.  It is possible for
the tracepoint to be removed by a different thread in between the
breakpoint trap and the hash table lookup, in which case SIGTRAP gets
delivered to the target process.  Fix the problem by adding a
per-process generation counter that gets incremented when a tracepoint
belonging to that process is removed.  Then, when a lookup fails, the
trapping instruction is restarted if the thread's counter doesn't match
that of the process.

Reviewed by:	cem
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D19273
2019-02-21 22:54:17 +00:00
..
dtmalloc dtrace: depessimize dtmalloc when dtrace is active 2018-04-24 01:06:20 +00:00
dtrace Fix a tracepoint lookup race in fasttrap_pid_probe(). 2019-02-21 22:54:17 +00:00
fbt DTrace/powerpc: Fix FBT return probes 2018-11-21 16:47:11 +00:00
profile Revert r326083, it doesn't behave as expected. 2018-06-03 03:53:11 +00:00
sdt lockstat: track lockstat just like sdt probes 2018-04-24 01:04:10 +00:00
systrace systrace: track it like sdt probes 2018-04-27 15:16:34 +00:00
prototype.c Use C99 initializers for DTrace provider methods. 2017-09-27 17:46:38 +00:00