svn commit: r297846 - head/sys/amd64/amd64
Andriy Gapon
avg at FreeBSD.org
Tue Apr 12 06:46:55 UTC 2016
Author: avg
Date: Tue Apr 12 06:46:54 2016
New Revision: 297846
URL: https://svnweb.freebsd.org/changeset/base/297846
Log:
[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
Modified:
head/sys/amd64/amd64/exception.S
Modified: head/sys/amd64/amd64/exception.S
==============================================================================
--- head/sys/amd64/amd64/exception.S Tue Apr 12 03:55:33 2016 (r297845)
+++ head/sys/amd64/amd64/exception.S Tue Apr 12 06:46:54 2016 (r297846)
@@ -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
More information about the svn-src-all
mailing list