commit-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[hurd,commited] hurd: Add pointer guard support


From: Samuel Thibault
Subject: [hurd,commited] hurd: Add pointer guard support
Date: Sat, 6 Jun 2020 03:31:06 +0200

* sysdeps/mach/hurd/i386/tls.h (THREAD_SET_POINTER_GUARD,
THREAD_COPY_POINTER_GUARD): New macros.
---
 sysdeps/mach/hurd/i386/tls.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/sysdeps/mach/hurd/i386/tls.h b/sysdeps/mach/hurd/i386/tls.h
index 03a894bd35..97d0b1cbab 100644
--- a/sysdeps/mach/hurd/i386/tls.h
+++ b/sysdeps/mach/hurd/i386/tls.h
@@ -303,6 +303,13 @@ out:
   ((descr)->stack_guard                                                        
      \
    = THREAD_GETMEM (THREAD_SELF, stack_guard))
 
+/* Set the pointer guard field in the TCB head.  */
+#define THREAD_SET_POINTER_GUARD(value) \
+  THREAD_SETMEM (THREAD_SELF, pointer_guard, value)
+#define THREAD_COPY_POINTER_GUARD(descr) \
+  ((descr)->pointer_guard                                                    \
+   = THREAD_GETMEM (THREAD_SELF, pointer_guard))
+
 
 # include <mach/machine/thread_status.h>
 
-- 
2.26.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]