Print this page
8956 Implement KPTI
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
9210 remove KMDB branch debugging support
9211 ::crregs could do with cr2/cr3 support
9209 ::ttrace should be able to filter by thread
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>
Reviewed by: Yuri Pankov <yuripv@yuripv.net>

@@ -8,11 +8,11 @@
  * source.  A copy of the CDDL is also available via the Internet at
  * http://www.illumos.org/license/CDDL.
  */
 
 /*
- * Copyright 2015 Joyent, Inc.
+ * Copyright 2018 Joyent, Inc.
  */
 
 #if !defined(__lint)
         .file   "unix_sup.s"
 #endif /* __lint */

@@ -30,10 +30,14 @@
 ulong_t
 kmdb_unix_getcr0(void)
 { return (0); }
 
 ulong_t
+kmdb_unix_getcr3(void)
+{ return (0); }
+
+ulong_t
 kmdb_unix_getcr4(void)
 { return (0); }
 
 #else   /* __lint */
 

@@ -41,10 +45,20 @@
         ENTRY(kmdb_unix_getcr0)
         movq %cr0, %rax
         ret
         SET_SIZE(kmdb_unix_getcr0)
 
+        ENTRY(kmdb_unix_getcr2)
+        movq %cr2, %rax
+        ret
+        SET_SIZE(kmdb_unix_getcr2)
+
+        ENTRY(kmdb_unix_getcr3)
+        movq %cr3, %rax
+        ret
+        SET_SIZE(kmdb_unix_getcr3)
+
         ENTRY(kmdb_unix_getcr4)
         movq %cr4, %rax
         ret
         SET_SIZE(kmdb_unix_getcr4)
 

@@ -52,10 +66,20 @@
         ENTRY(kmdb_unix_getcr0)
         movl %cr0, %eax
         ret
         SET_SIZE(kmdb_unix_getcr0)
 
+        ENTRY(kmdb_unix_getcr2)
+        movl %cr2, %eax
+        ret
+        SET_SIZE(kmdb_unix_getcr2)
+
+        ENTRY(kmdb_unix_getcr3)
+        movl %cr3, %eax
+        ret
+        SET_SIZE(kmdb_unix_getcr3)
+
         ENTRY(kmdb_unix_getcr4)
         movl %cr4, %eax
         ret
         SET_SIZE(kmdb_unix_getcr4)