From: John Reiser <jreiser@BitWagon.com>
To: Jeff Dike <jdike@addtoit.com>
Cc: Steve VanDeBogart <vandebo-lkml@NerdBox.Net>,
jiayingz@google.com, linux-kernel@vger.kernel.org,
user-mode-linux-devel@lists.sourceforge.net, dkegel@google.com
Subject: Re: [uml-devel] [PATCH 2/6] UML: Don't valgrind userspace
Date: Sat, 06 Sep 2008 13:55:34 -0700 [thread overview]
Message-ID: <48C2EE46.2060509@BitWagon.com> (raw)
In-Reply-To: <20080905163718.GA11455@c2.user-mode-linux.org>
Jeff Dike wrote:
> On Fri, Aug 29, 2008 at 04:15:24PM -0700, Steve VanDeBogart wrote:
>> Add a flag to tell Valgrind to run the forked child natively. Necessary
>> because Valgrind makes additional system calls to instrumented processes,
>> which confuse UML.
>
>> +#ifdef UML_CONFIG_VALGRIND_SUPPORT
>> + flags |= VALGRIND_CLONE_LETGO;
>> +#endif
>> + }
>
> I keep forgetting that I have a really bad feeling about this:
>
> +#define VALGRIND_CLONE_LETGO 0x80000000 /* do not track fork like childr
> en*/
>
> This is effectively appropriating part of the kernel's ABI for
> valgrind's use.
UML is part of the kernel, so getting a memory reference checker (valgrind)
running in UML is part of the kernel, too. The concept of "escape from the
virtualizer" eventually occurs to more than just memory reference checkers.
> Not to mention that that bit is already taken:
>
> #define CLONE_IO 0x80000000 /* Clone io context */
It wasn't taken a few months ago when the valgrind patches for UML were
first proposed. The list of free bits in that flag word is now empty.
There may be some overlap of concept with CLONE_UNTRACED, which might
be used temporarily while figuring out an alternative.
>
> Could you do this with an annotation that says "let the next clone run
> untraced"?
Why wouldn't that be a race between the next _NR_clone from this thread
and the next _NR_clone from any other existing thread [in the same process]?
Valgrind can pre-pend a block of code at the start of the new thread,
but almost immediately that code will want to "unvirtualize."
Doing so at _NR_clone itself is convenient all around.
--
John Reiser, jreiser@BitWagon.com
next prev parent reply other threads:[~2008-09-06 20:56 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-29 23:12 [PATCH 0/6] support valgrinding uml Steve VanDeBogart
2008-08-29 23:14 ` [PATCH 1/6] base: Valgrind headers and Kconfig Steve VanDeBogart
2008-09-01 9:32 ` Andi Kleen
2008-09-01 14:06 ` Jeff Dike
2008-09-01 14:22 ` Andi Kleen
2008-09-01 15:47 ` Jeff Dike
2008-08-29 23:15 ` [PATCH 2/6] UML: Don't valgrind userspace Steve VanDeBogart
2008-09-05 16:37 ` [uml-devel] " Jeff Dike
2008-09-06 20:55 ` John Reiser [this message]
2008-09-06 22:12 ` Jeff Dike
2008-08-29 23:16 ` [PATCH 3/6] UML and sched: Annotate stacks Steve VanDeBogart
2008-08-29 23:16 ` [PATCH 4/6] VM: Annotate pagealloc Steve VanDeBogart
2008-08-30 10:57 ` Pekka Enberg
2008-09-03 5:25 ` [uml-devel] " Steve VanDeBogart
2008-09-03 9:35 ` Pekka Enberg
2008-08-29 23:17 ` [PATCH 5/6] slab: Annotate slab Steve VanDeBogart
2008-08-30 10:50 ` Pekka Enberg
2008-09-03 2:54 ` [uml-devel] " John Reiser
2008-09-03 9:39 ` Pekka J Enberg
2008-09-03 5:08 ` Steve VanDeBogart
2008-09-03 9:27 ` Pekka Enberg
2008-09-03 9:40 ` Pekka Enberg
2008-09-03 15:42 ` Steve VanDeBogart
2008-09-04 7:33 ` Pekka Enberg
2008-08-29 23:18 ` [PATCH 6/6] VM: Annotate vmalloc Steve VanDeBogart
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=48C2EE46.2060509@BitWagon.com \
--to=jreiser@bitwagon.com \
--cc=dkegel@google.com \
--cc=jdike@addtoit.com \
--cc=jiayingz@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=user-mode-linux-devel@lists.sourceforge.net \
--cc=vandebo-lkml@NerdBox.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox