Skip to contentSkip to conversation

Use '_raw' memory access primitives.

PATCH New Lluís 1 participant 1 message Oct 7, 2010

lore
Share & tools
lore

Lluís

author
#0 lore raw

PATCH 1/1 Use '_raw' memory access primitives.

Using a pointer on the host should not go through lduw.

---
 linux-user/signal.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
linux-user/signal.c +2 -2
index 77683f7..097da9d 100644
@@ -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_raw(&sc->cs) | 3);
+        cpu_x86_load_seg(env, R_SS, lduw_raw(&sc->ss) | 3);
 
         tmpflags = tswapl(sc->eflags);
         env->eflags = (env->eflags & ~0x40DD5) | (tmpflags & 0x40DD5);
Signature · 7 lines
1.7.1

-- 
 "And it's much the same thing with knowledge, for whenever you learn
 something new, the whole world becomes that much richer."
 -- The Princess of Pure Reason, as told by Norton Juster in The Phantom
 Tollbooth