projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4f69594
)
fix x32 __set_thread_area failure due to junk in upper bits
author
Rich Felker
<dalias@aerifal.cx>
Sat, 2 May 2015 15:53:45 +0000
(11:53 -0400)
committer
Rich Felker
<dalias@aerifal.cx>
Sat, 2 May 2015 15:53:45 +0000
(11:53 -0400)
the kernel does not properly clear the upper bits of the syscall
argument, so we have to do it before the syscall.
src/thread/x32/__set_thread_area.s
patch
|
blob
|
history
diff --git
a/src/thread/x32/__set_thread_area.s
b/src/thread/x32/__set_thread_area.s
index 94bc36300c240e9476f57eb705d577a33d10b6d4..e0daf72f5f020cebc96a59e10438b59f19b2b0f2 100644
(file)
--- a/
src/thread/x32/__set_thread_area.s
+++ b/
src/thread/x32/__set_thread_area.s
@@
-3,7
+3,7
@@
.global __set_thread_area
.type __set_thread_area,@function
__set_thread_area:
- mov %
rdi,%r
si /* shift for syscall */
+ mov %
edi,%e
si /* shift for syscall */
movl $0x1002,%edi /* SET_FS register */
movl $0x4000009e,%eax /* set fs segment to */
syscall /* arch_prctl(SET_FS, arg)*/