* [Qemu-devel] Load primitive in linux-user/signal.c
@ 2010-10-06 19:44 Lluís
2010-10-07 5:21 ` Mulyadi Santosa
0 siblings, 1 reply; 3+ messages in thread
From: Lluís @ 2010-10-06 19:44 UTC (permalink / raw)
To: qemu-devel
I'm still not very tuned-in into the code, but I think this piece should
use _raw access primitives:
diff --git a/linux-user/signal.c b/linux-user/signal.c
index 77683f7..097da9d 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_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);
I triggered it while capturing "lduw" and the like in both softmmu and
linux-user to intercept memory access information coming from
non-generated code (I'm not capturing neither _raw nor _code, as they do
not seem to relate to "real" memory access events on the guest).
What I've found is that this is the only place where a ld* primitive is
not being passed a "target_ulong" as argument.
Thanks,
Lluis
--
"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
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [Qemu-devel] Load primitive in linux-user/signal.c
2010-10-06 19:44 [Qemu-devel] Load primitive in linux-user/signal.c Lluís
@ 2010-10-07 5:21 ` Mulyadi Santosa
2010-10-07 17:21 ` Lluís
0 siblings, 1 reply; 3+ messages in thread
From: Mulyadi Santosa @ 2010-10-07 5:21 UTC (permalink / raw)
To: qemu-devel
Hi :)
On Thu, Oct 7, 2010 at 02:44, Lluís <xscript@gmx.net> wrote:
> I'm still not very tuned-in into the code, but I think this piece should
> use _raw access primitives:
I know nothing about your patch, but I suggest to rewrite this post so
it follows patch submission format e.g comment, signed off then the
patch itself.... :)
No offense, ok? :)
--
regards,
Mulyadi Santosa
Freelance Linux trainer and consultant
blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] Load primitive in linux-user/signal.c
2010-10-07 5:21 ` Mulyadi Santosa
@ 2010-10-07 17:21 ` Lluís
0 siblings, 0 replies; 3+ messages in thread
From: Lluís @ 2010-10-07 17:21 UTC (permalink / raw)
To: qemu-devel
Mulyadi Santosa writes:
> I know nothing about your patch, but I suggest to rewrite this post so
> it follows patch submission format e.g comment, signed off then the
> patch itself.... :)
> No offense, ok? :)
None taken. I've sent it again with (I suppose) the adequate format.
Lluis
--
"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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-10-07 17:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-06 19:44 [Qemu-devel] Load primitive in linux-user/signal.c Lluís
2010-10-07 5:21 ` Mulyadi Santosa
2010-10-07 17:21 ` Lluís
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.