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.  The child does not
share VM with the parent, and using the same addresses for the stack
causes no overwrites.  Perhaps the Dcache efficiency is slightly
less, but much less costly than mmap() and the eventual munmap().

-- 
John Reiser, [EMAIL PROTECTED]

-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

Reply via email to