1.0.29.32: SCRUB-CONTROL-STACK related changes
[sbcl.git] / src / runtime / validate.c
index 967775a..d00c391 100644 (file)
@@ -89,26 +89,37 @@ protect_page(void *page, int protect_p, os_vm_prot_t flags) {
                flags : OS_VM_PROT_ALL);
 }
 
-#define DEF_PROTECT_PAGE(name,page_name,flags)                               \
-    void                                                                     \
-    protect_##name(int protect_p, struct thread *thread) {                   \
-        if (!thread)                                                         \
-           thread = arch_os_get_current_thread();                            \
-        protect_page(page_name(thread), protect_p, flags);                   \
+#define DEF_PROTECT_PAGE(name,page_name,flags)                          \
+    void                                                                \
+    protect_##name(int protect_p, struct thread *thread) {              \
+        if (!thread)                                                    \
+            thread = arch_os_get_current_thread();                      \
+        protect_page(page_name(thread), protect_p, flags);              \
     }
 
+DEF_PROTECT_PAGE(control_stack_hard_guard_page,
+                 CONTROL_STACK_HARD_GUARD_PAGE,
+                 OS_VM_PROT_NONE)
 DEF_PROTECT_PAGE(control_stack_guard_page,
                  CONTROL_STACK_GUARD_PAGE,
                  OS_VM_PROT_READ|OS_VM_PROT_EXECUTE)
 DEF_PROTECT_PAGE(control_stack_return_guard_page,
                  CONTROL_STACK_RETURN_GUARD_PAGE,
                  OS_VM_PROT_READ|OS_VM_PROT_EXECUTE)
+
+DEF_PROTECT_PAGE(binding_stack_hard_guard_page,
+                 BINDING_STACK_HARD_GUARD_PAGE,
+                 OS_VM_PROT_NONE)
 DEF_PROTECT_PAGE(binding_stack_guard_page,
                  BINDING_STACK_GUARD_PAGE,
                  OS_VM_PROT_NONE)
 DEF_PROTECT_PAGE(binding_stack_return_guard_page,
                  BINDING_STACK_RETURN_GUARD_PAGE,
                  OS_VM_PROT_NONE)
+
+DEF_PROTECT_PAGE(alien_stack_hard_guard_page,
+                 ALIEN_STACK_HARD_GUARD_PAGE,
+                 OS_VM_PROT_NONE)
 DEF_PROTECT_PAGE(alien_stack_guard_page,
                  ALIEN_STACK_GUARD_PAGE,
                  OS_VM_PROT_NONE)