summaryrefslogtreecommitdiffstats
path: root/sys/i386/linux/linux_locore.s
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2008-09-07 16:39:21 +0000
committerkib <kib@FreeBSD.org>2008-09-07 16:39:21 +0000
commita568a3185ee59bb37249a48388136cdb5bb0b5d0 (patch)
tree45e4f50c5c45b1c39b7b473d00236d0146aa9e03 /sys/i386/linux/linux_locore.s
parent3988a6e0e0d960f18b808a6e4560e7207a069255 (diff)
downloadFreeBSD-src-a568a3185ee59bb37249a48388136cdb5bb0b5d0.zip
FreeBSD-src-a568a3185ee59bb37249a48388136cdb5bb0b5d0.tar.gz
Segment registers are stored in the uc_mcontext member of the struct
l_ucontext. To restore the registers content, trampoline needs to dereference uc_mcontext instead of taking some undefined values from l_ucontext. Submitted by: Dmitry Chagin <dchagin@> MFC after: 1 week
Diffstat (limited to 'sys/i386/linux/linux_locore.s')
-rw-r--r--sys/i386/linux/linux_locore.s3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/i386/linux/linux_locore.s b/sys/i386/linux/linux_locore.s
index 1c23b3a..044e8e2 100644
--- a/sys/i386/linux/linux_locore.s
+++ b/sys/i386/linux/linux_locore.s
@@ -19,7 +19,8 @@ NON_GPROF_ENTRY(linux_sigcode)
linux_rt_sigcode:
call *LINUX_RT_SIGF_HANDLER(%esp)
leal LINUX_RT_SIGF_UC(%esp),%ebx /* linux ucp */
- movl LINUX_SC_GS(%ebx),%gs
+ leal LINUX_RT_SIGF_SC(%ebx),%ecx /* linux sigcontext */
+ movl LINUX_SC_GS(%ecx),%gs
push %eax /* fake ret addr */
movl $LINUX_SYS_linux_rt_sigreturn,%eax /* linux_rt_sigreturn() */
int $0x80 /* enter kernel with args */
OpenPOWER on IntegriCloud