summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2006-09-23 13:42:09 +0000
committerdavidxu <davidxu@FreeBSD.org>2006-09-23 13:42:09 +0000
commit98bfdf3a78586aa410625c6677d0977862ea27a8 (patch)
treea96ee18438897341fe6167743a2abc305e66f457
parentfae2ccfa41d5a181d178da8b59d06b7c3d775804 (diff)
downloadFreeBSD-src-98bfdf3a78586aa410625c6677d0977862ea27a8.zip
FreeBSD-src-98bfdf3a78586aa410625c6677d0977862ea27a8.tar.gz
Stop reloading %fs and %gs, since it causes the base address from
GDT to be loaded into FS.base and GS.base, these values of course are not the values set by sysarch() with I386_SET_FSBASE and I386_SET_GSBASE, the change fixed a crash for 32bit libthr after signal handler returned and normal code is accessing thread pointer, for example: movl %gs:8, %eax.
-rw-r--r--sys/amd64/ia32/ia32_sigtramp.S4
1 files changed, 0 insertions, 4 deletions
diff --git a/sys/amd64/ia32/ia32_sigtramp.S b/sys/amd64/ia32/ia32_sigtramp.S
index 0387cb7..7b20bc4 100644
--- a/sys/amd64/ia32/ia32_sigtramp.S
+++ b/sys/amd64/ia32/ia32_sigtramp.S
@@ -45,8 +45,6 @@ ia32_sigcode:
calll *IA32_SIGF_HANDLER(%esp)
leal IA32_SIGF_UC(%esp),%eax /* get ucontext */
pushl %eax
- movl IA32_UC_GS(%eax),%gs /* restore %gs */
- movl IA32_UC_FS(%eax),%fs /* restore %fs */
movl IA32_UC_ES(%eax),%es /* restore %es */
movl IA32_UC_DS(%eax),%ds /* restore %ds */
movl $SYS_sigreturn,%eax
@@ -62,8 +60,6 @@ freebsd4_ia32_sigcode:
calll *IA32_SIGF_HANDLER(%esp)
leal IA32_SIGF_UC4(%esp),%eax/* get ucontext */
pushl %eax
- movl IA32_UC4_GS(%eax),%gs /* restore %gs */
- movl IA32_UC4_FS(%eax),%fs /* restore %fs */
movl IA32_UC4_ES(%eax),%es /* restore %es */
movl IA32_UC4_DS(%eax),%ds /* restore %ds */
movl $344,%eax /* 4.x SYS_sigreturn */
OpenPOWER on IntegriCloud