qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Don't translate pointer when in restore_sigcontext
@ 2011-04-20  7:10 Mike McCormack
  0 siblings, 0 replies; 2+ messages in thread
From: Mike McCormack @ 2011-04-20  7:10 UTC (permalink / raw)
  To: riku.voipio; +Cc: qemu-devel

Fixes crash in i386 when user emulation base address is non-zero.

21797 rt_sigreturn(8,1082124603,1,0,1082126048,1082126248)Exit reason and status: signal 11

Signed-off-by: Mike McCormack <mj.mccormack@samsung.com>
---
 linux-user/signal.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/linux-user/signal.c b/linux-user/signal.c
index ce033e9..55277fb 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -982,8 +982,8 @@ restore_sigcontext(CPUX86State *env, struct target_sigcontext *sc, int *peax)
         env->regs[R_ECX] = tswapl(sc->ecx);
         env->eip = tswapl(sc->eip);
 
-        cpu_x86_load_seg(env, R_CS, lduw(&sc->cs) | 3);
-        cpu_x86_load_seg(env, R_SS, lduw(&sc->ss) | 3);
+        cpu_x86_load_seg(env, R_CS, lduw_p(&sc->cs) | 3);
+        cpu_x86_load_seg(env, R_SS, lduw_p(&sc->ss) | 3);
 
         tmpflags = tswapl(sc->eflags);
         env->eflags = (env->eflags & ~0x40DD5) | (tmpflags & 0x40DD5);
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Qemu-devel] [PATCH] Don't translate pointer when in restore_sigcontext
@ 2011-06-01  6:14 Mike McCormack
  0 siblings, 0 replies; 2+ messages in thread
From: Mike McCormack @ 2011-06-01  6:14 UTC (permalink / raw)
  To: Riku Voipio; +Cc: qemu-devel

Fixes crash in i386 when user emulation base address is non-zero.

21797 rt_sigreturn(8,1082124603,1,0,1082126048,1082126248)Exit reason and status: signal 11

Signed-off-by: Mike McCormack <mj.mccormack@samsung.com>
---
 linux-user/signal.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/linux-user/signal.c b/linux-user/signal.c
index c7a375f..da4206f 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -982,8 +982,8 @@ restore_sigcontext(CPUX86State *env, struct target_sigcontext *sc, int *peax)
         env->regs[R_ECX] = tswapl(sc->ecx);
         env->eip = tswapl(sc->eip);
 
-        cpu_x86_load_seg(env, R_CS, lduw(&sc->cs) | 3);
-        cpu_x86_load_seg(env, R_SS, lduw(&sc->ss) | 3);
+        cpu_x86_load_seg(env, R_CS, lduw_p(&sc->cs) | 3);
+        cpu_x86_load_seg(env, R_SS, lduw_p(&sc->ss) | 3);
 
         tmpflags = tswapl(sc->eflags);
         env->eflags = (env->eflags & ~0x40DD5) | (tmpflags & 0x40DD5);
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-06-01  6:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-01  6:14 [Qemu-devel] [PATCH] Don't translate pointer when in restore_sigcontext Mike McCormack
  -- strict thread matches above, loose matches on Subject: below --
2011-04-20  7:10 Mike McCormack

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).