Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [day] [month] [year] [list]
Date: Tue, 27 Sep 2016 15:36:52 -0700
From: "LeMay, Michael" <michael.lemay@...el.com>
To: "musl@...ts.openwall.com" <musl@...ts.openwall.com>
Subject: [RFC PATCH 4/7] add stack segment override prefix to i386 __clone

When segmentation-hardened SafeStack is enabled, it defines a limit
for DS and ES that is below all of the safe stacks.  The i386 __clone
implementation is written in assembly language, so the compiler is
unable to automatically add a stack segment override prefix to an
instruction in that routine that accesses a safe stack.  This patch
adds that prefix to the source code.

Signed-off-by: Michael LeMay <michael.lemay@...el.com>
---
  src/thread/i386/clone.s | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/thread/i386/clone.s b/src/thread/i386/clone.s
index 52fe7ef..e11372d 100644
--- a/src/thread/i386/clone.s
+++ b/src/thread/i386/clone.s
@@ -22,7 +22,7 @@ __clone:
      and $-16,%ecx
      sub $16,%ecx
      mov 20(%ebp),%edi
-    mov %edi,(%ecx)
+    mov %edi,%ss:(%ecx)
      mov 24(%ebp),%edx
      mov %esp,%esi
      mov 32(%ebp),%edi
-- 
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.