From: Jeff Dike <jdike@addtoit.com>
To: Tom Hughes <thh@cyberscience.com>
Cc: "D. Bahi" <dbahi@enterasys.com>,
Nicholas Nethercote <njn25@cam.ac.uk>,
user-mode-linux-devel@lists.sourceforge.net,
valgrind-users@lists.sourceforge.net
Subject: Re: [Valgrind-users] Re: [uml-devel] Re: UML and valgrind
Date: Wed, 4 Aug 2004 11:35:41 -0400 [thread overview]
Message-ID: <20040804153541.GA7237@ccure.user-mode-linux.org> (raw)
In-Reply-To: <yek3c33tk5o.fsf@audi.uk.cyberscience.com>
On Wed, Aug 04, 2004 at 08:52:19AM +0100, Tom Hughes wrote:
> >> @@ -39,6 +40,10 @@
> >> # code which copies from baseBlock before the call, into
> >> # m_state_static, and back afterwards.
> >>
> >> +.section .data
> >> +save_ip:
> >> + .long 0
> >> +
> >> VG_(do_syscall):
> >> # Save all the int registers of the real machines state on the
> >> # simulators stack.
> >> @@ -80,10 +85,27 @@
> >> movl VG_(m_state_static)+48, %esi
> >> movl VG_(m_state_static)+52, %edi
> >>
> >> + cmpl $__NR_clone, %eax
> >> + jne not_clone
> >> +
> >> + pushl %eax
> >> + movl VG_(m_state_static)+60, %eax
> >> + movl %eax, save_ip
> >> + popl %eax
> >> +
> >> + int $0x80
> >> +
> >> + cmpl $0, %eax
> >> + jne parent_finish
> >> +
> >> + jmp *save_ip
> >> +
> >> +not_clone:
> >> # esp now refers to the simulatees stack
> >> # Do the actual system call
> >> int $0x80
>
> But how did you cope with the fact that valgrind doesn't protect it's
> internal data structures in any way? You would have all sorts of
> problems with two threads trying to access the same data.
I think I was mistaken about this firing off another valgrind thread, for
two reasons.
I remember being concerned about whether the process data was still present
in its normal, not running under valgrind, form. This would only be a problem
if you were planning on running a non-valgrind thread in the same address
space.
Second, the patch above looks like it extracts the client IP from valigrind's
state and branches to it. This would make the new thread a non-valgrind one.
So, this being the case, there are no concerns about multi-threading V, just
UML, which isn't your problem.
Jeff
-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
next prev parent reply other threads:[~2004-08-04 15:35 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-08 4:13 [uml-devel] UML and valgrind Bahi, David
2004-08-03 2:47 ` [uml-devel] " D. Bahi
2004-08-03 5:17 ` Jeff Dike
2004-08-03 9:31 ` [Valgrind-users] " Nicholas Nethercote
2004-08-03 14:50 ` Jeff Dike
2004-08-03 14:31 ` Nicholas Nethercote
2004-08-03 17:50 ` Jeff Dike
2004-08-03 17:33 ` D. Bahi
2004-08-03 19:31 ` Jeff Dike
2004-08-03 20:12 ` D. Bahi
2004-08-04 7:47 ` Tom Hughes
2004-08-03 22:04 ` Nicholas Nethercote
2004-08-04 7:52 ` Tom Hughes
2004-08-04 15:10 ` Jeff Dike
2004-08-04 15:35 ` Jeff Dike [this message]
2004-08-04 14:58 ` Tom Hughes
2004-08-04 18:00 ` Jeff Dike
2004-08-04 17:57 ` Tom Hughes
2004-08-04 21:02 ` Jeff Dike
2004-08-05 9:28 ` Nicholas Nethercote
2004-08-05 13:15 ` D. Bahi
2004-08-05 15:24 ` Jeff Dike
2004-08-03 19:40 ` Jeff Dike
2004-08-04 1:09 ` Nuno Silva
2004-08-04 2:47 ` D. Bahi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040804153541.GA7237@ccure.user-mode-linux.org \
--to=jdike@addtoit.com \
--cc=dbahi@enterasys.com \
--cc=njn25@cam.ac.uk \
--cc=thh@cyberscience.com \
--cc=user-mode-linux-devel@lists.sourceforge.net \
--cc=valgrind-users@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.