summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authoravg <avg@FreeBSD.org>2016-04-26 07:40:07 +0000
committeravg <avg@FreeBSD.org>2016-04-26 07:40:07 +0000
commitd401a99e6492ed4f9e9f5611f22325e69ae3d51e (patch)
treed2bc470498aac30116c29fabb260d632cf4f0b71 /sys/amd64
parent534aa815190e9a7eb98fc46705ee736c692d076a (diff)
downloadFreeBSD-src-d401a99e6492ed4f9e9f5611f22325e69ae3d51e.zip
FreeBSD-src-d401a99e6492ed4f9e9f5611f22325e69ae3d51e.tar.gz
MFC r297846: [amd64] dtrace_invop handler is to be called only for
kernel exceptions
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/exception.S2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/amd64/amd64/exception.S b/sys/amd64/amd64/exception.S
index 49d61f6..1331917 100644
--- a/sys/amd64/amd64/exception.S
+++ b/sys/amd64/amd64/exception.S
@@ -212,6 +212,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
OpenPOWER on IntegriCloud