opnsense-src/sys/cddl/dev/dtrace
Mark Johnston 4f1b715c84 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
..
aarch64 DTrace aarch64: Avoid calling unwind_frame() in the probe context. 2018-05-12 15:35:26 +00:00
amd64 dtrace: fix userspace access on boxes with SMAP 2018-12-13 20:09:38 +00:00
arm Rename assym.s to assym.inc 2018-03-20 17:58:51 +00:00
i386 Remove very old and unused signal information codes. 2018-03-27 20:57:51 +00:00
mips Enable dtrace support for mips64 and the ERL kernel config 2017-09-06 03:19:52 +00:00
powerpc powerpc/dtrace: Use explicit bit numbers to mask out PSL_EE 2018-10-21 02:08:57 +00:00
riscv Add support for 'C'-compressed ISA extension to DTrace FBT provider. 2018-09-03 14:34:09 +00:00
x86 Sync the x86 dis_tables.c with upstream. 2017-02-03 03:22:47 +00:00
dtrace_anon.c
dtrace_cddl.h Fix a tracepoint lookup race in fasttrap_pid_probe(). 2019-02-21 22:54:17 +00:00
dtrace_debug.c Fix a backwards comparison in the code to dump a DTrace debug buffer. 2017-03-13 18:43:00 +00:00
dtrace_hacks.c
dtrace_ioctl.c Don't use pcpu_find() to determine if a CPU ID is valid. 2017-11-27 18:42:23 +00:00
dtrace_load.c Fix a harmless LOR in dtrace_load(). 2017-05-01 17:01:00 +00:00
dtrace_modevent.c
dtrace_sysctl.c Add tunable to disable destructive dtrace 2016-11-23 22:50:20 +00:00
dtrace_test.c
dtrace_unload.c
dtrace_vtime.c