lkml.org 
[lkml]   [2008]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 2/6] UML: Don't valgrind userspace
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.

Signed-off-by: Steve VanDeBogart <vandebo-lkml@nerdbox.net>
---

Index: linux-2.6.27-rc5/arch/um/os-Linux/skas/process.c
===================================================================
--- linux-2.6.27-rc5.orig/arch/um/os-Linux/skas/process.c 2008-08-29 15:50:24.000000000 -0700
+++ linux-2.6.27-rc5/arch/um/os-Linux/skas/process.c 2008-08-29 15:51:45.000000000 -0700
@@ -26,6 +26,7 @@
#include "skas_ptrace.h"
#include "user.h"
#include "sysdep/stub.h"
+#include "valgrind.h"

int is_skas_winch(int pid, int fd, void *data)
{
@@ -297,8 +298,12 @@
flags = CLONE_FILES;
if (proc_mm)
flags |= CLONE_VM;
- else
+ else {
flags |= SIGCHLD;
+#ifdef UML_CONFIG_VALGRIND_SUPPORT
+ flags |= VALGRIND_CLONE_LETGO;
+#endif
+ }

pid = clone(userspace_tramp, (void *) sp, flags, (void *) stub_stack);
if (pid < 0) {

\
 
 \ /
  Last update: 2008-08-30 01:19    [W:1.877 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site