[amd64] dtrace_invop handler is to be called only for kernel exceptions

DTrace-related exceptions in userland code are handled elsewhere.
One practical problem was a crash in dtrace_invop_start() when saved
%rsp pointed to a virtual address that was not backed.

i386 code already ignored userland exceptions.

Reviewed by: markj, kib
MFC after:	2 weeks
Differential Revision: https://reviews.freebsd.org/D5906
This commit is contained in:
avg 2016-04-12 06:46:54 +00:00
parent 12e88a89ea
commit 73eedd1d08

View File

@ -211,6 +211,8 @@ alltraps_pushregs_no_rdi:
* interrupt. For all other trap types, just handle them in
* the usual way.
*/
testb $SEL_RPL_MASK,TF_CS(%rsp) /* Did we come from kernel? */
jnz calltrap /* ignore userland traps */
cmpl $T_BPTFLT,TF_TRAPNO(%rsp)
jne calltrap