Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <390CE752059EB848A71F4F676EBAB76D3AC263E8@ORSMSX114.amr.corp.intel.com>
Date: Fri, 28 Oct 2016 20:14:35 +0000
From: "LeMay, Michael" <michael.lemay@...el.com>
To: "musl@...ts.openwall.com" <musl@...ts.openwall.com>
Subject: [RFC PATCH v2 2/2] avoid invoking vDSO when separate stack segment
 is enabled

The Linux vDSO code may be incompatible with programs that use a
separate stack segment.  This patch prevents the vDSO from being
invoked when that feature is enabled.

Signed-off-by: Michael LeMay <michael.lemay@...el.com>
---
 arch/i386/syscall_arch.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/i386/syscall_arch.h b/arch/i386/syscall_arch.h
index 4c9d874..4d7c3c2 100644
--- a/arch/i386/syscall_arch.h
+++ b/arch/i386/syscall_arch.h
@@ -52,8 +52,17 @@ static inline long __syscall6(long n, long a1, long a2, long a3, long a4, long a
 	return __ret;
 }
 
+#if !SEP_STACK_SEG
+/* The vDSO may not be compiled with support for a separate stack segment.
+ * Avoid invoking the vDSO when this feature is enabled, since it may try to
+ * access the stack using memory operands with base registers other than EBP or
+ * ESP without also using a stack segment override prefix.  A special compiler
+ * pass needs to be used to add such prefixes, and it is unlikely that a pass
+ * of that sort was applied when the vDSO was compiled.
+ */
 #define VDSO_USEFUL
 #define VDSO_CGT_SYM "__vdso_clock_gettime"
 #define VDSO_CGT_VER "LINUX_2.6"
+#endif
 
 #define SYSCALL_USE_SOCKETCALL
-- 
2.7.4

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.