* [RFC PATCH 4/7] add stack segment override prefix to i386 __clone
@ 2016-09-27 22:36 LeMay, Michael
0 siblings, 0 replies; only message in thread
From: LeMay, Michael @ 2016-09-27 22:36 UTC (permalink / raw)
To: musl
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-09-27 22:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-27 22:36 [RFC PATCH 4/7] add stack segment override prefix to i386 __clone LeMay, Michael
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).