summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/uts/intel/dtrace/dtrace_isa.c16
-rw-r--r--usr/src/uts/intel/dtrace/sdt.c14
-rw-r--r--usr/src/uts/intel/ia32/ml/exception.s4
3 files changed, 20 insertions, 14 deletions
diff --git a/usr/src/uts/intel/dtrace/dtrace_isa.c b/usr/src/uts/intel/dtrace/dtrace_isa.c
index 6b5a4e1bd1..f649473dfb 100644
--- a/usr/src/uts/intel/dtrace/dtrace_isa.c
+++ b/usr/src/uts/intel/dtrace/dtrace_isa.c
@@ -24,7 +24,9 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
+/*
+ * Copyright (c) 2013, 2014 by Delphix. All rights reserved.
+ */
#include <sys/dtrace_impl.h>
#include <sys/stack.h>
@@ -433,7 +435,7 @@ dtrace_getarg(int arg, int aframes)
* use the pointer that it passed to the stack as the
* second argument to dtrace_invop() as the pointer to
* the stack. When using this stack, we must step
- * beyond the EIP/RIP that was pushed when the trap was
+ * beyond the EIP that was pushed when the trap was
* taken -- hence the "+ 1" below.
*/
stack = ((uintptr_t **)&fp[1])[1] + 1;
@@ -442,17 +444,17 @@ dtrace_getarg(int arg, int aframes)
* In the case of amd64, we will use the pointer to the
* regs structure that was pushed when we took the
* trap. To get this structure, we must increment
- * beyond the frame structure, and then again beyond
- * the calling RIP stored in dtrace_invop(). If the
- * argument that we're seeking is passed on the stack,
- * we'll pull the true stack pointer out of the saved
+ * beyond the frame structure, the calling RIP, and
+ * padding stored in dtrace_invop(). If the argument
+ * that we're seeking is passed on the stack, we'll
+ * pull the true stack pointer out of the saved
* registers and decrement our argument by the number
* of arguments passed in registers; if the argument
* we're seeking is passed in regsiters, we can just
* load it directly.
*/
struct regs *rp = (struct regs *)((uintptr_t)&fp[1] +
- sizeof (uintptr_t));
+ sizeof (uintptr_t) * 2);
if (arg <= inreg) {
stack = (uintptr_t *)&rp->r_rdi;
diff --git a/usr/src/uts/intel/dtrace/sdt.c b/usr/src/uts/intel/dtrace/sdt.c
index 27cb19e06c..e98f6a30c0 100644
--- a/usr/src/uts/intel/dtrace/sdt.c
+++ b/usr/src/uts/intel/dtrace/sdt.c
@@ -25,6 +25,7 @@
/*
* Copyright (c) 2012, Joyent, Inc. All rights reserved.
+ * Copyright (c) 2013, 2014 by Delphix. All rights reserved.
*/
#include <sys/modctl.h>
@@ -329,16 +330,17 @@ sdt_getarg(void *arg, dtrace_id_t id, void *parg, int argno, int aframes)
* In the case of amd64, we will use the pointer to the
* regs structure that was pushed when we took the
* trap. To get this structure, we must increment
- * beyond the frame structure. If the argument that
- * we're seeking is passed on the stack, we'll pull
- * the true stack pointer out of the saved registers
- * and decrement our argument by the number of
- * arguments passed in registers; if the argument
+ * beyond the frame structure, the calling RIP, and
+ * padding stored in dtrace_invop(). If the argument
+ * that we're seeking is passed on the stack, we'll
+ * pull the true stack pointer out of the saved
+ * registers and decrement our argument by the number
+ * of arguments passed in registers; if the argument
* we're seeking is passed in regsiters, we can just
* load it directly.
*/
struct regs *rp = (struct regs *)((uintptr_t)&fp[1] +
- sizeof (uintptr_t));
+ sizeof (uintptr_t) * 2);
if (argno <= inreg) {
stack = (uintptr_t *)&rp->r_rdi;
diff --git a/usr/src/uts/intel/ia32/ml/exception.s b/usr/src/uts/intel/ia32/ml/exception.s
index ab24e46548..33832749ca 100644
--- a/usr/src/uts/intel/ia32/ml/exception.s
+++ b/usr/src/uts/intel/ia32/ml/exception.s
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014 by Delphix. All rights reserved.
*/
/*
@@ -394,9 +395,10 @@ ud_kernel:
movq REGOFF_RAX(%rsp), %rdx
pushq (%rsi)
movq %rsp, %rsi
+ subq $8, %rsp
call dtrace_invop
ALTENTRY(dtrace_invop_callsite)
- addq $8, %rsp
+ addq $16, %rsp
cmpl $DTRACE_INVOP_PUSHL_EBP, %eax
je ud_push
cmpl $DTRACE_INVOP_LEAVE, %eax