From: "LeMay, Michael" <michael.lemay@intel.com>
To: "musl@lists.openwall.com" <musl@lists.openwall.com>
Subject: [RFC PATCH 4/7] add stack segment override prefix to i386 __clone
Date: Tue, 27 Sep 2016 15:36:52 -0700 [thread overview]
Message-ID: <ee0b34e4-155b-14ef-829e-bf7d9108d417@intel.com> (raw)
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@intel.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
reply other threads:[~2016-09-27 22:36 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ee0b34e4-155b-14ef-829e-bf7d9108d417@intel.com \
--to=michael.lemay@intel.com \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).