Skip to content

Instantly share code, notes, and snippets.

@jlevon
Created April 2, 2020 22:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jlevon/8db6eee8e5031ed548cbc659d0f3fd77 to your computer and use it in GitHub Desktop.
Save jlevon/8db6eee8e5031ed548cbc659d0f3fd77 to your computer and use it in GitHub Desktop.
fix smap
f905ddb5-9113-c52a-d3ce-d0db83321d72:uts $ git staged
diff --git a/usr/src/uts/intel/ia32/ml/copy.s b/usr/src/uts/intel/ia32/ml/copy.s
index d02637e5fe..8c23d794f9 100644
--- a/usr/src/uts/intel/ia32/ml/copy.s
+++ b/usr/src/uts/intel/ia32/ml/copy.s
@@ -1902,30 +1902,6 @@ _flt_/**/NAME: \
.string "copyout_noerr: argument not in kernel address space"
#endif
-/*
- * These functions are used for SMAP, supervisor mode access protection. They
- * are hotpatched to become real instructions when the system starts up which is
- * done in mlsetup() as a part of enabling the other CR4 related features.
- *
- * Generally speaking, smap_disable() is a stac instruction and smap_enable is a
- * clac instruction. It's safe to call these any number of times, and in fact,
- * out of paranoia, the kernel will likely call it at several points.
- */
-
- ENTRY(smap_disable)
- nop
- nop
- nop
- ret
- SET_SIZE(smap_disable)
-
- ENTRY(smap_enable)
- nop
- nop
- nop
- ret
- SET_SIZE(smap_enable)
-
.data
.align 4
.globl _smap_enable_patch_count
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment