aboutsummaryrefslogtreecommitdiff
path: root/sys/cddl/contrib/opensolaris
diff options
context:
space:
mode:
authorAndrew Turner <andrew@FreeBSD.org>2021-01-12 11:37:06 +0000
committerAndrew Turner <andrew@FreeBSD.org>2021-01-12 12:42:23 +0000
commitd0df1a2d54dcba438018f4be1d8bbaeac7e49d92 (patch)
tree44226990dc22c73a2b37b08b095a2595076f2429 /sys/cddl/contrib/opensolaris
parent35a39dc5b34962081eeda8dbcf0b99a31585499b (diff)
downloadsrc-d0df1a2d54dcba438018f4be1d8bbaeac7e49d92.tar.gz
src-d0df1a2d54dcba438018f4be1d8bbaeac7e49d92.zip
Only allow a store through sp in the arm64 fbt
When searching for an instruction to patch out in the arm64 function boundary trace we search for a store pair with a write back. This instruction is commonly used to store two registers to the stack and update the stack pointer to hold space for more. This works in many cases, however not all functions use this, e.g. when the stack frame is too large. In these cases we may find another instruction of the same type that doesn't store through the stack pointer. Filter these instructions out and assume if we see one we are past the function prologue. Reported by: rwatson Sponsored by: Innovate UK
Diffstat (limited to 'sys/cddl/contrib/opensolaris')
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h b/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h
index 31c5983270ca..922c1a9bba9b 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h
+++ b/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h
@@ -2479,11 +2479,13 @@ extern void dtrace_helpers_destroy(proc_t *);
#define ARG1_MASK 0x1f
#define ARG2_SHIFT 10
#define ARG2_MASK 0x1f
+#define ADDR_SHIFT 5
+#define ADDR_MASK 0x1f
#define OFFSET_SHIFT 15
#define OFFSET_SIZE 7
#define OFFSET_MASK ((1 << OFFSET_SIZE) - 1)
-#define DTRACE_INVOP_PUSHM 1
+#define DTRACE_INVOP_STP 1
#define DTRACE_INVOP_RET 2
#define DTRACE_INVOP_B 3