All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Dike <jdike@addtoit.com>
To: John Reiser <jreiser@BitWagon.com>
Cc: user-mode-linux-devel@lists.sourceforge.net
Subject: Re: [uml-devel] why allocate page for stack in clone(, stack, ~CLONE_VM & (...)) ?
Date: Thu, 1 Nov 2007 22:25:40 -0400	[thread overview]
Message-ID: <20071102022540.GA12253@c2.user-mode-linux.org> (raw)
In-Reply-To: <472A4DAC.3060104@BitWagon.com>

On Thu, Nov 01, 2007 at 03:05:32PM -0700, John Reiser wrote:
> In arch/um/os/start_up.c, function start_ptraced_child() does:
>         pid = clone(ptrace_child, (void *) sp, SIGCHLD, NULL);
> where sp points into a newly- mmap()ed page.  Instead, why not
> avoid the mmap() entirely via:
>         pid = clone(ptrace_child, NULL,        SIGCHLD, NULL);
> 
> Because the flags to clone() do not contain CLONE_VM, then the clone()
> is equivalent to a fork() with respect to address space.

If you look at what's currently in mainline, you'll see it does
exactly what you suggest - the patch in question is this one:
	http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=3cdaf45578b9aa1eb748d0a32678ee5a0180575b

				Jeff

-- 
Work email - jdike at linux dot intel dot com

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

      reply	other threads:[~2007-11-02  2:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-01 22:05 [uml-devel] why allocate page for stack in clone(, stack, ~CLONE_VM & (...)) ? John Reiser
2007-11-02  2:25 ` Jeff Dike [this message]

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=20071102022540.GA12253@c2.user-mode-linux.org \
    --to=jdike@addtoit.com \
    --cc=jreiser@BitWagon.com \
    --cc=user-mode-linux-devel@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.